Skip to content

Runtime::getRawBinary()#72

Closed
staabm wants to merge 3 commits intosebastianbergmann:mainfrom
staabm:patch-1
Closed

Runtime::getRawBinary()#72
staabm wants to merge 3 commits intosebastianbergmann:mainfrom
staabm:patch-1

Conversation

@staabm
Copy link
Copy Markdown
Contributor

@staabm staabm commented Mar 23, 2024

to pass a command in array-notation to proc_open we need it in a raw form. the escaping happens by php-src itself

refs sebastianbergmann/phpunit#5749 (comment)

Comment thread src/Runtime.php
*/
public function getBinary(): string
{
return escapeshellarg($this->getRawBinary());
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

after this change even the hardcoded 'php' (line 126) is passed thru escapeshellarg, which wasn't the case before.

tested locally on my macos, that this still works as expected

@staabm
Copy link
Copy Markdown
Contributor Author

staabm commented Mar 23, 2024

looking at phpunit 10.5 I need this change in the next 6.x release to be useful

@sebastianbergmann
Copy link
Copy Markdown
Owner

sebastianbergmann commented Mar 23, 2024

looking at phpunit 10.5 I need this change in the next 6.x release to be useful

Then this should target the 6.0 branch :)

@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 23, 2024

Codecov Report

Attention: Patch coverage is 80.00000% with 1 lines in your changes are missing coverage. Please review.

Project coverage is 56.77%. Comparing base (e855a4b) to head (7c0c4fc).

Files Patch % Lines
src/Runtime.php 80.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main      #72      +/-   ##
============================================
+ Coverage     55.17%   56.77%   +1.60%     
- Complexity       67       68       +1     
============================================
  Files             2        2              
  Lines           116      118       +2     
============================================
+ Hits             64       67       +3     
+ Misses           52       51       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@sebastianbergmann
Copy link
Copy Markdown
Owner

I will create a 6.1 branch and cherry-pick this.

@staabm
Copy link
Copy Markdown
Contributor Author

staabm commented Mar 23, 2024

I will create a 6.1 branch and cherry-pick this.

thank you

@sebastianbergmann sebastianbergmann changed the title Added Runtime->getRawBinary() Runtime::getRawBinary() Mar 23, 2024
@sebastianbergmann
Copy link
Copy Markdown
Owner

I have created the 6.1 branch (and delete the 6.0 branch), merged your changes, and tagged 6.1.0. Took a while longer than expected as I had to write about something ;-)

Next step: merge to main and tag 7.1.0 for PHPUnit 11.

@staabm staabm deleted the patch-1 branch March 23, 2024 08:59
@sebastianbergmann
Copy link
Copy Markdown
Owner

7.1.0 has been tagged and composer.lock was updated on the 10.5, 11.0, and main branches of PHPUnit.

@staabm
Copy link
Copy Markdown
Contributor Author

staabm commented Mar 23, 2024

Thanks. No hurry I am afk until later today

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.

2 participants