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/DependencyInjection
Fabien Potencier 46dd1d5719 feature #19507 [FrameworkBundle] Introduce a cache warmer for Serializer based on PhpArrayAdapter (tgalopin)
This PR was merged into the 3.2-dev branch.

Discussion
----------

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

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

Following the cache warmer for annotations (#18533) and for the validator (#19485), this PR introduces a cache warmer for the Serializer YAML and XML metadata configuration (mainly groups).

Based on the PhpArrayAdapter, it uses the naming conventions (Resources/config/serialization) 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 previous PR:

- serialization metadata cache 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)

As previous work on the Serializer cache system introduced issues (see 96e418a14f), it would be interesting to pay careful attention to the backward compatibility during the review (ping @Ener-Getick).

Commits
-------

810f469 [FrameworkBundle] Introduce a cache warmer for Serializer based on PhpArrayAdapter
2016-09-14 13:50:36 -07:00
..
Compiler [FrameworkBundle] Add CachePoolClearerPass for weak cache pool refs in cache clearers 2016-09-11 22:09:22 +02:00
Fixtures Merge branch '3.1' 2016-07-28 13:15:50 +02:00
ConfigurationTest.php [FrameworkBundle][Debug] Fix default config and cleaning of traces 2016-08-18 18:41:56 +02:00
FrameworkExtensionTest.php feature #19507 [FrameworkBundle] Introduce a cache warmer for Serializer based on PhpArrayAdapter (tgalopin) 2016-09-14 13:50:36 -07:00
PhpFrameworkExtensionTest.php [FrameworkBundle] Remove unused code in test 2016-01-31 22:09:31 +01:00
XmlFrameworkExtensionTest.php disable the assets helper when assets are disabled 2016-02-20 17:58:32 +01:00
YamlFrameworkExtensionTest.php [FrameworkBundle] Only enable CSRF protection when enabled in config 2013-10-28 10:42:32 +01:00