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
Fabien Potencier 862f5e5882 bug #9525 Cache Warmup Breaks Namespaced Kernel (rdohms)
This PR was merged into the master branch.

Discussion
----------

Cache Warmup Breaks Namespaced Kernel

| Q             | A
| ------------- | ---
| Bug fix?      | [yes]
| New feature?  | [no]
| BC breaks?    | [no]
| Deprecations? | [no]
| Tests pass?   | have not tried yet
| License       | MIT
| Fixed tickets | further fixes #1431

My kernel has been moved and namespaced to `Cfs\Bundle\MultiSiteBundle\Kernel\CfsKernel`. This worked fine until a change was made to how the kernel temp stuff is handled in the warmup phase.

When the app generates its own cache (i.e you run cache without warmup and access the site) everything is generated ok and the .meta files generate the proper reference to the FQN of the Kernel.

However if the warmup is used, it uses `Cfs\Bundle\MultiSiteBundle\Kernel\CfsKerne_` as the temporary Kernel, and when it does "fix references to the Kernel in .meta files" it generates 2 errors.

1. It does not use a string safe tempKernel name, so it never finds the reference to the kernel
2. If you fix that, then it replaces the FQN of the tempKernel with `CfsKernel`, the non-namespaced name of the proper Kernel (it also leaves the character count wrong in the serialization `C:43:<class>` where 43 is the char count for the FQN above)

The two changes above fix this, by escaping the string and replacing it with a FQN Kernel Class name.

What are your thoughts on this? If this sounds reasonable i'll do further enhancements and check tests.

Commits
-------

9e7788e Cache Warmup Breaks Namespaced Kernel
2013-11-23 07:56:00 +01:00
..
CacheWarmer Nsdocblocks 2012-10-20 09:10:30 +02:00
Command Cache Warmup Breaks Namespaced Kernel 2013-11-18 11:39:25 +01:00
Console fixed CS 2013-10-30 09:33:58 +01:00
Controller [FrameworkBundle] use the new request_stack service to get the Request object in the base Controller class 2013-11-21 11:59:04 +01:00
DataCollector moved the request data collector to HttpKernel 2012-07-18 10:39:53 +02:00
DependencyInjection fixed CS 2013-10-30 09:33:58 +01:00
EventListener fixed visibility 2013-11-04 10:03:40 +01:00
Fragment [HttpKernel] added escaping for hx:include tag attributes 2013-03-29 05:29:22 +01:00
HttpCache Fix typo change String to string 2012-07-06 19:52:14 +03:00
Resources bug #9168 [FrameworkBundle] made sure that the debug event dispatcher is used everywhere (fabpot) 2013-10-28 15:29:55 +01:00
Routing minor #9487 unify constructor initialization style throughout symfony (Tobion) 2013-11-22 18:42:00 +01:00
Templating minor #9487 unify constructor initialization style throughout symfony (Tobion) 2013-11-22 18:42:00 +01:00
Test added missing comments to WebTestCase 2013-07-21 14:18:53 +02:00
Tests [FrameworkBundle] use the new request_stack object in the GlobalVariables object 2013-11-20 13:37:49 +01:00
Translation unify constructor initialization style throughout symfony 2013-11-11 19:40:07 +01:00
Validator Fixed most of the docblocks/unused namespaces 2012-12-19 08:09:49 +01:00
.gitignore Added missing files .gitignore 2013-07-21 14:12:18 +02:00
CHANGELOG.md [FrameworkBundle][SecurityBundle] Added service configuration for the new Security CSRF sub-component 2013-09-27 10:16:29 +02:00
Client.php Merge branch '2.2' into 2.3 2013-09-29 21:41:41 +02:00
composer.json [FrameworkBundle] Update 2 dependencies (currently broken) 2013-11-21 07:34:10 +01:00
FrameworkBundle.php [FrameworkBundle] Adds the possibility to register Commands via the DIC 2013-10-04 16:09:28 +02:00
phpunit.xml.dist [FrameworkBundle] Added missing files for phpunit 2013-05-20 11:44:05 +02:00