Skip to content

Commit c4733a5

Browse files
minor #33868 Skip the intl notice if run with phpunit (jakzal)
This PR was squashed before being merged into the 5.0-dev branch (closes #33868). Discussion ---------- Skip the intl notice if run with phpunit | Q | A | ------------- | --- | Branch? | master | Bug fix? | no | New feature? | no | Deprecations? | no | Tickets | Re #33825 | License | MIT | Doc PR | - Commits ------- 25461b358c Skip the intl notice if run with phpunit
2 parents d243dca + 4850959 commit c4733a5

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

DependencyInjection/FrameworkExtension.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ public function load(array $configs, ContainerBuilder $container)
211211
->addError('You cannot use the "slugger" service since the Translation contracts are not installed. Try running "composer require symfony/translation".');
212212
}
213213

214-
if (!\extension_loaded('intl')) {
214+
if (!\extension_loaded('intl') && !\defined('PHPUNIT_COMPOSER_INSTALL')) {
215215
@trigger_error('Please install the "intl" PHP extension for best performance.', E_USER_DEPRECATED);
216216
}
217217
}

Tests/Functional/SluggerLocaleAwareTest.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@
1616
*/
1717
class SluggerLocaleAwareTest extends AbstractWebTestCase
1818
{
19+
/**
20+
* @requires extension intl
21+
*/
1922
public function testLocalizedSlugger()
2023
{
2124
$kernel = static::createKernel(['test_case' => 'Slugger', 'root_config' => 'config.yml']);

0 commit comments

Comments
 (0)