Skip to content

[Process] Permit empty suffix on Windows #21613

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

Closed
wants to merge 1 commit into from
Closed

Conversation

Bilge
Copy link
Contributor

@Bilge Bilge commented Feb 14, 2017

Q A
Branch? master
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets
License MIT
Doc PR

It is a fallacy to assume the blank suffix is not applicable on Windows systems, especially in a world where we often emulate Linux systems with solutions such as CYGWIN, MinGW and MSYS.

@@ -75,7 +75,7 @@ public function find($name, $default = null, array $extraDirs = array())
$suffixes = array('');
if ('\\' === DIRECTORY_SEPARATOR) {
$pathExt = getenv('PATHEXT');
$suffixes = $pathExt ? explode(PATH_SEPARATOR, $pathExt) : $this->suffixes;
$suffixes = array_merge($suffixes, $pathExt ? explode(PATH_SEPARATOR, $pathExt) : $this->suffixes);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Here we are merging the Windows suffixes with the previously-defined empty suffix on line 75, instead of overwriting the empty suffix list as previously.

@Bilge Bilge changed the title Permit empty suffix on Windows [Process] Permit empty suffix on Windows Feb 14, 2017
@fabpot
Copy link
Member

fabpot commented Feb 16, 2017

Thank you @Bilge.

fabpot added a commit that referenced this pull request Feb 16, 2017
This PR was submitted for the master branch but it was merged into the 2.7 branch instead (closes #21613).

Discussion
----------

[Process] Permit empty suffix on Windows

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets |
| License       | MIT
| Doc PR        |

It is a fallacy to assume the blank suffix is not applicable on Windows systems, especially in a world where we often emulate Linux systems with solutions such as CYGWIN, MinGW and MSYS.

Commits
-------

412db4c Permit empty suffix on Windows
@fabpot fabpot closed this Feb 16, 2017
@Bilge
Copy link
Contributor Author

Bilge commented Feb 16, 2017

Thank you @fabpot 👍

@fabpot fabpot mentioned this pull request Feb 17, 2017
This was referenced Mar 6, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants