Skip to content

Commit dce70bd

Browse files
Merge branch '2.7' into 2.8
* 2.7: [HttpFoundation] Fix transient test [HttpFoundation] Add a dependency on the mbstring polyfill [2.7] update readme files for new components add readme files where missing fix lowest TwigBridge deps versions [EventDispatcher] fix syntax error Don't use reflections when possible Don't use reflections when possible [Form] Update form tests after the ICU data update [Intl] Update tests and the number formatter to match behaviour of the intl extension [Intl] Update the ICU data to version 55 [Intl] Fix the update-data.php script in preparation for ICU 5.5 [Process] Fix memory issue when using large input streams Use constant instead of function call. fixed test name automatically generate safe fallback filename [Console] default to stderr in the console helpers Conflicts: composer.json src/Symfony/Bridge/PhpUnit/README.md src/Symfony/Bridge/Twig/composer.json src/Symfony/Component/Console/Helper/DialogHelper.php src/Symfony/Component/Debug/DebugClassLoader.php src/Symfony/Component/HttpFoundation/composer.json src/Symfony/Component/Security/Acl/README.md src/Symfony/Component/Security/Core/README.md src/Symfony/Component/Security/Csrf/README.md src/Symfony/Component/Security/Http/README.md
2 parents 3e89be1 + 5deb7cb commit dce70bd

File tree

3 files changed

+12
-4
lines changed

3 files changed

+12
-4
lines changed

DependencyInjection/Compiler/FragmentRendererPass.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,8 @@ public function process(ContainerBuilder $container)
3737
// We must assume that the class value has been correctly filled, even if the service is created by a factory
3838
$class = $container->getDefinition($id)->getClass();
3939

40-
$refClass = new \ReflectionClass($class);
4140
$interface = 'Symfony\Component\HttpKernel\Fragment\FragmentRendererInterface';
42-
if (!$refClass->implementsInterface($interface)) {
41+
if (!is_subclass_of($class, $interface)) {
4342
throw new \InvalidArgumentException(sprintf('Service "%s" must implement interface "%s".', $id, $interface));
4443
}
4544

DependencyInjection/Compiler/LoggingTranslatorPass.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,7 @@ public function process(ContainerBuilder $container)
3636
$definition = $container->getDefinition((string) $translatorAlias);
3737
$class = $container->getParameterBag()->resolveValue($definition->getClass());
3838

39-
$refClass = new \ReflectionClass($class);
40-
if ($refClass->implementsInterface('Symfony\Component\Translation\TranslatorInterface') && $refClass->implementsInterface('Symfony\Component\Translation\TranslatorBagInterface')) {
39+
if (is_subclass_of($class, 'Symfony\Component\Translation\TranslatorInterface') && is_subclass_of($class, 'Symfony\Component\Translation\TranslatorBagInterface')) {
4140
$container->getDefinition('translator.logging')->setDecoratedService('translator');
4241
$container->getDefinition('translation.warmer')->replaceArgument(0, new Reference('translator.logging.inner'));
4342
}

README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
FrameworkBundle
2+
===============
3+
4+
Resources
5+
---------
6+
7+
* [Contributing](https://symfony.com/doc/current/contributing/index.html)
8+
* [Report issues](https://github.com/symfony/symfony/issues) and
9+
[send Pull Requests](https://github.com/symfony/symfony/pulls)
10+
in the [main Symfony repository](https://github.com/symfony/symfony)

0 commit comments

Comments
 (0)