From 9c29f9c19be02839c1780b429283684b9ca0f706 Mon Sep 17 00:00:00 2001 From: Florent Mata Date: Fri, 11 Aug 2017 14:43:59 +0200 Subject: [PATCH 1/6] [Workflow] fixed InvalidDefinitionException message for StateMachineValidator --- .../Component/Workflow/Validator/StateMachineValidator.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Symfony/Component/Workflow/Validator/StateMachineValidator.php b/src/Symfony/Component/Workflow/Validator/StateMachineValidator.php index 16948f6769..8fe5eecc4a 100644 --- a/src/Symfony/Component/Workflow/Validator/StateMachineValidator.php +++ b/src/Symfony/Component/Workflow/Validator/StateMachineValidator.php @@ -31,7 +31,7 @@ class StateMachineValidator implements DefinitionValidatorInterface // Make sure that each transition has exactly one FROM $froms = $transition->getFroms(); if (1 !== count($froms)) { - throw new InvalidDefinitionException(sprintf('A transition in StateMachine can only have one input. But the transition "%s" in StateMachine "%s" has %d inputs.', $transition->getName(), $name, count($transition->getTos()))); + throw new InvalidDefinitionException(sprintf('A transition in StateMachine can only have one input. But the transition "%s" in StateMachine "%s" has %d inputs.', $transition->getName(), $name, count($froms))); } // Enforcing uniqueness of the names of transitions starting at each node From 423656f8eaf85ba09158f6b984b2e758170d8076 Mon Sep 17 00:00:00 2001 From: "Alexander M. Turek" Date: Sun, 13 Aug 2017 23:58:09 +0200 Subject: [PATCH 2/6] Fixed some param/return annotations in PHPDOC blocks. --- src/Symfony/Component/DependencyInjection/Container.php | 2 +- src/Symfony/Component/DependencyInjection/Definition.php | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Symfony/Component/DependencyInjection/Container.php b/src/Symfony/Component/DependencyInjection/Container.php index 379c7f6d0e..3b0a82d80e 100644 --- a/src/Symfony/Component/DependencyInjection/Container.php +++ b/src/Symfony/Component/DependencyInjection/Container.php @@ -427,7 +427,7 @@ class Container implements ResettableContainerInterface /** * Fetches a variable from the environment. * - * @param string The name of the environment variable + * @param string $name The name of the environment variable * * @return scalar The value to use for the provided environment variable name * diff --git a/src/Symfony/Component/DependencyInjection/Definition.php b/src/Symfony/Component/DependencyInjection/Definition.php index 173578acd5..2900ddc24d 100644 --- a/src/Symfony/Component/DependencyInjection/Definition.php +++ b/src/Symfony/Component/DependencyInjection/Definition.php @@ -71,6 +71,8 @@ class Definition /** * Sets the tracked changes for the Definition object. * + * @param array $changes An array of changes for this Definition + * * @return $this */ public function setChanges(array $changes) @@ -401,6 +403,8 @@ class Definition * Sets the definition templates to conditionally apply on the current definition, keyed by parent interface/class. * * @param $instanceof ChildDefinition[] + * + * @return $this */ public function setInstanceofConditionals(array $instanceof) { From 339592da14a7daa2ec023ae9aa88a3a68223630b Mon Sep 17 00:00:00 2001 From: Matthieu Mota Date: Thu, 10 Aug 2017 18:24:09 +0200 Subject: [PATCH 3/6] Fix testHtml method with regexp --- src/Symfony/Component/DomCrawler/Tests/CrawlerTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Symfony/Component/DomCrawler/Tests/CrawlerTest.php b/src/Symfony/Component/DomCrawler/Tests/CrawlerTest.php index bfd9527a05..495a4a9d14 100644 --- a/src/Symfony/Component/DomCrawler/Tests/CrawlerTest.php +++ b/src/Symfony/Component/DomCrawler/Tests/CrawlerTest.php @@ -353,7 +353,7 @@ EOF public function testHtml() { $this->assertEquals('Bar', $this->createTestCrawler()->filterXPath('//a[5]')->html()); - $this->assertEquals('', trim($this->createTestCrawler()->filterXPath('//form[@id="FooFormId"]')->html())); + $this->assertEquals('', trim(preg_replace('~>\s+<~', '><', $this->createTestCrawler()->filterXPath('//form[@id="FooFormId"]')->html()))); try { $this->createTestCrawler()->filterXPath('//ol')->html(); From 8cbf0947027211882ba9e29a79b72cbc98b9f4d0 Mon Sep 17 00:00:00 2001 From: Robin Chalas Date: Tue, 15 Aug 2017 11:12:55 +0200 Subject: [PATCH 4/6] [Console] Remove useless http-kernel dev dep --- .../Tests/DependencyInjection/AddConsoleCommandPassTest.php | 5 ----- src/Symfony/Component/Console/composer.json | 1 - 2 files changed, 6 deletions(-) diff --git a/src/Symfony/Component/Console/Tests/DependencyInjection/AddConsoleCommandPassTest.php b/src/Symfony/Component/Console/Tests/DependencyInjection/AddConsoleCommandPassTest.php index 0cf4631754..3423c5d9e9 100644 --- a/src/Symfony/Component/Console/Tests/DependencyInjection/AddConsoleCommandPassTest.php +++ b/src/Symfony/Component/Console/Tests/DependencyInjection/AddConsoleCommandPassTest.php @@ -16,7 +16,6 @@ use Symfony\Component\Console\DependencyInjection\AddConsoleCommandPass; use Symfony\Component\Console\Command\Command; use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\DependencyInjection\Definition; -use Symfony\Component\HttpKernel\Bundle\Bundle; class AddConsoleCommandPassTest extends TestCase { @@ -122,7 +121,3 @@ class AddConsoleCommandPassTest extends TestCase class MyCommand extends Command { } - -class ExtensionPresentBundle extends Bundle -{ -} diff --git a/src/Symfony/Component/Console/composer.json b/src/Symfony/Component/Console/composer.json index d4fef1ea58..415b9e096d 100644 --- a/src/Symfony/Component/Console/composer.json +++ b/src/Symfony/Component/Console/composer.json @@ -22,7 +22,6 @@ }, "require-dev": { "symfony/config": "~3.3", - "symfony/http-kernel": "~2.8|~3.0", "symfony/event-dispatcher": "~2.8|~3.0", "symfony/dependency-injection": "~3.3", "symfony/filesystem": "~2.8|~3.0", From 0a3dc11af9dab60754745b6d5ab994151e2f5e52 Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Tue, 15 Aug 2017 10:54:46 +0200 Subject: [PATCH 5/6] [HttpKernel] Clean test directory on tear down --- src/Symfony/Component/HttpKernel/Tests/KernelTest.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/Symfony/Component/HttpKernel/Tests/KernelTest.php b/src/Symfony/Component/HttpKernel/Tests/KernelTest.php index dad52401da..a6d6285481 100644 --- a/src/Symfony/Component/HttpKernel/Tests/KernelTest.php +++ b/src/Symfony/Component/HttpKernel/Tests/KernelTest.php @@ -13,6 +13,7 @@ namespace Symfony\Component\HttpKernel\Tests; use PHPUnit\Framework\TestCase; use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\Filesystem\Filesystem; use Symfony\Component\HttpKernel\Bundle\BundleInterface; use Symfony\Component\HttpKernel\Config\EnvParametersResource; use Symfony\Component\HttpKernel\Kernel; @@ -25,6 +26,12 @@ use Symfony\Component\HttpKernel\Tests\Fixtures\FooBarBundle; class KernelTest extends TestCase { + public static function tearDownAfterClass() + { + $fs = new Filesystem(); + $fs->remove(__DIR__.'/Fixtures/cache'); + } + public function testConstructor() { $env = 'test_env'; From 22a6642632133d3ee7b288da78199bf9db5ddcf2 Mon Sep 17 00:00:00 2001 From: Johannes Goslar Date: Tue, 15 Aug 2017 14:38:43 +0200 Subject: [PATCH 6/6] Update JsonBundleReader.php --- .../Intl/Data/Bundle/Reader/JsonBundleReader.php | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/src/Symfony/Component/Intl/Data/Bundle/Reader/JsonBundleReader.php b/src/Symfony/Component/Intl/Data/Bundle/Reader/JsonBundleReader.php index 84644b9fe7..90012a7ad6 100644 --- a/src/Symfony/Component/Intl/Data/Bundle/Reader/JsonBundleReader.php +++ b/src/Symfony/Component/Intl/Data/Bundle/Reader/JsonBundleReader.php @@ -32,17 +32,15 @@ class JsonBundleReader implements BundleReaderInterface if (!file_exists($fileName)) { throw new ResourceBundleNotFoundException(sprintf( - 'The resource bundle "%s/%s.json" does not exist.', - $path, - $locale + 'The resource bundle "%s" does not exist.', + $fileName )); } if (!is_file($fileName)) { throw new RuntimeException(sprintf( - 'The resource bundle "%s/%s.json" is not a file.', - $path, - $locale + 'The resource bundle "%s" is not a file.', + $fileName )); } @@ -50,9 +48,8 @@ class JsonBundleReader implements BundleReaderInterface if (null === $data) { throw new RuntimeException(sprintf( - 'The resource bundle "%s/%s.json" contains invalid JSON: %s', - $path, - $locale, + 'The resource bundle "%s" contains invalid JSON: %s', + $fileName, self::getLastJsonError() )); }