Composer update: The requested PHP extension ext-http missing

Composer update: The requested PHP extension ext-http missing

  1. Blog
  2. 15 November 2026
  3. 4 min read

Stefan Bogdanescu

Founder & Senior Architect

Composer update: The requested PHP extension ext-http missing

When running composer update or attempting to install a new dependency like symfony/swiftmailer-bundle, you might encounter an error stating that the ext-http extension is missing from your system. This message often appears alongside a generic "requirements could not be resolved" alert, leaving developers unsure if they need to manually hunt down a file or configure a setting.

The root cause here is straightforward but can be confusing: one of your dependencies requires a PHP extension that isn't currently loaded in your runtime environment. In this specific case, the ext-http extension is needed for HTTP client functionality, which modern Symfony bundles rely on for sending emails or making API requests.

Why the error appears

Modern Composer packages often declare their dependencies not just as other PHP libraries, but as specific PHP extensions. When you install a package that depends on ext-http, Composer checks your active PHP installation to see if that extension is loaded. If it's not found in the list of loaded extensions, or if it hasn't been compiled into PHP's core, the resolution fails immediately.

In the scenario described with Symfony 4.2.3 and PHP 7.3.2 on Windows 10, the issue arises because ext-http is not part of the standard PHP distribution for that version. Unlike some extensions that come bundled or are compiled directly into the PHP binary, others require separate installation or enabling.

How to resolve the issue

The solution involves locating and enabling the extension file. Since you mentioned checking php.ini without success, it's likely the extension exists but isn't enabled, or it hasn't been installed yet depending on your PHP build method.

1. Check for the extension file

On Windows, PHP extensions are typically .dll files located in the ext directory of your PHP installation. You need to find a file named something like http.dll.

If you have the PECL extension manager installed or if you downloaded a standalone PHP build that supports optional extensions, look for http.dll in the php\ext folder. If the folder doesn't exist or the file is missing, your current PHP installation might be a "core" build that excludes optional extensions to reduce size.

2. Enable the extension

Once you locate http.dll, you must add it to your configuration. Open your php.ini file (or create a new extra.ini in the same directory if you prefer not to modify the main config) and add the following line:

extension=http

Note that while the DLL might be named http.dll, the directive in php.ini is usually just extension=http. After adding this line, restart your PHP server or run php -m again to verify that http now appears in the list of loaded modules.

3. Verify with CLI

Before running Composer again, confirm the fix from the command line:

php -m | findstr http

If this returns http, the extension is loaded. Then retry your original command:

composer update

or

composer require symfony/swiftmailer-bundle

Trade-offs and considerations

Enabling optional extensions like ext-http increases the memory footprint slightly and adds dependencies to your PHP runtime. If you are running on a constrained environment, such as a shared host with limited resources, ensure that enabling this extension doesn't push you over any limits.

However, for most local development environments like Windows 10 with PHP 7.3, the impact is negligible. The trade-off is primarily about functionality: you gain the ability to use modern Symfony components that rely on HTTP client features without needing to implement low-level cURL workarounds or mock services during development.

Alternative approaches

If finding and enabling http.dll proves difficult on your specific PHP build, consider switching to a PHP distribution that includes all common extensions out of the box. Alternatively, you could upgrade your PHP version if supported by your project, as newer versions often have better extension support or bundling practices. Some developers prefer using Docker with a pre-configured image that includes necessary extensions to avoid manual configuration issues on Windows.

In cases where upgrading PHP isn't an option, some legacy projects might use alternative HTTP clients bundled within the application itself (like Guzzle) rather than relying on ext-http, though this requires adjusting your dependency tree and may not be compatible with Symfony 4.x core components.

Our network