Skip to content
This repository was archived by the owner on Sep 10, 2024. It is now read-only.
This repository was archived by the owner on Sep 10, 2024. It is now read-only.

Warning thrown once maintenance file deleted #3

@mattattui

Description

@mattattui

With the PHP-FPM sapi (possibly with others), the PHP stat cache persists at least long enough that the realpath test in https://github.com/atst/stack-backstage/blob/master/src/Atst/StackBackstage.php#L21 will return true after the file is removed/renamed, resulting in the subsequent file_get_contents() call throwing an error.

I'm not sure what the best solution is. One is to clearstatcache(true, $this->path) just before realpath - but even though it's only clearing one file's realpath stats, it might still have a performance penalty.

Happy to submit a pull request if this solution is acceptable.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions