The requested PHP extension intl is missing from your system (SonataAdminBundle) in Symfony2

The requested PHP extension intl is missing from your system (SonataAdminBundle) in Symfony2

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

Stefan Bogdanescu

Founder & Senior Architect

Resolving Missing PHP Extension intl Errors in SonataAdminBundle

When attempting to install sonata-project/intl-bundle version 2.1.0 or its dependencies, Composer will often halt execution with a clear but unhelpful requirement resolution failure. The error message explicitly states: the requested PHP extension intl is missing from your system. This indicates that the target PHP binary lacks the Internationalization (intl) extension required by the bundle's minimum dependency constraints.

The core issue lies in the fact that modern Sonata bundles rely heavily on ext-intl for locale-aware date formatting, number parsing, and currency handling. Without this extension active, the application cannot perform these critical localization tasks. However, simply seeing the error does not mean you need to reinstall PHP immediately; it usually means the extension is available in your package repository but not compiled into or enabled for your specific PHP installation.

Installing the Extension via Package Manager

The most straightforward solution involves installing the missing dependency using your operating system's package manager. The commands vary depending on your Linux distribution, but the goal remains consistent: ensure php-intl is present and loaded at runtime.

For Debian-based systems like Ubuntu, execute the following command in your terminal:

sudo apt-get install php-intl

On RedHat-based systems such as CentOS or Fedora, the equivalent command is:

sudo yum install php-intl
# or
sudo dnf install php-intl

After installation, you must verify that the extension has been successfully loaded. Run the following command to check the status of all enabled PHP extensions:

php -m | grep intl

If this returns intl without error, the system-level package manager has correctly installed and enabled the module. However, on many modern setups, installing the system package does not automatically enable the extension in your PHP configuration file (php.ini). You may need to manually edit the configuration or create an override file to ensure the loader directive is active.

Configuring php.ini

If the php -m check fails despite the package being installed, the extension is likely present but disabled. Locate your active php.ini file, which might be a copy in /etc/php/8.x/apache2/, /etc/php/8.x/cli/conf.d/, or a custom path defined by your web server configuration.

Add the following line to the end of the file:

extension=intl

Alternatively, if you are using php.ini-development as a template, ensure this line is uncommented. Once modified, restart your web server or reload PHP-FPM for the changes to take effect. If you are using Docker or a specific PHP binary path (e.g., /usr/bin/php81), ensure that the configuration file corresponds to that specific version and binary path.

Composer Cache and Lock File Issues

In some cases, particularly when switching between different PHP versions or environments, Composer may cache previous dependency resolution attempts that reference an older PHP installation where ext-intl was absent. Even after installing the extension on your current system, Composer might still report the missing extension error if it relies on a cached lock file.

To resolve this, clear the Composer cache and regenerate the lock file:

composer clear-cache
php composer.phar install --no-cache-dir

This forces Composer to re-evaluate the platform requirements against your current runtime environment. If you are developing locally but deploying to a production server where ext-intl is missing, ensure that your deployment process includes the installation of PHP extensions as part of the build pipeline. Do not assume that installing system packages on your local machine will replicate the state of your production environment; discrepancies here are a common source of deployment failures.

Trade-offs and Performance Considerations

While ext-intl is essential for internationalization, it does introduce a slight performance overhead compared to basic date/time functions because it relies on compiled libraries (often linked against GNU Libintl). If you are building a high-throughput microservice that processes millions of simple timestamps per second, relying entirely on the intl extension might not be optimal. However, for standard CMS applications like SonataAdmin, where user-facing localization and currency formatting are primary concerns, the overhead is negligible compared to the complexity gained in handling locale-specific requirements.

If you encounter issues with specific PHP versions (e.g., PHP 8.2 or 8.3), ensure that your package repository has packages compiled for that specific minor version. Some older tutorials suggest compiling from source if pre-built packages fail, but this is rarely necessary unless you are on a niche distribution. Stick to the official repositories whenever possible to maintain security patch levels and compatibility with other system libraries.

Our network