happyr/annotation-warmer

Warms up your annotation cache

Installs: 2 958

Dependents: 0

Suggesters: 0

Security: 0

Stars: 2

Watchers: 3

Forks: 1

Open Issues: 2

Type:symfony-bundle

0.3.0 2019-12-16 15:54 UTC

This package is auto-updated.

Last update: 2020-11-16 18:12:08 UTC


README

Latest Version Software License Build Status Code Coverage Quality Score Total Downloads

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.