ProductPromotion
Logo

PHP

made by https://0x3d.site

GitHub - doctrine-extensions/DoctrineExtensions: Doctrine2 behavioral extensions, Translatable, Sluggable, Tree-NestedSet, Timestampable, Loggable, Sortable
Doctrine2 behavioral extensions, Translatable, Sluggable, Tree-NestedSet, Timestampable, Loggable, Sortable - doctrine-extensions/DoctrineExtensions
Visit Site

GitHub - doctrine-extensions/DoctrineExtensions: Doctrine2 behavioral extensions, Translatable, Sluggable, Tree-NestedSet, Timestampable, Loggable, Sortable

GitHub - doctrine-extensions/DoctrineExtensions: Doctrine2 behavioral extensions, Translatable, Sluggable, Tree-NestedSet, Timestampable, Loggable, Sortable

Doctrine Behavioral Extensions

Continuous Integration Quality Assurance Coding Standards Latest Stable Version

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.


Doctrine Extensions 3.0 Released :tada:

3.0 focuses on refreshing this package for today's PHP. This includes:

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


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.

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

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:

<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:

Running Tests

To set up and run the tests, follow these steps:

  • 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:

  • 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!

And especially ones who create and maintain new extensions:

More Resources
to explore the angular.

mail [email protected] to add your project or resources here 🔥.

Related Articles
to learn about angular.

FAQ's
to learn more about Angular JS.

mail [email protected] to add more queries here 🔍.

More Sites
to check out once you're finished browsing here.

0x3d
https://www.0x3d.site/
0x3d is designed for aggregating information.
NodeJS
https://nodejs.0x3d.site/
NodeJS Online Directory
Cross Platform
https://cross-platform.0x3d.site/
Cross Platform Online Directory
Open Source
https://open-source.0x3d.site/
Open Source Online Directory
Analytics
https://analytics.0x3d.site/
Analytics Online Directory
JavaScript
https://javascript.0x3d.site/
JavaScript Online Directory
GoLang
https://golang.0x3d.site/
GoLang Online Directory
Python
https://python.0x3d.site/
Python Online Directory
Swift
https://swift.0x3d.site/
Swift Online Directory
Rust
https://rust.0x3d.site/
Rust Online Directory
Scala
https://scala.0x3d.site/
Scala Online Directory
Ruby
https://ruby.0x3d.site/
Ruby Online Directory
Clojure
https://clojure.0x3d.site/
Clojure Online Directory
Elixir
https://elixir.0x3d.site/
Elixir Online Directory
Elm
https://elm.0x3d.site/
Elm Online Directory
Lua
https://lua.0x3d.site/
Lua Online Directory
C Programming
https://c-programming.0x3d.site/
C Programming Online Directory
C++ Programming
https://cpp-programming.0x3d.site/
C++ Programming Online Directory
R Programming
https://r-programming.0x3d.site/
R Programming Online Directory
Perl
https://perl.0x3d.site/
Perl Online Directory
Java
https://java.0x3d.site/
Java Online Directory
Kotlin
https://kotlin.0x3d.site/
Kotlin Online Directory
PHP
https://php.0x3d.site/
PHP Online Directory
React JS
https://react.0x3d.site/
React JS Online Directory
Angular
https://angular.0x3d.site/
Angular JS Online Directory