assoconnect / log-bundle
Installs: 10 816
Dependents: 0
Suggesters: 0
Security: 0
Stars: 3
Watchers: 7
Forks: 0
Open Issues: 1
Requires
- php: ^8.2
- ext-json: *
- doctrine/dbal: ^2.10|^3.0
- doctrine/doctrine-bundle: ^2.11
- doctrine/orm: ^2.9
- moneyphp/money: ^3.2|^4.0
- ramsey/uuid: ^4.3
- ramsey/uuid-doctrine: ^1.4
- symfony/framework-bundle: ^5.3|^6.0|^7.0
- symfony/property-access: ^5.4|^6.0
- symfony/serializer: ^5.1|^6.0
Requires (Dev)
- assoconnect/php-quality-config: ^1.10
- phpstan/phpstan-symfony: ^1.0
- symfony/security-core: ^5.0|^6.0
- symfony/validator: ^5.2|^6.0
- symfony/yaml: ^5.0|^6.0
README
Installation
composer require assoconnect/log-bundle
Description
This Symfony bundle provides a system creating a Log entity every time a fully Doctrine-managed entity is persisted, updated or removed.
The Log entity and the LogFactoryInterface have to be implemented.
A system of included and excluded entities can be used to decide which entities have to be logged.
Log.yaml format:
log:
log_filters:
includedEntities: ['App\Entity\includedEntity1', 'App\Entity\includedEntity2']
excludeEntities: ['App\Entity\excludedEntity1', 'App\Entity\excludedEntity2']
If both lists are empty, every entities will be logged. If only includedEntities is empty, everything will be logged unless the processed entity is an instanceof OR is_subclass_of at least one element of the exclude list.
If only excludeEntities is empty, only the entities instanceof OR is_subclass_of at least one element of the include list will be logged.
If both lists are not empty, the entity has to be an instanceof OR is_subclass_of at least one element of the include list AND NOT an instanceof or is_subclass_of at least one element of the exclude list.