Skip to content

Fix for #2568#2586

Merged
akrabat merged 17 commits intoslimphp:3.xfrom
l0gicgate:3.x-RouterCacheFileImprovement
Feb 22, 2019
Merged

Fix for #2568#2586
akrabat merged 17 commits intoslimphp:3.xfrom
l0gicgate:3.x-RouterCacheFileImprovement

Conversation

@l0gicgate
Copy link
Member

@l0gicgate l0gicgate commented Feb 20, 2019

This is a fix for the logic for detecting if user provided router cache file is valid or not.

The following cases are valid:

  • If the directory is not writable, but the file already exists and is writable
  • If the directory is writable and the file specified does not exist

For the record, if you specify a file that doesn't exist, FastRoute will create it and populate it with the appropriate cache data.

This effectively closes #2568

The PR for the docs is here #334

@l0gicgate l0gicgate added this to the 3.13.0 milestone Feb 20, 2019
@coveralls
Copy link

coveralls commented Feb 20, 2019

Coverage Status

Coverage increased (+0.007%) to 97.832% when pulling b4e7bbf on l0gicgate:3.x-RouterCacheFileImprovement into e97d122 on slimphp:3.x.

@l0gicgate l0gicgate changed the title [WIP] Fix for #2568 Fix for #2568 Feb 20, 2019
]
);
}

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should rename this file now that it containers functions other than header functions. Maybe PhpFunctions.php?

@akrabat akrabat merged commit b4e7bbf into slimphp:3.x Feb 22, 2019
akrabat added a commit that referenced this pull request Feb 22, 2019
@l0gicgate l0gicgate deleted the 3.x-RouterCacheFileImprovement branch February 22, 2019 21:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Command for preparing route cache file

3 participants