2017 © Pedro Peláez
 

library doctrine-extensions

Doctrine2 behavioral extensions

image

cmdconfig/doctrine-extensions

Doctrine2 behavioral extensions

  • Friday, July 10, 2015
  • by cmdconfig
  • Repository
  • 1 Watchers
  • 0 Stars
  • 1,052 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 995 Forks
  • 0 Open issues
  • 26 Versions
  • 0 % Grown

The README.md

Doctrine2 behavioral extensions

Version 2.4.2, (*1)

Build Status, (*2)

Note: Extensions 2.4.x are compatible with ORM and doctrine common library versions from 2.2.x to 2.5.x. ORM 2.5.x versions require PHP 5.4 or higher., (*3)

Note: Extensions 2.3.x are compatible with ORM and doctrine common library versions from 2.2.x to 2.4.x, (*4)

Latest updates

2015-05-01, (*5)

2015-03-26, (*6)

Support for ORM and Common library 2.5.0. A minor version bump, because of trait column changes., (*7)

2015-01-28, (*8)

Fixed the issue for all mappings, which caused related class mapping failures, when a relation or class name was in the same namespace, but extensions required it to be mapped as full classname., (*9)

2015-01-21, (*10)

Fixed memory leak issue with entity or document wrappers for convenient metadata retrieval., (*11)

Summary and features

This package contains extensions for Doctrine2 that hook into the facilities of Doctrine and offer new functionality or tools to use Doctrine2 more efficiently. This package contains mostly used behaviors which can be easily attached to your event system of Doctrine2 and handle the records being flushed in the behavioral way. List of extensions:, (*12)

  • Tree - this extension automates the tree handling process and adds some tree specific functions on repository. (closure, nestedset or materialized path)
  • Translatable - gives you a very handy solution for translating records into different languages. Easy to setup, easier to use.
  • Sluggable - urlizes your specified fields into single unique slug
  • Timestampable - updates date fields on create, update and even property change.
  • Blameable - updates string or reference fields on create, update and even property change with a string or object (e.g. user).
  • Loggable - helps tracking changes and history of objects, also supports version management.
  • Sortable - makes any document or entity sortable
  • Translator - explicit way to handle translations
  • SoftDeleteable - allows to implicitly remove records
  • Uploadable - provides file upload handling in entity fields
  • References - supports linking Entities in Documents and vice versa
  • RererenceIntegrity - constrains ODM MongoDB Document references
  • IpTraceable - inherited from Timestampable, sets IP address instead of timestamp

Currently these extensions support Yaml, Annotation and Xml mapping. Additional mapping drivers can be easily implemented using Mapping extension to handle the additional metadata mapping., (*13)

Note: Please note, that xml mapping needs to be in a different namespace, the declared namespace for Doctrine extensions is http://gediminasm.org/schemas/orm/doctrine-extensions-mapping So root node now looks like this:, (*14)

Note: Use 2.1.x tag in order to use extensions based on Doctrine2.1.x versions. Currently master branch is based on 2.2.x versions and may not work with 2.1.x, (*15)

<doctrine-mapping xmlns="http://doctrine-project.org/schemas/orm/doctrine-mapping"
                 xmlns:gedmo="http://gediminasm.org/schemas/orm/doctrine-extensions-mapping">
...
</doctrine-mapping>

XML mapping xsd schemas are also versioned and can be used by version suffix:, (*16)

  • Latest version - http://gediminasm.org/schemas/orm/doctrine-extensions-mapping
  • 2.2.x version - http://gediminasm.org/schemas/orm/doctrine-extensions-mapping-2-2
  • 2.1.x version - http://gediminasm.org/schemas/orm/doctrine-extensions-mapping-2-1

ODM MongoDB support

List of extensions which support ODM, (*17)

  • Translatable
  • Sluggable
  • Timestampable
  • Blameable
  • Loggable
  • Translator
  • Tree (Materialized Path strategy for now)
  • References
  • ReferenceIntegrity

All these extensions can be nested together and mapped in traditional ways - annotations, xml or yaml, (*18)

Running the tests:

pdo-sqlite extension is necessary. To setup and run tests follow these steps:, (*19)

  • go to the root directory of extensions
  • download composer: wget https://getcomposer.org/composer.phar
  • install dev libraries: php composer.phar install
  • run: bin/phpunit -c tests
  • optional - run mongodb service if targeting mongo tests

Running the example:

To setup and run example follow these steps:, (*20)

  • go to the root directory of extensions
  • download composer: wget https://getcomposer.org/composer.phar
  • install dev libraries: php composer.phar install
  • edit example/em.php and configure your database on top of the file
  • run: ./example/bin/console or php example/bin/console for console commands
  • run: ./example/bin/console orm:schema-tool:create to create schema
  • run: php example/run.php to run example

Contributors:

Thanks to everyone participating in the development of these great Doctrine2 extensions!, (*21)

And especially ones who create and maintain new extensions:, (*22)

The Versions

10/07 2015

dev-master

9999999-dev http://gediminasm.org/

Doctrine2 behavioral extensions

  Sources   Download

MIT

The Requires

 

The Development Requires

by David Buchmann
by Gediminas Morkevicius

extensions doctrine2 translatable gedmo tree behaviors sluggable loggable nestedset sortable timestampable blameable uploadable

18/06 2015

v2.4.2

2.4.2.0 http://gediminasm.org/

Doctrine2 behavioral extensions

  Sources   Download

MIT

The Requires

 

The Development Requires

by David Buchmann
by Gediminas Morkevicius

extensions doctrine2 translatable gedmo tree behaviors sluggable loggable nestedset sortable timestampable blameable uploadable

01/05 2015

v2.4.1

2.4.1.0 http://gediminasm.org/

Doctrine2 behavioral extensions

  Sources   Download

MIT

The Requires

 

The Development Requires

by David Buchmann
by Gediminas Morkevicius

extensions doctrine2 translatable gedmo tree behaviors sluggable loggable nestedset sortable timestampable blameable uploadable

08/04 2015

dev-revert-1272-timestampable

dev-revert-1272-timestampable http://gediminasm.org/

Doctrine2 behavioral extensions

  Sources   Download

MIT

The Requires

 

The Development Requires

by David Buchmann
by Gediminas Morkevicius

extensions doctrine2 translatable gedmo tree behaviors sluggable loggable nestedset sortable timestampable blameable uploadable

26/03 2015

v2.4.0

2.4.0.0 http://gediminasm.org/

Doctrine2 behavioral extensions

  Sources   Download

MIT

The Requires

 

The Development Requires

by David Buchmann
by Gediminas Morkevicius

extensions doctrine2 translatable gedmo tree behaviors sluggable loggable nestedset sortable timestampable blameable uploadable

26/03 2015

dev-orm/version-maintenance

dev-orm/version-maintenance http://gediminasm.org/

Doctrine2 behavioral extensions

  Sources   Download

MIT

The Requires

 

The Development Requires

by David Buchmann
by Gediminas Morkevicius

extensions doctrine2 translatable gedmo tree behaviors sluggable loggable nestedset sortable timestampable blameable uploadable

26/03 2015

dev-maintenance/common-lib-upgrade

dev-maintenance/common-lib-upgrade http://gediminasm.org/

Doctrine2 behavioral extensions

  Sources   Download

MIT

The Requires

 

The Development Requires

by David Buchmann
by Gediminas Morkevicius

extensions doctrine2 translatable gedmo tree behaviors sluggable loggable nestedset sortable timestampable blameable uploadable

24/02 2015

v2.3.12

2.3.12.0 http://gediminasm.org/

Doctrine2 behavioral extensions

  Sources   Download

MIT

The Requires

 

The Development Requires

by David Buchmann
by Gediminas Morkevicius

extensions doctrine2 translatable gedmo tree behaviors sluggable loggable nestedset sortable timestampable blameable uploadable

28/01 2015

v2.3.11

2.3.11.0 http://gediminasm.org/

Doctrine2 behavioral extensions

  Sources   Download

MIT

The Requires

 

The Development Requires

by David Buchmann
by Gediminas Morkevicius

extensions doctrine2 translatable gedmo tree behaviors sluggable loggable nestedset sortable timestampable blameable uploadable

21/01 2015

v2.3.10

2.3.10.0 http://gediminasm.org/

Doctrine2 behavioral extensions

  Sources   Download

MIT

The Requires

 

The Development Requires

by David Buchmann
by Gediminas Morkevicius

extensions doctrine2 translatable gedmo tree behaviors sluggable loggable nestedset sortable timestampable blameable uploadable

06/10 2014

dev-wip-v2.4.0

dev-wip-v2.4.0 http://gediminasm.org/

Doctrine2 behavioral extensions

  Sources   Download

MIT

The Requires

 

The Development Requires

by David Buchmann
by Gediminas Morkevicius

extensions doctrine2 translatable gedmo tree behaviors sluggable loggable nestedset sortable timestampable blameable uploadable

12/01 2014

v2.3.9

2.3.9.0 http://gediminasm.org/

Doctrine2 behavioral extensions

  Sources   Download

MIT

The Requires

 

The Development Requires

by David Buchmann
by Gediminas Morkevicius

extensions doctrine2 translatable gedmo tree behaviors sluggable loggable nestedset sortable timestampable blameable uploadable

09/11 2013

v2.3.8

2.3.8.0 http://gediminasm.org/

Doctrine2 behavioral extensions

  Sources   Download

MIT

The Requires

 

The Development Requires

by David Buchmann
by Gediminas Morkevicius

extensions doctrine2 translatable gedmo tree behaviors sluggable loggable nestedset sortable timestampable blameable uploadable

18/08 2013

v2.3.7

2.3.7.0 http://gediminasm.org/

Doctrine2 behavioral extensions

  Sources   Download

MIT

The Requires

 

The Development Requires

by David Buchmann
by Gediminas Morkevicius

extensions doctrine2 translatable gedmo tree behaviors sluggable loggable nestedset sortable timestampable blameable uploadable

21/05 2013

v2.3.6

2.3.6.0 http://gediminasm.org/

Doctrine2 behavioral extensions

  Sources   Download

MIT

The Requires

 

The Development Requires

by David Buchmann
by Gediminas Morkevicius

extensions doctrine2 translatable gedmo tree behaviors sluggable loggable nestedset sortable timestampable blameable uploadable

21/04 2013

2.2.x-dev

2.2.9999999.9999999-dev http://gediminasm.org/

Doctrine2 behavioral extensions

  Sources   Download

MIT

The Requires

 

by Gediminas Morkevicius

extensions doctrine2 translatable gedmo tree behaviors sluggable loggable nestedset sortable timestampable

05/03 2013

v2.3.5

2.3.5.0 http://gediminasm.org/

Doctrine2 behavioral extensions

  Sources   Download

MIT

The Requires

 

The Development Requires

by David Buchmann
by Gediminas Morkevicius

extensions doctrine2 translatable gedmo tree behaviors sluggable loggable nestedset sortable timestampable blameable uploadable

05/02 2013

v2.3.4

2.3.4.0 http://gediminasm.org/

Doctrine2 behavioral extensions

  Sources   Download

MIT

The Requires

 

The Development Requires

by David Buchmann
by Gediminas Morkevicius

extensions doctrine2 translatable gedmo tree behaviors sluggable loggable nestedset sortable timestampable blameable uploadable

18/12 2012

v2.3.3

2.3.3.0 http://gediminasm.org/

Doctrine2 behavioral extensions

  Sources   Download

MIT

The Requires

 

The Development Requires

by Gediminas Morkevicius

extensions doctrine2 translatable gedmo tree behaviors sluggable loggable nestedset sortable timestampable

14/07 2012

v2.3.2

2.3.2.0 http://gediminasm.org/

Doctrine2 behavioral extensions

  Sources   Download

MIT

The Requires

 

by Gediminas Morkevicius

extensions doctrine2 translatable gedmo tree behaviors sluggable loggable nestedset sortable timestampable

05/07 2012

v2.3.1

2.3.1.0 http://gediminasm.org/

Doctrine2 behavioral extensions

  Sources   Download

MIT

The Requires

 

by Gediminas Morkevicius

extensions doctrine2 translatable gedmo tree behaviors sluggable loggable nestedset sortable timestampable

15/06 2012

v2.2.3

2.2.3.0 http://gediminasm.org/

Doctrine2 behavioral extensions

  Sources   Download

MIT

The Requires

 

by Gediminas Morkevicius

extensions doctrine2 translatable gedmo tree behaviors sluggable loggable nestedset sortable timestampable

01/05 2012

v2.2.2

2.2.2.0 http://gediminasm.org/

Doctrine2 behavioral extensions

  Sources   Download

MIT

The Requires

 

by Gediminas Morkevicius

extensions doctrine2 translatable gedmo tree behaviors sluggable loggable nestedset sortable timestampable

10/03 2012

v2.2.1

2.2.1.0 http://gediminasm.org/

Doctrine2 behavioral extensions

  Sources   Download

MIT

The Requires

 

by Gediminas Morkevicius

extensions doctrine2 translatable gedmo tree behaviors sluggable loggable nestedset sortable timestampable

26/02 2012

v2.3.0

2.3.0.0 http://gediminasm.org/

Doctrine2 behavioral extensions

  Sources   Download

MIT

The Requires

 

by Gediminas Morkevicius

extensions doctrine2 translatable gedmo tree behaviors sluggable loggable nestedset sortable timestampable

21/01 2012

v2.2.0

2.2.0.0 http://gediminasm.org/

Doctrine2 behavioral extensions

  Sources   Download

MIT

The Requires

 

by Gediminas Morkevicius

extensions doctrine2 translatable gedmo tree behaviors sluggable loggable nestedset sortable timestampable