-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[HttpKernel] Illegal paths in generated container #10976
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Everything works fine with |
I have got a similar issue with both 2.4.5 and 2.5.0, which seems linked to #10894. For performance reason related to VBox shared folders, I have found to the following workaround, by changing how the cache and log paths are configured in Before: public function getCacheDir()
{
return __DIR__.'/../../cache/'.$this->environment;
}
public function getLogDir()
{
return __DIR__.'/../../log/';
} After: public function getCacheDir()
{
return dirname(dirname(__DIR__)).'/cache/'.$this->environment;
}
public function getLogDir()
{
return dirname(dirname(__DIR__)).'/log/';
} |
We are also experiencing this issue indirectly, due to the di extra bundle which has a cache warmer for warming up controller annotations. The changes from 2.3.13 to 2.3.14 of converting dumped container paths to absolute seem to indirectly cause the controller file paths you blacklist from di to be modified and then they do not match the paths to the controllers anymore. |
Regular expression replaces Is there any other path variations except those in https://github.com/symfony/symfony/blob/2.3/src/Symfony/Component/HttpKernel/Tests/Fixtures/DumpedContainers/app/cache/dev/withAbsolutePaths.php file ? Can original path has another prefix (not |
We also ran into this. The |
Does #10979 fix the issue? |
For us the issue is that |
@fabpot no, it does not Let say, that Then I mean, if some path contains path to composer.json somewhere in the middle, then it will be replaced by I made a mistake in my first commit, so I updated test and fixtures. Please see https://github.com/covex-nn/symfony/commit/679075e1af88b9298bcae5f06f38b11286cf729d Here is PHPUnit output:
|
The code has been reverted for now. See #10999 for more information. |
I've tried to optimize performance of vagrant dev-environment running with Symfony 2.3.
So, i moved
vendor-dir
inside virtual machine from shared folder/vagrant/vendor
into/home/vagrant/share/vendor
and created symlink from/home/vagrant/share/vendor
to/vagrant/vendor
And now on the main page http://www.local/app_dev.php/ there is an error:
(app_dev.php is inside
/vagrant/web
dir andapp/cache
is/vagrant/app/cache
)Inside
/vagrant/app/cache/dev/appDevDebugProjectContainer.php
file i have this function fortwig.loader
service:So, i think that i've found a bug in
Symfony\Component\HttpKernel\Kernel::removeAbsolutePathsFromContainer
, it came from issue #10894I think, that there is something wrong with regular expression
"{'([^']*)(".preg_quote($rootDir)."[^']*)'}"
, but i do not know how to fix it =(But i've changes fixtures for
testRemoveAbsolutePathsFromContainer
inSymfony\Component\HttpKernel\Tests\KernelTest
inhttps://github.com/covex-nn/symfony/commit/ea654f18fa3ef160e56e95bf88edab3ad78aff80Here is phpunit output
The text was updated successfully, but these errors were encountered: