Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[Process] Fix: Method can also return null #29702

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
Dec 28, 2018
Merged

Conversation

localheinz
Copy link
Contributor

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

This PR

  • adjusts a DocBlock and also provides a corresponding test that asserts that ExecutableFinder::find() may return null

@localheinz localheinz changed the title Fix: Method can also return null [Process] Fix: Method can also return null Dec 27, 2018
@fabpot
Copy link
Member

fabpot commented Dec 28, 2018

Thank you @localheinz.

@fabpot fabpot merged commit a7755f8 into symfony:3.4 Dec 28, 2018
fabpot added a commit that referenced this pull request Dec 28, 2018
This PR was merged into the 3.4 branch.

Discussion
----------

[Process] Fix: Method can also return null

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

This PR

* [x] adjusts a DocBlock and also provides a corresponding test that asserts that `ExecutableFinder::find()` may return `null`

Commits
-------

a7755f8 Fix: Method can also return null
@localheinz localheinz deleted the fix/null branch December 28, 2018 09:12
@localheinz
Copy link
Contributor Author

Thank you, @fabpot!

@@ -46,7 +46,7 @@ public function addSuffix($suffix)
* @param string $default The default to return if no executable is found
* @param array $extraDirs Additional dirs to check into
*
* @return string The executable path or default value
* @return string|null The executable path or default value
Copy link
Member

Choose a reason for hiding this comment

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

If I don't miss anything, this can only happen when $default is returned. We may have wanted to fix the param for this argument too then. ;)

Copy link
Contributor Author

@localheinz localheinz Jan 2, 2019

Choose a reason for hiding this comment

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

@xabbuh

Do you mean

diff --git a/src/Symfony/Component/Process/ExecutableFinder.php b/src/Symfony/Component/Process/ExecutableFinder.php
index ad2c76ab60..90cafa34e3 100644
--- a/src/Symfony/Component/Process/ExecutableFinder.php
+++ b/src/Symfony/Component/Process/ExecutableFinder.php
@@ -42,9 +42,9 @@ class ExecutableFinder
     /**
      * Finds an executable by name.
      *
-     * @param string $name      The executable name (without the extension)
-     * @param string $default   The default to return if no executable is found
-     * @param array  $extraDirs Additional dirs to check into
+     * @param string      $name      The executable name (without the extension)
+     * @param string|null $default   The default to return if no executable is found
+     * @param array       $extraDirs Additional dirs to check into
      *
      * @return string|null The executable path or default value
      */

?

Copy link
Member

Choose a reason for hiding this comment

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

Yes

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Adjusted with #29752!

@localheinz localheinz mentioned this pull request Jan 2, 2019
1 task
fabpot added a commit that referenced this pull request Jan 3, 2019
This PR was merged into the 3.4 branch.

Discussion
----------

[Process] Fix: Adjust DocBlock

| Q             | A
| ------------- | ---
| Branch?       | `3.4`
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | n/a
| License       | MIT
| Doc PR        | n/a

This PR

* [x] adjusts a DocBlock

Follows #29702 (comment).

Commits
-------

f8be46b Fix: Adjust DocBlock
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
Morty Proxy This is a proxified and sanitized view of the page, visit original site.