8000 #25187 Lookup php binary in PHP_BINDIR first by Deltachaos · Pull Request #25188 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

#25187 Lookup php binary in PHP_BINDIR first #25188

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

Conversation

Deltachaos
Copy link
Contributor
Q A
Branch? 2.8
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets #25187
License MIT

Refactored Symfony\Component\Process\ExecutableFinder. Reusing Symfony\Component\Process\ExecutableFinder::findIn in Symfony\Component\Process\PhpExecutableFinder::find to fix #25187.

@@ -23,6 +23,8 @@ class ExecutableFinder

/**
* Replaces default suffixes of executable.
*
* @param array $suffixes
Copy link
Member

Choose a reason for hiding this comment

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

This can be removed as all the information are already part of the method signature.

@nicolas-grekas
Copy link
Member

Since this change is for a bugfix-only branch, I think the patch should be reduced to the strict minimum.
Refacto are only for master.

if ('\\' === DIRECTORY_SEPARATOR) {
$dirs[] = 'C:\xampp\php\\';
}

$name = 'php';
foreach (array('', '.exe', '.bat', '.cmd', '.com') as $suffix) {
Copy link
Member

Choose a reason for hiding this comment

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

reading this, it feels like this logic belongs to the "executableFinder", isn't it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, i had changed the executable finder component first to allow looking for executables ONLY in given direcories (currently it is only able to use the given directories as fallback if the executable is not found in the environment path), but you said that it should be reduced to the strict minimum. So the question is: Where should we out this functionality for the bugfix? In long term it would make sense to extend the executable finder with this functionality.

@nicolas-grekas
Copy link
Member

Closing in favor of #26040, thank you @Deltachaos

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.

4 participants
0