diff --git a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php index a8d30e8e164fc..fa06c0eaddde8 100644 --- a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php +++ b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php @@ -205,7 +205,7 @@ public function load(array $configs, ContainerBuilder $container) ->addError('You cannot use the "slugger" service since the Translation contracts are not installed. Try running "composer require symfony/translation".'); } - if (!\extension_loaded('intl')) { + if (!\extension_loaded('intl') && !\defined('PHPUNIT_COMPOSER_INSTALL')) { @trigger_error('Please install the "intl" PHP extension for best performance.', E_USER_DEPRECATED); } } diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/SluggerLocaleAwareTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/SluggerLocaleAwareTest.php index 311b3ed5ec974..d8552977c0835 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/SluggerLocaleAwareTest.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/SluggerLocaleAwareTest.php @@ -16,6 +16,9 @@ */ class SluggerLocaleAwareTest extends AbstractWebTestCase { + /** + * @requires extension intl + */ public function testLocalizedSlugger() { $kernel = static::createKernel(['test_case' => 'Slugger', 'root_config' => 'config.yml']);