Skip to content

Cache folder can no longer be a symlink in 2.3.15 #11011

@mvriel

Description

@mvriel

Today I was doing a composer update to go from Symfony 2.3.13 to Symfony 2.3.15 and since then I have been unable to run my application in my Vagrant environment.

The error I received is: MappingException: The mapping file /srv/shm/cache/dev/../../../vendor/symfony/symfony/src/Symfony/Component/Form/Resources/config/validation.xml does not exist

What apparently happened is that something, which I could not find, in Symfony had changed to generate relative paths in the cache instead of absolute paths.

However, to improve performance in vagrant we symlink the app/cache folder to /src/shm/cache in our virtual machine to reduce IO over vbox nfs. Having relative folders means now that it will try to find the vendor folder in my /srv/ folder.

Is this an unintended side-effect of another change? Is the above a supported use-case or should I find another way to improve performance in vagrant?

Here is the complete stacktrace (the name of the project has been replaced with dashes):

in /srv/http/---------/hosts/local.business.---------.nl/vendor/symfony/symfony/src/Symfony/Component/Validator/Mapping/Loader/FileLoader.php line 31
at FileLoader->__construct('/srv/shm/cache/dev/../../../vendor/symfony/symfony/src/Symfony/Component/Form/Resources/config/validation.xml') in /srv/http/---------/hosts/local.business.---------.nl/vendor/symfony/symfony/src/Symfony/Component/Validator/Mapping/Loader/XmlFilesLoader.php line 28
at XmlFilesLoader->getFileLoaderInstance('/srv/shm/cache/dev/../../../vendor/symfony/symfony/src/Symfony/Component/Form/Resources/config/validation.xml') in /srv/http/---------/hosts/local.business.---------.nl/vendor/symfony/symfony/src/Symfony/Component/Validator/Mapping/Loader/FilesLoader.php line 47
at FilesLoader->getFileLoaders(array('/srv/shm/cache/dev/../../../vendor/symfony/symfony/src/Symfony/Component/Form/Resources/config/validation.xml', '/srv/shm/cache/dev/../../../vendor/friendsofsymfony/user-bundle/FOS/UserBundle/Resources/config/validation.xml')) in /srv/http/---------/hosts/local.business.---------.nl/vendor/symfony/symfony/src/Symfony/Component/Validator/Mapping/Loader/FilesLoader.php line 33
at FilesLoader->__construct(array('/srv/shm/cache/dev/../../../vendor/symfony/symfony/src/Symfony/Component/Form/Resources/config/validation.xml', '/srv/shm/cache/dev/../../../vendor/friendsofsymfony/user-bundle/FOS/UserBundle/Resources/config/validation.xml')) in /srv/shm/cache/dev/appDevDebugProjectContainer.php line 4660
at appDevDebugProjectContainer->getValidator_Mapping_ClassMetadataFactoryService() in /srv/http/---------/hosts/local.business.---------.nl/app/bootstrap.php.cache line 1974
at Container->get('validator.mapping.class_metadata_factory') in /srv/shm/cache/dev/appDevDebugProjectContainer.php line 4188
at appDevDebugProjectContainer->getValidatorService() in /srv/http/---------/hosts/local.business.---------.nl/app/bootstrap.php.cache line 1974
at Container->get('validator') in /srv/shm/cache/dev/appDevDebugProjectContainer.php line 2497
at appDevDebugProjectContainer->getLuneticsLocale_Validator_MetaService() in /srv/http/---------/hosts/local.business.---------.nl/app/bootstrap.php.cache line 1974
at Container->get('lunetics_locale.validator.meta') in /srv/shm/cache/dev/appDevDebugProjectContainer.php line 2400
at appDevDebugProjectContainer->getLuneticsLocale_QueryGuesserService() in /srv/http/---------/hosts/local.business.---------.nl/app/bootstrap.php.cache line 1974
at Container->get('lunetics_locale.query_guesser') in /srv/shm/cache/dev/appDevDebugProjectContainer.php line 2312
at appDevDebugProjectContainer->getLuneticsLocale_GuesserManagerService() in /srv/http/---------/hosts/local.business.---------.nl/app/bootstrap.php.cache line 1974
at Container->get('lunetics_locale.guesser_manager') in /srv/shm/cache/dev/appDevDebugProjectContainer.php line 2356
at appDevDebugProjectContainer->getLuneticsLocale_LocaleListenerService() in /srv/http/---------/hosts/local.business.---------.nl/app/bootstrap.php.cache line 1974
at Container->get('lunetics_locale.locale_listener') in /srv/http/---------/hosts/local.business.---------.nl/vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/ContainerAwareEventDispatcher.php line 188
at ContainerAwareEventDispatcher->lazyLoad('kernel.request') in /srv/http/---------/hosts/local.business.---------.nl/vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/ContainerAwareEventDispatcher.php line 165
at ContainerAwareEventDispatcher->dispatch('kernel.request', object(GetResponseEvent)) in /srv/http/---------/hosts/local.business.---------.nl/app/bootstrap.php.cache line 2878
at HttpKernel->handleRaw(object(Request), '1') in /srv/http/---------/hosts/local.business.---------.nl/app/bootstrap.php.cache line 2863
at HttpKernel->handle(object(Request), '1', true) in /srv/http/---------/hosts/local.business.---------.nl/app/bootstrap.php.cache line 2992
at ContainerAwareHttpKernel->handle(object(Request), '1', true) in /srv/http/---------/hosts/local.business.---------.nl/app/bootstrap.php.cache line 2247
at Kernel->handle(object(Request)) in /srv/http/---------/hosts/local.business.---------.nl/web/app_dev.php line 30

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions