symfony/symfony — Issue #3079: Allow manipulation of base path when warming cache
Author: samuelvogel
Created: 2012-01-10 10:17:16+00:00
State: open

It makes sense to allow a manipulation of the base path for cache warming for several reasons:

* You use php-fpm in production and have it configured to run inside a chroot, since CLI used for cache warming does not have the chroot, paths will differ
* You checkout new versions of your application and warm your cache before transfering it to the actual docroot to make the upgrade process atomic

The problem is when you warm the cache in a directory that is later moved or only accessible by a different path, then paths in `app/cache/prod/templates.php` for example will be wrong, and Twig imports will break.