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

Missing ext-http extension #72

Open
LocalHeroPro opened this issue May 14, 2021 · 10 comments
Open

Missing ext-http extension #72

LocalHeroPro opened this issue May 14, 2021 · 10 comments

Comments

@LocalHeroPro
Copy link

LocalHeroPro commented May 14, 2021

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
Copy link
Owner

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
Copy link
Author

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
Copy link
Author

Found it.
image

@lorisleiva
Copy link
Owner

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
Copy link
Author

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
Copy link
Author

Bumpt.

@lorisleiva
Copy link
Owner

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

@ahmedch1
Copy link

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

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

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`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants