Download the PHP package core23/doctrine-extensions without Composer
On this page you can find all versions of the php package core23/doctrine-extensions. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download core23/doctrine-extensions
More information about core23/doctrine-extensions
Files in core23/doctrine-extensions
Package doctrine-extensions
Short Description Useful doctrine event hooks.
License MIT
Homepage https://core23.de
Informations about the package doctrine-extensions
Doctrine Extensions
This library provides adds some useful doctrine hooks.
Installation
Open a command console, enter your project directory and execute the following command to download the latest stable version of this library:
Usage
Confirmable entities
If you need entities that needs to be confirmed, just implement the Nucleos\Doctrine\Model\ConfirmableInterface
in your entity class.
If you don't need the symfony framework, you need to register the Nucleos\Doctrine\EventListener\ORM\ConfirmableListener
.
Deleteable entities
If you need entities that should be soft deleted, just implement the Nucleos\Doctrine\Model\DeletableInterface
in your entity class.
If you don't need the symfony framework, you need to register the Nucleos\Doctrine\EventListener\ORM\DeletableListener
.
Lifecyle aware enties
If you need lifecyle information (creation / update date), just implement the Nucleos\Doctrine\Model\LifecycleDateTimeInterface
in your entity class.
If you don't need the symfony framework, you need to register the Nucleos\Doctrine\EventListener\ORM\LifecycleDateListener
.
Position aware entities
If you need sortable entities, just implement the Nucleos\Doctrine\Model\PositionAwareInterface
in your entity class.
If you don't need the symfony framework, you need to register the Nucleos\Doctrine\EventListener\ORM\SortableListener
.
Unique active entities
If you need entities that should only have one active state, just implement the Nucleos\Doctrine\Model\UniqueActiveInterface
in your entity class.
If you don't need the symfony framework, you need to register the Nucleos\Doctrine\EventListener\ORM\UniqueActiveListener
.
Table prefix
If you need a prefix for all of you application tables and sequences, you could use the TablePrefixEventListener
.
If the table name does already start with the defined prefix, it will be ignored.
If you don't need the symfony framework, you need to register the Nucleos\Doctrine\EventListener\ORM\TablePrefixEventListener
.
Migration usage
-
Update your
id
column frominteger
toguid
. - Create a new migration:
Symfony usage
If you want to use this library inside symfony, you can use a bridge.
Enable the Bundle
Then, enable the bundle by adding it to the list of registered bundles in config/bundles.php
file of your project:
Configure the Bundle
Create a configuration file called nucleos_doctrine.yaml
:
License
This library is under the MIT license.
All versions of doctrine-extensions with dependencies
doctrine/common Version ^2.8
doctrine/dbal Version ^2.6
doctrine/event-manager Version ^1.0
doctrine/orm Version ^2.5
sonata-project/doctrine-extensions Version ^1.3.1
symfony/property-access Version ^4.2 || ^5.0