This repository has been archived on 2023-08-20. You can view files and clone it, but cannot push or open issues or pull requests.
symfony/src/Symfony/Bundle/FrameworkBundle/Tests/CacheWarmer
Fabien Potencier 68737ebbf3 feature #19485 [FrameworkBundle] Introduce a cache warmer for Validator based on PhpArrayAdapter (tgalopin)
This PR was merged into the 3.2-dev branch.

Discussion
----------

[FrameworkBundle] Introduce a cache warmer for Validator based on PhpArrayAdapter

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | yes
| Tests pass?   | -
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

Following the cache warmer for annotations PR (https://github.com/symfony/symfony/pull/18533), this PR introduces a cache warmer for YAML and XML Validator configuration.

Based on the PhpArrayAdapter, it uses the naming conventions (`Resources/config/validation`) to find the files and compile them into a single PHP file stored in the cache directory. This file uses shared memory on PHP 7.

The benefit of this PR are the same than the ones of the annotations PR:

- validation configuration can be warmed up offline
- on PHP 7, there is no need for user extension to get maximum performances (ie. if you use this PR and the other one, you probably won't need to enable APCu to have great performances)
- on PHP 7 again, we are not sensitive to APCu memory fragmentation
- last but not least, global performance is slightly better (I get 30us per class gain in Blackfire)

This PR also deprecates the framework.validator.cache key in favor of the cache pool introduced in https://github.com/symfony/symfony/pull/18544.

Commits
-------

6bdaf0b [FrameworkBundle] Introduce a cache warmer for Validator based on PhpArrayAdapter
2016-09-14 14:10:29 -07:00
..
ClassCacheCacheWarmerTest.php [ClassLoader] Add ClassCollectionLoader::inline() to generate inlined-classes files 2016-07-18 14:55:56 +02:00
SerializerCacheWarmerTest.php [FrameworkBundle] Introduce a cache warmer for Serializer based on PhpArrayAdapter 2016-08-17 20:09:37 +02:00
TemplateFinderTest.php [FrameworkBundle] Advanced search templates of bundles 2015-09-26 10:02:46 +02:00
TemplatePathsCacheWarmerTest.php [FrameworkBundle] Use relative paths in templates paths cache 2016-08-22 14:30:54 +02:00
ValidatorCacheWarmerTest.php [FrameworkBundle] Introduce a cache warmer for Validator based on PhpArrayAdapter 2016-08-11 14:01:30 +02:00