2017 © Pedro Peláez
 

library doctrine-extensions

Doctrine2 behavioral extensions

image

gedmo/doctrine-extensions

Doctrine2 behavioral extensions

  • Thursday, July 26, 2018
  • by l3pp4rd
  • Repository
  • 95 Watchers
  • 2258 Stars
  • 16,508,546 Installations
  • PHP
  • 349 Dependents
  • 11 Suggesters
  • 995 Forks
  • 450 Open issues
  • 59 Versions
  • 7 % Grown

The README.md

Doctrine Behavioral Extensions

Continuous Integration Quality Assurance Coding Standards Latest Stable Version, (*1)

This package contains extensions for Doctrine ORM and MongoDB ODM that offer new functionality or tools to use Doctrine more efficiently. These behaviors can be easily attached to the event system of Doctrine and handle the records being flushed in a behavioral way., (*2)


Doctrine Extensions 3.0 Released :tada:

3.0 focuses on refreshing this package for today's PHP. This includes:, (*3)

  • Bumping minimum version requirements of PHP, Doctrine, and other dependencies
  • Implementing support for the latest Doctrine MongoDB & Common packages
  • Updating the test suite, add code and style standards, and other needed build tools
  • Cleaning up documentation, code, comments, etc.

Read the Upgrade Doc for more info., (*4)


Installation

composer require gedmo/doctrine-extensions

Upgrading

Extensions

ORM & MongoDB ODM

  • 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.
  • Sluggable - urlizes your specified fields into single unique slug
  • Timestampable - updates date fields on create, update and even property change.
  • Translatable - gives you a very handy solution for translating records into different languages. Easy to setup, easier to use.
  • Tree - automates the tree handling process and adds some tree-specific functions on repository. (closure, nested set or materialized path) (MongoDB ODM only supports materialized path)

ORM Only

  • IpTraceable - inherited from Timestampable, sets IP address instead of timestamp
  • SoftDeleteable - allows to implicitly remove records
  • Sortable - makes any document or entity sortable
  • Uploadable - provides file upload handling in entity fields

MongoDB ODM Only

All extensions support Attribute, XML and Annotation (deprecated) mapping. Additional mapping drivers can be easily implemented using Mapping extension to handle the additional metadata mapping., (*5)

Version Compatibility

  • DBAL: ^3.2 (for all the extensions) or ^4.0 (for all the extensions, except Loggable)
  • ORM: ^2.14 or ^3.0
  • MongoDB ODM: ^2.3

If you are setting up the Entity Manager without a framework, see the example to prevent issues like #1310, (*6)

XML Mapping

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:, (*7)

<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:, (*8)

  • 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

Running Tests

To set up and run the tests, follow these steps:, (*9)

  • Install Docker and ensure you have docker compose
  • From the project root, run docker compose up -d to start containers in daemon mode
  • Enter the container via docker compose exec php bash (you are now in the root directory: /var/www)
  • Install Composer dependencies via composer install
  • Run the tests: vendor/bin/phpunit

Running the Example

To set up and run example, follow these steps:, (*10)

  • go to the root directory of extensions
  • download composer
  • install dev libraries: composer install
  • edit example/em.php and configure your database on top of the file
  • run: php example/bin/console or php example/bin/console for console commands
  • run: php example/bin/console orm:schema-tool:create to create the schema
  • run: php example/bin/console app:print-category-translation-tree to run the example to print the category translation tree

Contributors

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

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

The Versions

26/07 2018

v2.4.x-dev

2.4.9999999.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

26/07 2018

v2.4.36

2.4.36.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

30/06 2018

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

08/05 2018

v2.4.35

2.4.35.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/05 2018

dev-revert-1868-remove-soft-deleted-objects-from-cache

dev-revert-1868-remove-soft-deleted-objects-from-cache 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

13/04 2018

v2.4.34

2.4.34.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/01 2018

v2.4.33

2.4.33.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/12 2017

v2.4.32

2.4.32.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/10 2017

v2.4.31

2.4.31.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

02/07 2017

v2.4.30

2.4.30.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

29/05 2017

v2.4.29

2.4.29.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

23/04 2017

v2.4.28

2.4.28.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

22/03 2017

v2.4.27

2.4.27.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/12 2016

v2.4.26

2.4.26.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

14/12 2016

v2.4.25

2.4.25.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

11/10 2016

v2.4.24

2.4.24.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

22/09 2016

v2.4.23

2.4.23.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

30/08 2016

v2.4.22

2.4.22.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

17/08 2016

v2.4.21

2.4.21.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

30/07 2016

v2.4.20

2.4.20.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

25/07 2016

v2.4.19

2.4.19.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

19/07 2016

v2.4.18

2.4.18.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

15/07 2016

v2.4.17

2.4.17.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

15/07 2016

v2.4.16

2.4.16.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/07 2016

v2.4.14

2.4.14.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/07 2016

v2.4.15

2.4.15.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/02 2016

v2.4.13

2.4.13.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 2016

v2.4.12

2.4.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

27/01 2016

v2.4.11

2.4.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

18/12 2015

v2.4.10

2.4.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

30/11 2015

v2.4.9

2.4.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

25/11 2015

v2.4.8

2.4.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

28/09 2015

v2.4.7

2.4.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

28/08 2015

v2.4.6

2.4.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

11/08 2015

v2.4.5

2.4.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

30/07 2015

v2.4.4

2.4.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

07/07 2015

v2.4.3

2.4.3.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/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

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

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