Skip to content

[Console] Clear Cache Bug in Windows #5008

Closed
@nexik

Description

@nexik

Hi

Clear Cache in windows throw ErrorException because of Access Denied of cache folders.

CacheClearCommand use php method rename, which one not work properly in windows.

From Comments at http://php.net/manual/en/function.rename.php:

rename() is working on Linux/UNIX but not working on Windows on a directory containing a file 
formerly opened within the  same script. The problem persists even after properly closing the 
file and flushing the buffer.

Strangely it seem that the rename command is  executed BEFORE the handle closing on Windows.
Inserting a sleep() command before the renaming cures the problem."

I added sleep(1) before every rename() and everythings now works perfectly fine.

My question: Does the Symfony support Windows OS? If yes I could add Pull Request.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions