From 9a8ea931393d6cd4237fb615f4c614b1f03a5e89 Mon Sep 17 00:00:00 2001 From: Roland Franssen Date: Sun, 21 May 2017 12:19:15 +0200 Subject: [PATCH 1/6] [DI] Remove dead service_container checks --- .../Bundle/FrameworkBundle/Console/Descriptor/Descriptor.php | 4 ---- .../Component/DependencyInjection/Dumper/GraphvizDumper.php | 3 +-- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/Descriptor.php b/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/Descriptor.php index c081dfc6e9..268a781897 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/Descriptor.php +++ b/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/Descriptor.php @@ -258,10 +258,6 @@ abstract class Descriptor implements DescriptorInterface return $builder->getAlias($serviceId); } - if ('service_container' === $serviceId) { - return $builder; - } - // the service has been injected in some special way, just return the service return $builder->get($serviceId); } diff --git a/src/Symfony/Component/DependencyInjection/Dumper/GraphvizDumper.php b/src/Symfony/Component/DependencyInjection/Dumper/GraphvizDumper.php index 9a20525f62..25ab3078c9 100644 --- a/src/Symfony/Component/DependencyInjection/Dumper/GraphvizDumper.php +++ b/src/Symfony/Component/DependencyInjection/Dumper/GraphvizDumper.php @@ -192,8 +192,7 @@ class GraphvizDumper extends Dumper } if (!$container->hasDefinition($id)) { - $class = get_class('service_container' === $id ? $this->container : $container->get($id)); - $nodes[$id] = array('class' => str_replace('\\', '\\\\', $class), 'attributes' => $this->options['node.instance']); + $nodes[$id] = array('class' => str_replace('\\', '\\\\', get_class($container->get($id))), 'attributes' => $this->options['node.instance']); } } From c83c5bc6b18acd4079c6d5993a65a2c96e27fb53 Mon Sep 17 00:00:00 2001 From: Christian Flothmann Date: Sun, 21 May 2017 19:39:57 +0200 Subject: [PATCH 2/6] [PhpUnitBridge] add changelog entries for #21140 --- src/Symfony/Bridge/PhpUnit/CHANGELOG.md | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 src/Symfony/Bridge/PhpUnit/CHANGELOG.md diff --git a/src/Symfony/Bridge/PhpUnit/CHANGELOG.md b/src/Symfony/Bridge/PhpUnit/CHANGELOG.md new file mode 100644 index 0000000000..daaa369e49 --- /dev/null +++ b/src/Symfony/Bridge/PhpUnit/CHANGELOG.md @@ -0,0 +1,10 @@ +CHANGELOG +========= + +3.3.0 +----- + + * using the `testLegacy` prefix in method names to mark a test as legacy is + deprecated, use the `@group legacy` notation instead + * using the `Legacy` prefix in class names to mark a test as legacy is deprecated, + use the `@group legacy` notation instead From 1c2383f1a5c8b210afad0c95e24243a813e6648d Mon Sep 17 00:00:00 2001 From: Hugo Hamon Date: Sun, 21 May 2017 23:03:33 +0200 Subject: [PATCH 3/6] [DependencyInjection] remove unused variable --- .../Component/DependencyInjection/Compiler/AutowirePass.php | 1 - 1 file changed, 1 deletion(-) diff --git a/src/Symfony/Component/DependencyInjection/Compiler/AutowirePass.php b/src/Symfony/Component/DependencyInjection/Compiler/AutowirePass.php index 0a6a0dfc1b..b79a656aa8 100644 --- a/src/Symfony/Component/DependencyInjection/Compiler/AutowirePass.php +++ b/src/Symfony/Component/DependencyInjection/Compiler/AutowirePass.php @@ -163,7 +163,6 @@ class AutowirePass extends AbstractRecursivePass */ private function getMethodsToAutowire(\ReflectionClass $reflectionClass) { - $found = array(); $methodsToAutowire = array(); foreach ($reflectionClass->getMethods() as $reflectionMethod) { From 082996417daa10def5166f9829c8bd84a0212179 Mon Sep 17 00:00:00 2001 From: Christian Flothmann Date: Mon, 22 May 2017 09:42:36 +0200 Subject: [PATCH 4/6] fix docblock position The `$defaultLocale` argument is present in the `Translator` class of the FrameworkBundle, but is not part of the Translation component. --- .../Bundle/FrameworkBundle/Translation/Translator.php | 9 +++++---- src/Symfony/Component/Translation/Translator.php | 9 ++++----- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/Symfony/Bundle/FrameworkBundle/Translation/Translator.php b/src/Symfony/Bundle/FrameworkBundle/Translation/Translator.php index 6bcbaa8e97..2b83e14b10 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Translation/Translator.php +++ b/src/Symfony/Bundle/FrameworkBundle/Translation/Translator.php @@ -48,10 +48,11 @@ class Translator extends BaseTranslator implements WarmableInterface * * debug: Whether to enable debugging or not (false by default) * * resource_files: List of translation resources available grouped by locale. * - * @param ContainerInterface $container A ContainerInterface instance - * @param MessageSelector $selector The message selector for pluralization - * @param array $loaderIds An array of loader Ids - * @param array $options An array of options + * @param ContainerInterface $container A ContainerInterface instance + * @param MessageSelector $selector The message selector for pluralization + * @param string $defaultLocale + * @param array $loaderIds An array of loader Ids + * @param array $options An array of options * * @throws InvalidArgumentException */ diff --git a/src/Symfony/Component/Translation/Translator.php b/src/Symfony/Component/Translation/Translator.php index 44616350d1..5f8eb03304 100644 --- a/src/Symfony/Component/Translation/Translator.php +++ b/src/Symfony/Component/Translation/Translator.php @@ -74,11 +74,10 @@ class Translator implements TranslatorInterface, TranslatorBagInterface /** * Constructor. * - * @param string $locale The locale - * @param MessageSelector|null $selector The message selector for pluralization - * @param string $defaultLocale - * @param string|null $cacheDir The directory to use for the cache - * @param bool $debug Use cache in debug mode ? + * @param string $locale The locale + * @param MessageSelector|null $selector The message selector for pluralization + * @param string|null $cacheDir The directory to use for the cache + * @param bool $debug Use cache in debug mode ? * * @throws InvalidArgumentException If a locale contains invalid characters */ From c252c08d44ec38ccc99070bb1f42c4b5b8d2c4dd Mon Sep 17 00:00:00 2001 From: Robin Chalas Date: Mon, 22 May 2017 11:10:57 +0200 Subject: [PATCH 5/6] Fixed extra semi-colon --- src/Symfony/Component/VarDumper/Caster/ReflectionCaster.php | 1 - 1 file changed, 1 deletion(-) diff --git a/src/Symfony/Component/VarDumper/Caster/ReflectionCaster.php b/src/Symfony/Component/VarDumper/Caster/ReflectionCaster.php index 9811eab5e7..8e86b054c0 100644 --- a/src/Symfony/Component/VarDumper/Caster/ReflectionCaster.php +++ b/src/Symfony/Component/VarDumper/Caster/ReflectionCaster.php @@ -51,7 +51,6 @@ class ReflectionCaster unset($v->value['position'], $v->value['isVariadic'], $v->value['byReference'], $v); } } - ; if (!($filter & Caster::EXCLUDE_VERBOSE) && $f = $c->getFileName()) { $a[$prefix.'file'] = new LinkStub($f, $c->getStartLine()); From 987749bb999e9841e37f6422c3319b9b00f24ea6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Dunglas?= Date: Mon, 22 May 2017 11:36:51 +0200 Subject: [PATCH 6/6] [Serializer] Remove a useless legacy annotation --- .../Tests/Normalizer/AbstractObjectNormalizerTest.php | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/Symfony/Component/Serializer/Tests/Normalizer/AbstractObjectNormalizerTest.php b/src/Symfony/Component/Serializer/Tests/Normalizer/AbstractObjectNormalizerTest.php index 4f9268bd17..1040111cfe 100644 --- a/src/Symfony/Component/Serializer/Tests/Normalizer/AbstractObjectNormalizerTest.php +++ b/src/Symfony/Component/Serializer/Tests/Normalizer/AbstractObjectNormalizerTest.php @@ -26,9 +26,6 @@ class AbstractObjectNormalizerTest extends TestCase $this->assertSame('baz', $normalizedData->baz); } - /** - * @group legacy - */ public function testInstantiateObjectDenormalizer() { $data = array('foo' => 'foo', 'bar' => 'bar', 'baz' => 'baz');