Closed
Description
Symfony version(s) affected: 5.1.9
Description
On our project we have a custom error handler that shows all errors, even ignored one.
With this update symfony/filesystem@v5.1.8...v5.1.9 we try to unlink temporary file in any case, even if it was successfully renamed.
Because we have this custom error handler, now we get an error every time we try to dump a file.
How to reproduce
Update symfony/filesystem to at least version 5.1.9. Try to dump file via Filesystem;
Possible Solution
We can use catch (Throwable $e) { @unlink($tmpFile); throw $e;}
instead of finally
block