From 27298264285f28f3d6a1ffe9f8698ea08dc3c298 Mon Sep 17 00:00:00 2001 From: Sylvain Date: Thu, 31 May 2018 08:51:27 +0200 Subject: [PATCH 1/2] Update InheritanceProcessor.php --- Config/Processor/InheritanceProcessor.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Config/Processor/InheritanceProcessor.php b/Config/Processor/InheritanceProcessor.php index dc548f57c..008fbe9d7 100644 --- a/Config/Processor/InheritanceProcessor.php +++ b/Config/Processor/InheritanceProcessor.php @@ -121,7 +121,7 @@ private static function checkTypeExists($name, array $configs, $child) { if (!isset($configs[$name])) { throw new \InvalidArgumentException(sprintf( - 'Type %s inherits by %s not found.', + 'Type %s inherited by %s not found.', json_encode($name), json_encode($child) )); @@ -142,9 +142,9 @@ private static function checkAllowedInheritsTypes($name, array $config, array $a { if (empty($config['decorator']) && isset($config['type']) && !in_array($config['type'], $allowedTypes)) { throw new \InvalidArgumentException(sprintf( - 'Type %s can\'t inherits %s because %s is not allowed type (%s).', - json_encode($name), + 'Type %s can\'t inherit %s because its type (%s) is not allowed type (%s).', json_encode($child), + json_encode($name), json_encode($config['type']), json_encode($allowedTypes) )); From 315137e8ff08a1d84f20d79c89dbd22830160b61 Mon Sep 17 00:00:00 2001 From: Sylvain Date: Thu, 31 May 2018 08:54:01 +0200 Subject: [PATCH 2/2] Update InheritanceProcessorTest.php --- Tests/Config/Processor/InheritanceProcessorTest.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Tests/Config/Processor/InheritanceProcessorTest.php b/Tests/Config/Processor/InheritanceProcessorTest.php index 3854dcaa6..c4f6b291e 100644 --- a/Tests/Config/Processor/InheritanceProcessorTest.php +++ b/Tests/Config/Processor/InheritanceProcessorTest.php @@ -17,7 +17,7 @@ class InheritanceProcessorTest extends TestCase /** * @expectedException \InvalidArgumentException - * @expectedExceptionMessage Type "toto" inherits by "bar" not found. + * @expectedExceptionMessage Type "toto" inherited by "bar" not found. */ public function testExtendsUnknownType() { @@ -53,7 +53,7 @@ public function testCircularExtendsType() /** * @expectedException \InvalidArgumentException - * @expectedExceptionMessage Type "toto" can't inherits "bar" because "enum" is not allowed type (["object","interface"]). + * @expectedExceptionMessage Type "bar" can't inherit "toto" because its type ("enum") is not allowed type (["object","interface"]). */ public function testNotAllowedType() {