-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
HttpClientDataCollector fails if proc_open is disabled via php.ini #58700
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
Labels
Comments
Ah indeed. The fix should be this: if ($useProcess ??= function_exists('proc_open') && class_exists(Process::class)) { Can you please send a PR targetting branch 5.4? |
Great, thanks for the feedback! I'll gladly prepare the PR later today |
ZaneCEO
added a commit
to ZaneCEO/symfony
that referenced
this issue
Oct 29, 2024
The function is not present in: It looks like it was introduced in 6.3 I submitted the PR |
nicolas-grekas
added a commit
that referenced
this issue
Oct 30, 2024
…_open is disabled via php.ini (ZaneCEO) This PR was merged into the 6.4 branch. Discussion ---------- [HttpClient] fix for HttpClientDataCollector fails if proc_open is disabled via php.ini | Q | A | ------------- | --- | Branch? | 6.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | Issues | Fix #58700 | License | MIT [HttpClientDataCollector::escapePayload](https://github.com/symfony/symfony/blob/7.1/src/Symfony/Component/HttpClient/DataCollector/HttpClientDataCollector.php#L256) creates a `new Process()` -> it fails if `proc_open` is disabled: > The Process class relies on proc_open, which is not available on your PHP installation. #58700 Commits ------- e28af34 [HttpClient] Fix Process-based escaping in HttpClientDataCollector 48980a2 fix for HttpClientDataCollector fails if proc_open is disabled via php.ini . Closes #58700
symfony-splitter
pushed a commit
to symfony/http-client
that referenced
this issue
Oct 30, 2024
…_open is disabled via php.ini (ZaneCEO) This PR was merged into the 6.4 branch. Discussion ---------- [HttpClient] fix for HttpClientDataCollector fails if proc_open is disabled via php.ini | Q | A | ------------- | --- | Branch? | 6.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | Issues | Fix #58700 | License | MIT [HttpClientDataCollector::escapePayload](https://github.com/symfony/symfony/blob/7.1/src/Symfony/Component/HttpClient/DataCollector/HttpClientDataCollector.php#L256) creates a `new Process()` -> it fails if `proc_open` is disabled: > The Process class relies on proc_open, which is not available on your PHP installation. symfony/symfony#58700 Commits ------- e28af345004 [HttpClient] Fix Process-based escaping in HttpClientDataCollector 48980a2f05a fix for HttpClientDataCollector fails if proc_open is disabled via php.ini . Closes #58700
nicolas-grekas
added a commit
that referenced
this issue
Oct 30, 2024
* 6.4: [HttpClient] Fix Process-based escaping in HttpClientDataCollector fix for HttpClientDataCollector fails if proc_open is disabled via php.ini . Closes #58700 Bump Symfony version to 6.4.14 Update VERSION for 6.4.13 Update CHANGELOG for 6.4.13 Bump Symfony version to 5.4.46 Update VERSION for 5.4.45 Update CONTRIBUTORS for 5.4.45 Update CHANGELOG for 5.4.45
nicolas-grekas
added a commit
that referenced
this issue
Oct 30, 2024
* 7.1: [HttpClient] Fix Process-based escaping in HttpClientDataCollector fix for HttpClientDataCollector fails if proc_open is disabled via php.ini . Closes #58700 Bump Symfony version to 7.1.7 Update VERSION for 7.1.6 Update CHANGELOG for 7.1.6 Bump Symfony version to 6.4.14 Update VERSION for 6.4.13 Update CHANGELOG for 6.4.13 Bump Symfony version to 5.4.46 Update VERSION for 5.4.45 Update CONTRIBUTORS for 5.4.45 Update CHANGELOG for 5.4.45
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Symfony version(s) affected
7.1.6
Description
HttpClientDataCollector::escapePayload creates a
new Process()
-> it fails ifproc_open
is disabled:How to reproduce
Possible Solution
escapePayload could be modified to avoid
new Process()
and generate the command in-place.Additional Context
escapePayload is called only if the request has either a json content or a body.
The text was updated successfully, but these errors were encountered: