Tuesday, April 22, 2014

Trace IP with Gedmo IpTraceable behavior

As a strong user of Doctrine2 since I'm working with Symfony2, I also use Gedmo DoctrineExtensions. This library provides a great set of useful features we commonly need when developping web project :
  • Timestampable entities (created_at and updated_at columns on tables),
  • Sluggable entities,
  • Trace creators and modificators on contents (Blameable behavior)
  • ...
Since I more often work for sensitive e-commerce project, I needed a feature to trace IPs on some data (mainly orders and payments). So I decided to develop this functionality, based on existing work from Timestampable and Blameable in Gedmo DoctrineExtensions.

This is called IpTraceable and it is well explained in the Github repository documentation.

Symfony bundle implementation is under merge review in Stof DoctrineExtensionsBundle project, and you can use it with your own listener yet. Feel free to comment and add your support to  this PR on github : http://github.com/stof/StofDoctrineExtensionsBundle/pull/233

No comments :

Post a Comment

Comments are moderated before being published.