Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for #2568 #2586

Merged
merged 17 commits into from Feb 22, 2019
Merged

Fix for #2568 #2586

merged 17 commits into from Feb 22, 2019

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
Slim/Router.php Outdated Show resolved Hide resolved
Slim/Router.php Outdated Show resolved Hide resolved
Slim/Router.php Outdated Show resolved Hide resolved
@@ -57,3 +57,31 @@ function header($string, $replace = true, $statusCode = null)
]
);
}

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