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

Use separated function to resolve command and related arguments #11497

Closed
wants to merge 1 commit into from

Conversation

JJK801
Copy link

@JJK801 JJK801 commented Jul 28, 2014

Hi,

This PR split command and related arguments resolution into two distinct functions.

It will help to solve the HHVM issue sensiolabs/SensioDistributionBundle#150 .

Thanks,

Jérémy

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

/**
* Finds The PHP executable arguments.
*
* @return string|false The PHP executable path or false if it cannot be found
Copy link
Contributor

Choose a reason for hiding this comment

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

The type and description are wrong ;)

@xabbuh
Copy link
Member

xabbuh commented Jul 28, 2014

Doesn't this have to be merged into the 2.3 branch since the SensioDistributionBundle can be used with older Symfony versions too?

@@ -64,4 +66,19 @@ public function find()

return $this->executableFinder->find('php', false, $dirs);
}

/**
* Finds The PHP executable arguments.
Copy link
Member

Choose a reason for hiding this comment

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

"The" should be lower-cased.

Copy link
Author

Choose a reason for hiding this comment

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

ok :) just a copy / paste of the previous comment line

@JJK801
Copy link
Author

JJK801 commented Jul 28, 2014

@xabbuh I took care not to cause BC break by adding a param to find() function

@acoquoin
Copy link

👍

@xabbuh
Copy link
Member

xabbuh commented Jul 28, 2014

@JJK801 But the findArguments() method of the PhpExecutableFinder class wouldn't be available if you didn't require the Process component in a higher version than 2.2.

{
// HHVM support
if (defined('HHVM_VERSION')) {
return (false !== ($hhvm = getenv('PHP_BINARY')) ? $hhvm : PHP_BINARY).' --php';
return (false !== ($hhvm = getenv('PHP_BINARY')) ? $hhvm : PHP_BINARY) . ($includeArgs ? ' '.$this->findArguments() : '' );
Copy link
Member

Choose a reason for hiding this comment

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

we don't add spaces around dots.

@stof
Copy link
Member

stof commented Aug 14, 2014

this should be covered by a test IMO

@JJK801
Copy link
Author

JJK801 commented Sep 1, 2014

@stof done ;)

@JJK801
Copy link
Author

JJK801 commented Sep 2, 2014

@fabpot is it ok to merge it ?

@fabpot
Copy link
Member

fabpot commented Sep 11, 2014

@JJK801 👍 This looks good to me know. However, can you rebase your PR on current master to remove the merge commit? Thanks.

@fabpot
Copy link
Member

fabpot commented Sep 11, 2014

This should be merged in 2.3 to be able to resolve sensiolabs/SensioDistributionBundle#150.

@fabpot
Copy link
Member

fabpot commented Sep 11, 2014

ping @symfony/deciders

@lsmith77
Copy link
Contributor

I guess under normal circumstances we wouldnt merge something like this into 2.3. but I guess it can be seen as a bug fix, rather than a new feature. also alternative language implementation compatibility issue are sort of a new category of issue to deal with.

@JJK801
Copy link
Author

JJK801 commented Sep 11, 2014

@lsmith77 👍

@JJK801
Copy link
Author

JJK801 commented Sep 11, 2014

@fabpot done, rebased and squashed

@fabpot
Copy link
Member

fabpot commented Sep 11, 2014

@lsmith77 So, is it a +1 from you?

@lsmith77
Copy link
Contributor

yes .. +1

@stof
Copy link
Member

stof commented Sep 11, 2014

👍

@fabpot
Copy link
Member

fabpot commented Sep 11, 2014

Thank you @JJK801.

fabpot added a commit that referenced this pull request Sep 11, 2014
…ments (JJK801)

This PR was submitted for the master branch but it was merged into the 2.3 branch instead (closes #11497).

Discussion
----------

Use separated function to resolve command and related arguments

Hi,

This PR split command and related arguments resolution into two distinct functions.

It will help to solve the HHVM issue sensiolabs/SensioDistributionBundle#150 .

Thanks,

Jérémy

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

Commits
-------

ee75af0 Use separated function to resolve command and related arguments
@fabpot fabpot closed this Sep 11, 2014
@JJK801
Copy link
Author

JJK801 commented Sep 11, 2014

@fabpot my pleasure

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.

None yet

7 participants