All Projects → doctrine-extensions → Doctrineextensions

doctrine-extensions / Doctrineextensions

Licence: mit
Doctrine2 behavioral extensions, Translatable, Sluggable, Tree-NestedSet, Timestampable, Loggable, Sortable

Programming Languages

PHP
23972 projects - #3 most used programming language

Projects that are alternatives of or similar to Doctrineextensions

Stofdoctrineextensionsbundle
Integration bundle for DoctrineExtensions by l3pp4rd in Symfony
Stars: ✭ 1,713 (-53.3%)
Mutual labels:  doctrine, doctrine-orm, doctrine-odm-mongodb
doctrine-filter
Quickly add advanced filtering/searching and sorting capabilities to any resource in your APIs or Web apps that use Doctrine.
Stars: ✭ 27 (-99.26%)
Mutual labels:  doctrine, doctrine-orm
doctrine-extensions
Doctrine2 behavioral extension Transformable
Stars: ✭ 14 (-99.62%)
Mutual labels:  doctrine, doctrine-orm
doctrine-orm-batcher
No description or website provided.
Stars: ✭ 27 (-99.26%)
Mutual labels:  doctrine, doctrine-orm
doctrine-multi-tenancy
Extension for Doctrine 2 providing advanced multi-tenancy support
Stars: ✭ 16 (-99.56%)
Mutual labels:  doctrine
user
A domain layer providing basic user management
Stars: ✭ 14 (-99.62%)
Mutual labels:  doctrine
orm
🔥 Well-integrated Doctrine ORM for Nette Framework
Stars: ✭ 51 (-98.61%)
Mutual labels:  doctrine-orm
eav-bundle
A Symfony bundle for basic EAV management
Stars: ✭ 19 (-99.48%)
Mutual labels:  doctrine
Phpstan Doctrine
Doctrine extensions for PHPStan
Stars: ✭ 338 (-90.79%)
Mutual labels:  doctrine
Doctrinejsonfunctions
Doctrine DQL functions for SQL JSON data type
Stars: ✭ 325 (-91.14%)
Mutual labels:  doctrine
idea-php-shopware-plugin
Shopware Plugin for PhpStorm which extends Symfony Plugin
Stars: ✭ 50 (-98.64%)
Mutual labels:  doctrine
MysqlDoctrineFunctions
MySQL Function for Doctrine : RAND(), ROUND() DATE(), DATE_FORMAT()
Stars: ✭ 45 (-98.77%)
Mutual labels:  doctrine
Awesome Doctrine
A curated list of amazingly awesome Doctrine 2 ORM related libraries, resources and shiny things.
Stars: ✭ 259 (-92.94%)
Mutual labels:  doctrine
doctrine-expressive-example
Example PHP REST API application built with Expressive using Doctrine ORM, complete with associations, pagination, and DB connectivity inside Docker containers. Used in #Beachcasts videos on YouTube.
Stars: ✭ 36 (-99.02%)
Mutual labels:  doctrine-orm
Guzzle Cache Middleware
A HTTP Cache for Guzzle 6. It's a simple Middleware to be added in the HandlerStack.
Stars: ✭ 325 (-91.14%)
Mutual labels:  doctrine
cart
Domain-Driven Design shop cart demonstration
Stars: ✭ 80 (-97.82%)
Mutual labels:  doctrine
coverd
Coverd Donation Bank Management App
Stars: ✭ 14 (-99.62%)
Mutual labels:  doctrine
Translationformbundle
Ease translations with some dedicated Symfony form types
Stars: ✭ 289 (-92.12%)
Mutual labels:  doctrine
doctrine-json-odm
JSON Object-Document Mapping bundle for Symfony and Doctrine
Stars: ✭ 15 (-99.59%)
Mutual labels:  doctrine
symfony recipes
Я буду писать здесь рецепты для Symfony на русском
Stars: ✭ 90 (-97.55%)
Mutual labels:  doctrine

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 🎉

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 YAML, Annotation and XML mapping. Additional mapping drivers can be easily implemented using Mapping extension to handle the additional metadata mapping.

Version Compatibility

Extensions Version Compatible Doctrine ORM & Common Library
2.4 2.5+
2.3 2.2 - 2.4

If you are setting up the Entity Manager without a framework, see the 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 and navigate to the root directory: cd /var/www
  • Install Composer dependencies via composer install
  • Run the tests: bin/phpunit -c tests/

Running the Example

To set up and run example, follow these steps:

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

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].