I am creating a php website using the symfony framework and composer.
When I try to do compose update
inside the projects folder or when I try to install a bundle using composer require symfony/swiftmailer-bundle
I get the following error:
Your requirements could not be resolved to an installable set of packages. Problem 1 - The requested PHP extension ext-http * is missing from your system. Install or enable PHP's http extension.
(It says 'Problem 1', but it is the only problem listed.)
I already looked for the extension in my php.ini file, but I can't find it. Do I need to install an extension manually? If so, where can I find it?
Thanks in advance!
Update: It might be worth looking at the other answers too. Since I'm no longer working with PHP, I'm not going to set up a project and try to recreate the problem I had just to test the new suggested solutions. If another answer did help you, give it a vote '^' this way I know which answers are useful. As soon as one has more votes than this one I'll mark it as the solution.
The solution is found. For some reason my composer.json
contained "ext-http": "*"
.
"require": { "ext-http": "*" }
Removing this line fixed the problem. I don't know why it contained "ext-http": "*"
and I don't fully understand why removing it would fix the problem. (Is it because it is looking for the extension, but can not find it?)
(Thank you to everyone trying to help me fix the problem!)
php-http
is a standard which is implemented by different packages. ext-http
is the Composer way to tell that your application requires at least one of those packages. See the section called "Composer virtual packages" at http://docs.php-http.org/en/latest/clients.html for additional details.
Differently than other packages, the ext-...
lines do not actually install anything via composer, they just make composer check that you have some required dependency. Usually you can just install the corresponding PHP library, e.g. ext-zip
means that you need to install php-zip
. In this case, there is no single PHP library but a series of compatible libraries.
You should be able to fix your issue by installing one of the provided packages, e.g.
composer require php-http/curl-client
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With