Skip to content

symfony/filesystem:v5.1.9 dumpFile throws always Exception "No such file or directory" #39291

Closed
@ynnoig

Description

@ynnoig

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions