composer require zogxray/soft-deletable-bundle
soft_delete:
connections:
default:
soft_delete:
connections:
example:
filter: YourNamespace\App\Doctrine\Filters\SoftDeleteFilter
subscriber: YourNamespace\App\Doctrine\Filters\SoftDeleteSubscriber
return [
Zogxray\SoftDeletableBundle\SoftDeletableBundle::class => ['all' => true],
];
class Order implements SoftDeletableInterface
{
/**
* @return \DateTime|null
*/
public function getDeletedAt() :?\DateTime
{
return $this->deletedAt;
}
/**
* @param \DateTime|null $deletedAt
*/
public function setDeletedAt(?\DateTime $deletedAt): void
{
$this->deletedAt = $deletedAt;
}
}
dbal:
default_connection: default
connections:
default:
driver: 'pdo_sqlite'
server_version: '3.15'
charset: utf8mb4
url: '%env(resolve:DATABASE_URL)%'
The Soft Deletable Bundle is open-sourced software licensed under the MIT license.