Closed
Description
Symfony version(s) affected: symfony/filesystem:v5.1.9
Description
The finally statement here is always executed from php.
This cause that for every dumpFile method call throws an exception "No such file or directory".
This because here the rename function overwrite the tmpFile in filename and the tmpFile at this moment does not exists more.
How to reproduce
$this->filesystem->dumpFile( $this->targetDirectory . DIRECTORY_SEPARATOR . $fileName, $content );
Possible Solution
Maybe just a catch instead a finally statement?
Additional context
Nothing.