Description
Symfony version(s) affected
7.0.7
Description
This happens me for url_matching_routes.php and url_matching_routes.php.meta runing a functional test locally and in CI.
It is produced via the Router.php component where the dumper write the config. The file is written and dumped, but it seems that at some point is issuing that warning.
I dont know if could be related with with eval code in route annotations similar to doctrine annotations bug.
This code in Router has more than 9 years and 5 years from Symfony 4.1, so I think that could be related to some eval code interpreted
Also, could be something wrong at $filesystem->dumpFile() where only 2 weeks ago new changes where introduced, it seems not applied to PHP 7.0.X
Example trace:
Error: [2] fileperms(): stat failed for /tmp/myproject-664f54b8405ce/url_matching_routes.php.meta - File:vendor/symfony/filesystem/Filesystem.php - Line:665
Trace:
File: vendor/symfony/filesystem/Filesystem.php, Line: 665, Function: fileperms
File: vendor/symfony/config/ResourceCheckerConfigCache.php, Line: 123, Function: dumpFile
File: vendor/symfony/routing/Router.php, Line: 227, Function: write
File: vendor/symfony/config/ResourceCheckerConfigCacheFactory.php, Line: 36, Function: Symfony\Component\Routing\{closure}
File: vendor/symfony/routing/Router.php, Line: 218, Function: cache
File: vendor/symfony/routing/Router.php, Line: 184, Function: getMatcher
File: vendor/symfony/http-kernel/EventListener/RouterListener.php, Line: 105, Function: matchRequest
File: vendor/symfony/event-dispatcher/Debug/WrappedListener.php, Line: 116, Function: onKernelRequest
File: vendor/symfony/event-dispatcher/EventDispatcher.php, Line: 206, Function: __invoke
File: vendor/symfony/event-dispatcher/EventDispatcher.php, Line: 56, Function: callListeners
File: vendor/symfony/event-dispatcher/Debug/TraceableEventDispatcher.php, Line: 127, Function: dispatch
File: vendor/symfony/http-kernel/HttpKernel.php, Line: 154, Function: dispatch
File: vendor/symfony/http-kernel/HttpKernel.php, Line: 76, Function: handleRaw
File: vendor/symfony/http-kernel/Kernel.php, Line: 185, Function: handle
File: vendor/symfony/http-kernel/HttpKernelBrowser.php, Line: 61, Function: handle
File: vendor/symfony/framework-bundle/KernelBrowser.php, Line: 157, Function: doRequest
File: vendor/symfony/browser-kit/AbstractBrowser.php, Line: 369, Function: doRequest
File: tests/Folder/Test.php, Line: 209, Function: request
How to reproduce
Use Symfony 7.0.7 with a test which generate routes cache files.
Possible Solution
Merge fix into 7.0.x series
Additional Context
No response