lorisleiva / laravel-docker

🐳 Generic docker image for Laravel Applications
MIT License
927 stars 313 forks source link

Missing ext-http extension #72

Open LocalHeroPro opened 3 years ago

LocalHeroPro commented 3 years ago

I get missing ext-http extension

+ php composer.phar install --prefer-dist --no-ansi --no-interaction --no-progress --no-scripts --optimize-autoloader
Installing dependencies from lock file (including require-dev)
Verifying lock file contents can be installed on current platform.
Your lock file does not contain a compatible set of packages. Please run composer update.
  Problem 1
    - Root composer.json requires PHP extension ext-http * but it is missing from your system. Install or enable PHP's http extension.

on lorisleiva/laravel-docker:latest

lorisleiva commented 3 years ago

Hi there 👋

Is that an error you did not get before upgrading to latest?

I don't think Laravel Docker ever included the ext-http extension as it's not a prerequisite for Laravel.

Did you perhaps recently install a package that require that extension? If so could you tell me which one so I see if Laravel Docker could benefit from this extension.

Thank you for your help.

LocalHeroPro commented 3 years ago

Right now I don't see from where PhpStorm tells me to add that extension to compose.json. Workaround for me is something like this: http://5.9.10.113/61999796/how-to-add-ext-http-in-dockerfile But unfortunately before_script doesn't exist on BB pipeline, so I can' install it manually ;/

LocalHeroPro commented 3 years ago

Found it. image

lorisleiva commented 3 years ago

Oh IIRC that's just a warning to be explicit in declaring your usage of ext-http. Simply adding "ext-http": "*" to your project's composer.json should do the trick.

LocalHeroPro commented 3 years ago

When I add that extension, your doker image don't work, because their is missing that extension and composer don't pass installation because of missing docker dependencies.

LocalHeroPro commented 2 years ago

Bumpt.

lorisleiva commented 2 years ago

Hi there 👋 I'm happy to accept a PR for this for all current versions of PHP supported.

ahmedch1 commented 9 months ago

Oh IIRC that's just a warning to be explicit in declaring your usage of ext-http. Simply adding "ext-http": "*" to your project's composer.json should do the trick.

I am working on other project using Symfony 5.4 , the warning on phpstorm disappears when I approve the mentionned , add 'ext-http'; Thanks

Qasim-Aziz commented 1 month ago

facing same problem in docker

` Problem 1

13 2.251 - Root composer.json requires PHP extension ext-http * but it is missing from your system. Install or enable PHP's http extension.`

Qasim-Aziz commented 1 month ago

this script make it working https://stackoverflow.com/questions/59867951/docker-how-to-install-php-7-4-extension-ext-http

`ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/

RUN chmod +x /usr/local/bin/install-php-extensions && sync && \ install-php-extensions http`