Description
Symfony version(s) affected: 5.0.7
Description
Each time on deploy, I keep receiving such warning:
Warning: include(.../releases/191/var/cache/prod/App_KernelProdContainer.php): failed to open stream: No such file or directory
How to reproduce
I have Symfony installation with default cache settings. It happens every deploy. So I guess it's enough to just make Symfony bootstrap with cold cache.
Possible Solution
The root and reason is in "include" without suppressing warning as several lines above.
I am going to create PR to fix it.
According to #25999 (comment) as stated in #26158 (comment) , I am going to replace file_exists
with the trick of suppressing warning on include as in https://github.com/symfony/symfony/blob/master/src/Symfony/Component/HttpKernel/Kernel.php#L431 , turning it into the reusable method.
Additional context
symfony/src/Symfony/Component/HttpKernel/Kernel.php
Lines 455 to 466 in 67948a7
Looks like regression of: #27234 .