incompass / soft-deletable-bundle
Adds simple soft deletes to Doctrine Entities
Installs: 41 325
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 9
Forks: 0
Type:symfony-bundle
Requires
- php: >=8.0
Requires (Dev)
- doctrine/doctrine-bundle: ^1.6
- doctrine/orm: ^2.5
- phpspec/prophecy-phpunit: ^2.0
- phpunit/phpunit: ^9.0
- symfony/framework-bundle: ^2.7|^3.4.0|^4.0
This package is auto-updated.
Last update: 2023-09-20 21:18:02 UTC
README
SoftDeletableBundle
This bundle allows you to simply add implements SoftDeleteInterface
and use SoftDeleteTrait
to a doctrine entity class to enable soft deletes.
Installation
Composer
composer require incompass/soft-deletable-bundle
Usage
Implement the SoftDeleteInterface.
class Entity implements SoftDeleteInterface {}
Add the SoftDeleteTrait trait to your doctrine entities.
use SoftDeleteTrait
Update your database schema
php bin/console doctrine:schema:update --force
Entities will now store a deleted_at date time when they are soft deleted.
Contributors
Joe Mizzi (casechek/incompass) Mike Bates (casechek/incompass)