-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
In Kernel.php line 704: [ErrorException] Warning: unlink(/home/dev/prj/var/cache/de_/ContainerNipRDo8.legacy) #26158
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
You must turn off the xdebug.scream PHP.ini setting. |
This is intentioned? How can we use xdebug to debug our application when developing with this silenced functions? xdebug.scream = 1 Cause Symfony unable to use when developing... Thanks! |
you don't need xdebug.scream, silenced errors are already reported in log files and in the "log" profiler panel |
But this is not flexible, we need to upgrade the error reporting level, the A forced Exception is our current solution in 2.8 and works great as expected, with a new project of 4.0 this is not possible. The tab 'log' panel doesn't show an exception to the programmer, is only a simple logline that nobody reads. There is a setting to enable exceptions for the π€ |
this is PHP, the silencing operator is mandatory in some situations, this is one of them, there are more, mostly related to filesystem functions |
@lemenendez proposed a solution for this, but you close the issue. I'm really sorry if I sound rude but there is a lot of checks to solve the usage of Is for performance reasons? Ok, but the container only compiles at once, so the use of file_exists in favor of removing the bad Anyway is your framework, your rules (community?). Any help here is welcome, we never use the Thanks anyway. |
Maybe wrapping this one in a |
50% agree, with OPCache file exists only reads in memory. But with new requirements for 4.0 this issue make no sense! Many thanks @nicolas-grekas! |
Uh oh!
There was an error while loading. Please reload this page.
In some cases the @ unlink php function breaks the execution of the code instead of returning false.
I am using php 7.2
When was trying to use the console, suddendly I start getting errors about the imposibily to @ unlink a certain file under the cache folder because it does not exists.
So what I did was to modify these lines of code in order to use the console
Kernel.php
instead of @Unlink(dirname($dir.$file).'.legacy');
line: 703
if (file_exists(dirname($dir.$file).'.legacy')) @Unlink(dirname($dir.$file).'.legacy');
Filesystem.php 184
elseif (file_exists($file) && !@Unlink($file) )
Checking the file befor unlink did the trick in both cases
The text was updated successfully, but these errors were encountered: