Add fallback to curl when allow_url_open is disabled; error if curl not available.#1608
Add fallback to curl when allow_url_open is disabled; error if curl not available.#1608instancezero wants to merge 10 commits intoPrestaShop:devfrom
Conversation
instancezero
commented
Jan 21, 2026
| Questions | Answers |
|---|---|
| Description? | Fallback to curl when retrieving update list; detect when curl is also missing. |
| Type? | bug fix |
| BC breaks? | no |
| Deprecations? | no |
| Fixed ticket? | Fixes #1562 |
| Sponsor company | Abivia Inc. @abivia |
| How to test? | Run update assistant when allow_url_fopen is off, verify update list is retrieved (I have tested this on a live system but haven't rebuilt a PHP with no curl, just handling the edge case here.) |
…s also not available.
|
Thanks @instancezero, would it be possible to export this code in a dedicated method? The change could be in |
It is possible. Can you suggest a method name? Another option would be to make the |
…l not allowed; have DistributionApiService::getApiEndpoint use this method. Resolves issue PrestaShop#1608.
We can use something like "fetchContents" or "getContents" to distinguish them from the method |
|
I thought about this some more and came to the same conclusion about modifying I also neglected to mention that the latest commit implements |
…date DistributionApiService::getApiEndpoint() to catch the exception and throw a DistributionApiException. Add tests. Re issue PrestaShop#1608.
…date DistributionApiService::getApiEndpoint() to catch the exception and throw a DistributionApiException. Add tests. Re issue PrestaShop#1608.
…date DistributionApiService::getApiEndpoint() to catch the exception and throw a DistributionApiException. Add tests. Re issue PrestaShop#1608.
… unit test. Re issue PrestaShop#1608.
|
Excellent, if you can rebase your branch to solve the conflict, we should be good to go |
|
That should do it... |
|
Thank you for your PR, unfortunately, this one is still in conflict. Even without this conflict, I was able to test the PR and we get a 500 error even when we have allow_url_fopen = On, as you can see : Capture.video.du.2026-02-03.12-11-54.mp4You can see that all CI is red because of this issue Waiting for feedback |
|
I'll take a look. The issue is the change to the constructor, which is breaking other parts of the code. |
|


