Problems with lib-icu dependency when installing Symfony 2.3.x via Composer

Problems with lib-icu dependency when installing Symfony 2.3.x via Composer

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

Stefan Bogdanescu

Founder & Senior Architect

Problems with lib-icu dependency when installing Symfony 2.3.x via Composer

Upgrading from a stable Symfony version like 2.2.x to 2.3.0-RC1 often reveals hidden system dependencies that aren't immediately obvious from the framework's documentation. While composer create-project works seamlessly for older releases, newer iterations introduce stricter requirements regarding external C libraries. Specifically, the transition to Symfony 2.3.x triggers a hard dependency on lib-icu (International Components for Unicode). If your operating system lacks this library or if PHP isn't correctly configured to expose it, Composer will fail with a resolution error before it even attempts to download the framework code.

When attempting to create a new project with version 2.3.0-RC1, you might encounter an error message stating that symfony/icu requires lib-icu >= 4.4 (or >= 3.8 for earlier ICU versions of Symfony). The error explicitly suggests checking the system library and ensuring the extension providing it is installed. This isn't a Composer bug; it's a manifestation of PHP's Internationalization (Intl) extension, which relies on the underlying C library to function.

The Missing Link: PHP Intl Extension

The core issue is that the PHP intl extension is not universally enabled by default in all development environments. While PHP 5.3 and later distributions include the intl extension in their source code, it is frequently disabled or absent in specific setups. Common scenarios where this occurs include local development servers like MAMP on macOS, certain minimal Linux images, or custom LAMP stacks where only core extensions are enabled to reduce memory footprint.

To resolve the Composer installation failure, you must first ensure the intl extension is compiled and loaded. If you are using a distribution like MAMP that does not ship with the PHP source pre-compiled with these extensions, you need to acquire them manually. The standard approach involves using PEAR (PHP Extension and Application Repository) to install the necessary PECL packages.

Run the following command in your terminal:

pear install pecl/intl

If your environment hasn't added the pear channel yet, you may need to run pear config-set auto_discover 1 first, or manually add the channel as instructed in relevant system documentation.

Configuring php.ini

Installing the extension package is only half the battle; you must also ensure it is loaded at runtime. The intl extension modifies the behavior of date/time formatting and locale-specific operations used heavily by Symfony. If you installed via MAMP or a similar tool, you likely have multiple PHP versions or configurations.

You need to manually add extension=intl.so to your active php.ini file. In MAMP, this is easily accessible via the menu: File > Edit Template > php.[version].ini. Locate the file corresponding to the PHP version used by your project and append the directive near the top or bottom of the configuration block.

Addressing CLI vs. Web Server Discrepancies

A frequent pitfall occurs when you can access the application via a web server but fail when running Composer commands from the terminal, or vice versa. This happens because the CLI (Command Line Interface) and the Web Server often utilize different php.ini files.

To verify which configuration file your CLI is using, run:

php -i | grep php\.ini

If this path differs from the one you edited in MAMP or your web server's directory, you must add extension=intl.so to that specific CLI configuration file as well. You can confirm the extension is successfully loaded by running:

php -m

Look for intl in the list of available modules. If it is missing, Composer will continue to complain about the unresolvable requirements for symfony/symfony.

Why This Matters

This dependency highlights a significant shift in how modern PHP frameworks handle internationalization. Symfony 2.3.x and later versions utilize the ICU library for robust date, time, number, and locale handling. Without the underlying C library (lib-icu) and the PHP bridge (intl), these features cannot function, leading to fatal errors or installation failures.

If you are using a managed hosting provider or a shared environment where you cannot modify php.ini, you may need to contact your host to enable the intl extension before attempting any project upgrades. Alternatively, some hosts allow you to request specific extensions via a control panel ticket. For local development, however, manually installing and configuring the extension ensures that your stack matches production requirements, preventing unexpected deployment issues later.

For developers managing multiple projects or upgrading legacy applications, always verify the enabled modules in your php.ini before running Composer operations on newer Symfony versions. This simple check can save hours of debugging unrelated logic errors caused by a missing system dependency.

Our network