symfony: Cache:clear fails on 2.6
I just upgraded project to 2.6.1 from 2.5.8.
Running php bin/console cache:clear
for a second time fails. Its reproducible with vanilla installation. Here is the screenshot:
I’m running these commands on Ubuntu 14.10, it also reproducible with (production servers) Debian Wheezy 7.6 with SYMFONY_ENV=prod
.
About this issue
- Original URL
- State: closed
- Created 10 years ago
- Reactions: 1
- Comments: 28 (21 by maintainers)
Commits related to this issue
- [FrameworkBundle] Fixed cache clear command with relative file refs (fixes #12893) — committed to 1ed/symfony by 1ed 10 years ago
- bug #12893 [DependencyInjection] Normalize path values with realpath so they can fit the targetDirRegex better. — committed to xelaris/symfony by xelaris 10 years ago
- bug #12893 [DependencyInjection] Normalize path values with realpath so they can fit the targetDirRegex better. — committed to xelaris/symfony by xelaris 10 years ago
- bug #12893 [DependencyInjection] Normalize path values with realpath so they can fit the targetDirRegex better. — committed to xelaris/symfony by xelaris 10 years ago
- bug #12999 [FrameworkBundle] fix cache:clear command (nicolas-grekas) This PR was merged into the 2.3 branch. Discussion ---------- [FrameworkBundle] fix cache:clear command | Q | A | ... — committed to symfony/symfony by fabpot 10 years ago
- Hacking cache generation for heroku [hack] Hacking jms serialization for heroku [hack] Hacking symfony cache due to https://github.com/symfony/symfony/issues/12893 / see https://github.com/symfony/sy... — committed to desyncr/heroku-buildpack-php by deleted user 10 years ago
Everyone who override the getCacheDir() in app/AppKernel.php like
may avoid this issue by using realpath()
or have a look at PR #12928, which does basically the same, but for all paths in the generated container.
I don’t know if the getCacheDir is overridden by default, for setups were the Symfony 3.0 structure was chosen when installing via composer. If not, you can try to override it nonetheless.
Looks like it happens when using a custom cache location. Maybe something to do with #12784?
Steps to reproduce:
Install a new app:
symfony new myapp
cd myapp
Add to
app/AppKernel.php
:app/console ca:cl
(works)app/console ca:cl
(error)