Download the PHP package effiana/doctrine-behaviors without Composer
On this page you can find all versions of the php package effiana/doctrine-behaviors. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download effiana/doctrine-behaviors
More information about effiana/doctrine-behaviors
Files in effiana/doctrine-behaviors
Package doctrine-behaviors
Short Description Doctrine Behavior Traits
License MIT
Homepage http://knplabs.com
Informations about the package doctrine-behaviors
Doctrine Behaviors
This PHP library is a collection of traits and interfaces that add behaviors to Doctrine entities and repositories.
It currently handles:
- Blameable
- Loggable
- Sluggable
- SoftDeletable
- Uuidable
- Timestampable
- Translatable
- Tree
Install
Usage
All you have to do is to define a Doctrine entity:
- implemented interface
- add a trait
For some behaviors like tree, you can use repository traits:
Voilà!
You now have a working Category
that behaves like.
PHPStan
A PHPStan extension is available and provides the following features:
- Provides correct return type for
TranslatableInterface::getTranslations()
andTranslatableInterface::getNewTranslations()
- Provides correct return type for
TranslatableInterface::translate()
- Provides correct return type for
TranslationInterface::getTranslatable()
Include phpstan-extension.neon
in your project's PHPStan config:
3 Steps to Contribute
- 1 feature per pull-request
- New feature needs tests
- Tests and static analysis must pass:
Upgrade 1.x to 2
There have been many changes between 1 and 2, but don't worry. This package uses Rector, that handles upgrade for you.
All versions of doctrine-behaviors with dependencies
doctrine/common Version ^2.7|^3.0
doctrine/persistence Version ^1.3.4|^2.0
doctrine/dbal Version ^2.9
doctrine/orm Version ^2.7
symfony/cache Version ^4.4|^5.1
symfony/dependency-injection Version ^4.4|^5.1
symfony/http-kernel Version ^4.4|^5.1
symfony/security-core Version ^4.4|^5.1
symfony/framework-bundle Version ^4.4|^5.1
symfony/string Version ^5.0
symfony/translation-contracts Version ^2.1
symplify/package-builder Version ^8.2
nette/utils Version ^3.0
ramsey/uuid Version ^3.9|^4.0
symfony/polyfill-php80 Version ^1.18