Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The PHP PATH_INFO is a well established although not often used mechanism, supported by most webserver, and even when it is not supported it is patchable so that it works.
You can add data after the base url and before the GET parameters. When you call a page like this
path/to/page.php/some/path/info?parameter=value
PHP will put the string 'some/path/info' into $_SERVER['PATH_INFO].
Without this patch Valet tries to find the file path/to/page.php/some/path/info on disk, without finding it and returning a 404.
The patch removes the PATH_INFO string from $_SERVER['REQUEST_URI'] at the very beginning of server.php so Valet can find the correct file, then recovers the original $_SERVER['REQUEST_URI'] just before the final require.
Although the PATH_INFO mechanism is not often known and used, it is sometimes useful and there is no reason not to follow PHP on this, by failing to include the correct file.