Skip to content

[Process] Fix incorrectly calling PHP process when path contains space #22613

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

Merged
merged 1 commit into from
May 15, 2017
Merged

Conversation

maryo
Copy link
Contributor

@maryo maryo commented May 2, 2017

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

I have PHP installed at "D:\Program Files\PHP" which contains a space. PhpExecutableFinder found it but then PhpProcess splitted the path by space. This PR fixes it. I wanted to write a test but I don't know ho to do it properly since it is dependent on the location where PHP is installed and I can't even mock PhpExecutableFinder because it is hardcoded dependency and an implementation detail.

@maryo maryo changed the title Fix incorrectly calling PHP process on Windows when path contains space [Process] Fix incorrectly calling PHP process when path contains space May 2, 2017
@nicolas-grekas nicolas-grekas added this to the 3.3 milestone May 15, 2017
@nicolas-grekas
Copy link
Member

Thank you @maryo.

@nicolas-grekas nicolas-grekas merged commit 9c08109 into symfony:master May 15, 2017
nicolas-grekas added a commit that referenced this pull request May 15, 2017
…ntains space (maryo)

This PR was merged into the 3.3-dev branch.

Discussion
----------

[Process] Fix incorrectly calling PHP process when path contains space

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

I have PHP installed at "D:\Program Files\PHP" which contains a space. `PhpExecutableFinder` found it but then `PhpProcess` splitted the path by space. This PR fixes it. I wanted to write a test but I don't know ho to do it properly since it is dependent on the location where PHP is installed and I can't even mock `PhpExecutableFinder` because it is hardcoded dependency and an implementation detail.

Commits
-------

9c08109 Fix incorrectly calling PHP process on Windows when path contains space
@fabpot fabpot mentioned this pull request May 17, 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