happyr / annotation-warmer
Warms up your annotation cache
Installs: 5 398
Dependents: 0
Suggesters: 0
Security: 0
Stars: 2
Watchers: 4
Forks: 1
Open Issues: 2
Type:symfony-bundle
Requires
- doctrine/annotations: ^1.6
- symfony/framework-bundle: ^3.4 || ^4.3 || ^5.0
Requires (Dev)
- phpunit/phpunit: ^8.4
This package is auto-updated.
Last update: 2024-10-17 02:30:15 UTC
README
When this bundle is installed and enabled it will make sure all your annotation metadata is cached when your container dependency container is built.
We also provide a command to validate that all annotations are properly loaded.
Install
composer require happyr/annotation-warmer
Use
We warm upp all classes in src
by default. You may use a different configuration of paths if you like:
happyr_annotation_warmer: paths: - '%kernel.project_dir%/src/Message/Command' - '%kernel.project_dir%/src/Message/Event'
Linting annotations
To make sure your annotations are properly configured you may run the lint command:
bin/console lint:annotations
Assumptions
- We assume that the classes in the specified paths are using PSR-4.
- We also assume that all
*.php
files in the path has a class with the same as the filename.
Limitations
We are only warming cache for annotations to the Serializer and Validation component.