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

Runtime::getRawBinary() #72

Closed
wants to merge 3 commits into from
Closed

Conversation

staabm
Copy link
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)

*/
public function getBinary(): string
{
return escapeshellarg($this->getRawBinary());
Copy link
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
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
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 :)

Copy link

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
Owner

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

@staabm
Copy link
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
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
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
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.

None yet

2 participants