{"repo":"KnpLabs/DoctrineBehaviors","free":true,"listed":false,"github":"https://github.com/KnpLabs/DoctrineBehaviors","clone":"git clone https://github.com/KnpLabs/DoctrineBehaviors.git","description":"Doctrine2 behavior traits that help handling Blameable, Loggable, Sluggable, SoftDeletable, Uuidable, Timestampable, Translatable, Tree behavior","language":"PHP","stars":923,"topics":["orm","doctrine2","doctrine","behavior","trait","php"],"license":"MIT","category":"databases-storage","readme_excerpt":"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() and TranslatableInterface::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. Create rector.php config: Add Doctrine Behaviors upgrade set to rector.php : Run Rector:","default_branch":null,"files":null,"tree":[],"storefront":"/r/KnpLabs","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/KnpLabs/DoctrineBehaviors/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}