From 332135186a78d1dd6c0af7d9d33427538c4bb67a Mon Sep 17 00:00:00 2001 From: Teoh Han Hui Date: Thu, 27 Jun 2019 11:53:29 +0200 Subject: [PATCH 1/3] [HttpKernel] Add @method PHPDoc for getRequest and getResponse back to Client --- src/Symfony/Component/HttpKernel/Client.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Symfony/Component/HttpKernel/Client.php b/src/Symfony/Component/HttpKernel/Client.php index 66ce0649f0..d4ae5f8e65 100644 --- a/src/Symfony/Component/HttpKernel/Client.php +++ b/src/Symfony/Component/HttpKernel/Client.php @@ -23,6 +23,9 @@ use Symfony\Component\HttpFoundation\Response; /** * Client simulates a browser and makes requests to an HttpKernel instance. * + * @method Request getRequest() A Request instance + * @method Response getResponse() A Response instance + * * @deprecated since Symfony 4.3, use HttpKernelBrowser instead. */ class Client extends AbstractBrowser From b73025a4c67b59a91db5b245cdd4a5dd21ef09bd Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Thu, 27 Jun 2019 18:11:56 +0200 Subject: [PATCH 2/3] [travis] not all components have a master branch --- .github/build-packages.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/build-packages.php b/.github/build-packages.php index e61eae51df..5e9bcc1415 100644 --- a/.github/build-packages.php +++ b/.github/build-packages.php @@ -57,7 +57,7 @@ foreach ($dirs as $k => $dir) { $versions = @file_get_contents('https://repo.packagist.org/p/'.$package->name.'.json') ?: sprintf('{"packages":{"%s":{"dev-master":%s}}}', $package->name, file_get_contents($dir.'/composer.json')); $versions = json_decode($versions)->packages->{$package->name}; - if ($package->version === str_replace('-dev', '.x-dev', $versions->{'dev-master'}->extra->{'branch-alias'}->{'dev-master'})) { + if (isset($versions->{'dev-master'}) && $package->version === str_replace('-dev', '.x-dev', $versions->{'dev-master'}->extra->{'branch-alias'}->{'dev-master'})) { unset($versions->{'dev-master'}); } From 87fe077a89df56c93c09f703beafe89cd038c65b Mon Sep 17 00:00:00 2001 From: Christian Flothmann Date: Fri, 28 Jun 2019 10:45:07 +0200 Subject: [PATCH 3/3] fix Debug component dependencies --- .../Bundle/FrameworkBundle/composer.json | 1 + src/Symfony/Bundle/TwigBundle/composer.json | 1 + .../ClassNotFoundFatalErrorHandlerTest.php | 18 +++++++++--------- 3 files changed, 11 insertions(+), 9 deletions(-) diff --git a/src/Symfony/Bundle/FrameworkBundle/composer.json b/src/Symfony/Bundle/FrameworkBundle/composer.json index 78d7ae1e56..40cff711ae 100644 --- a/src/Symfony/Bundle/FrameworkBundle/composer.json +++ b/src/Symfony/Bundle/FrameworkBundle/composer.json @@ -22,6 +22,7 @@ "symfony/class-loader": "~3.2", "symfony/dependency-injection": "^3.4.24|^4.2.5", "symfony/config": "~3.4|~4.0", + "symfony/debug": "~2.8|~3.0|~4.0", "symfony/event-dispatcher": "~3.4|~4.0", "symfony/http-foundation": "^3.3.11|~4.0", "symfony/http-kernel": "~3.4|~4.0", diff --git a/src/Symfony/Bundle/TwigBundle/composer.json b/src/Symfony/Bundle/TwigBundle/composer.json index 5d27f06ff9..4cc08e1b35 100644 --- a/src/Symfony/Bundle/TwigBundle/composer.json +++ b/src/Symfony/Bundle/TwigBundle/composer.json @@ -18,6 +18,7 @@ "require": { "php": "^5.5.9|>=7.0.8", "symfony/config": "~3.2|~4.0", + "symfony/debug": "~2.8|~3.0|~4.0", "symfony/twig-bridge": "^3.4.3|^4.0.3", "symfony/http-foundation": "~2.8|~3.0|~4.0", "symfony/http-kernel": "^3.3|~4.0", diff --git a/src/Symfony/Component/Debug/Tests/FatalErrorHandler/ClassNotFoundFatalErrorHandlerTest.php b/src/Symfony/Component/Debug/Tests/FatalErrorHandler/ClassNotFoundFatalErrorHandlerTest.php index 8e615ac640..112dfbb7f7 100644 --- a/src/Symfony/Component/Debug/Tests/FatalErrorHandler/ClassNotFoundFatalErrorHandlerTest.php +++ b/src/Symfony/Component/Debug/Tests/FatalErrorHandler/ClassNotFoundFatalErrorHandlerTest.php @@ -61,7 +61,7 @@ class ClassNotFoundFatalErrorHandlerTest extends TestCase } $this->assertInstanceOf('Symfony\Component\Debug\Exception\ClassNotFoundException', $exception); - $this->assertSame($translatedMessage, $exception->getMessage()); + $this->assertRegExp($translatedMessage, $exception->getMessage()); $this->assertSame($error['type'], $exception->getSeverity()); $this->assertSame($error['file'], $exception->getFile()); $this->assertSame($error['line'], $exception->getLine()); @@ -82,7 +82,7 @@ class ClassNotFoundFatalErrorHandlerTest extends TestCase 'file' => 'foo.php', 'message' => 'Class \'WhizBangFactory\' not found', ], - "Attempted to load class \"WhizBangFactory\" from the global namespace.\nDid you forget a \"use\" statement?", + "/^Attempted to load class \"WhizBangFactory\" from the global namespace.\nDid you forget a \"use\" statement\?$/", ], [ [ @@ -91,7 +91,7 @@ class ClassNotFoundFatalErrorHandlerTest extends TestCase 'file' => 'foo.php', 'message' => 'Class \'Foo\\Bar\\WhizBangFactory\' not found', ], - "Attempted to load class \"WhizBangFactory\" from namespace \"Foo\\Bar\".\nDid you forget a \"use\" statement for another namespace?", + "/^Attempted to load class \"WhizBangFactory\" from namespace \"Foo\\\\Bar\".\nDid you forget a \"use\" statement for another namespace\?$/", ], [ [ @@ -100,7 +100,7 @@ class ClassNotFoundFatalErrorHandlerTest extends TestCase 'file' => 'foo.php', 'message' => 'Class \'UndefinedFunctionException\' not found', ], - "Attempted to load class \"UndefinedFunctionException\" from the global namespace.\nDid you forget a \"use\" statement for \"Symfony\Component\Debug\Exception\UndefinedFunctionException\"?", + "/^Attempted to load class \"UndefinedFunctionException\" from the global namespace.\nDid you forget a \"use\" statement for .*\"Symfony\\\\Component\\\\Debug\\\\Exception\\\\UndefinedFunctionException\"\?$/", ], [ [ @@ -109,7 +109,7 @@ class ClassNotFoundFatalErrorHandlerTest extends TestCase 'file' => 'foo.php', 'message' => 'Class \'PEARClass\' not found', ], - "Attempted to load class \"PEARClass\" from the global namespace.\nDid you forget a \"use\" statement for \"Symfony_Component_Debug_Tests_Fixtures_PEARClass\"?", + "/^Attempted to load class \"PEARClass\" from the global namespace.\nDid you forget a \"use\" statement for \"Symfony_Component_Debug_Tests_Fixtures_PEARClass\"\?$/", ], [ [ @@ -118,7 +118,7 @@ class ClassNotFoundFatalErrorHandlerTest extends TestCase 'file' => 'foo.php', 'message' => 'Class \'Foo\\Bar\\UndefinedFunctionException\' not found', ], - "Attempted to load class \"UndefinedFunctionException\" from namespace \"Foo\Bar\".\nDid you forget a \"use\" statement for \"Symfony\Component\Debug\Exception\UndefinedFunctionException\"?", + "/^Attempted to load class \"UndefinedFunctionException\" from namespace \"Foo\\\\Bar\".\nDid you forget a \"use\" statement for .*\"Symfony\\\\Component\\\\Debug\\\\Exception\\\\UndefinedFunctionException\"\?$/", ], [ [ @@ -127,7 +127,7 @@ class ClassNotFoundFatalErrorHandlerTest extends TestCase 'file' => 'foo.php', 'message' => 'Class \'Foo\\Bar\\UndefinedFunctionException\' not found', ], - "Attempted to load class \"UndefinedFunctionException\" from namespace \"Foo\Bar\".\nDid you forget a \"use\" statement for \"Symfony\Component\Debug\Exception\UndefinedFunctionException\"?", + "/^Attempted to load class \"UndefinedFunctionException\" from namespace \"Foo\\\\Bar\".\nDid you forget a \"use\" statement for \"Symfony\\\\Component\\\\Debug\\\\Exception\\\\UndefinedFunctionException\"\?$/", [$autoloader, 'loadClass'], ], [ @@ -137,7 +137,7 @@ class ClassNotFoundFatalErrorHandlerTest extends TestCase 'file' => 'foo.php', 'message' => 'Class \'Foo\\Bar\\UndefinedFunctionException\' not found', ], - "Attempted to load class \"UndefinedFunctionException\" from namespace \"Foo\Bar\".\nDid you forget a \"use\" statement for \"Symfony\Component\Debug\Exception\UndefinedFunctionException\"?", + "/^Attempted to load class \"UndefinedFunctionException\" from namespace \"Foo\\\\Bar\".\nDid you forget a \"use\" statement for \"Symfony\\\\Component\\\\Debug\\\\Exception\\\\UndefinedFunctionException\"\?/", [$debugClassLoader, 'loadClass'], ], [ @@ -147,7 +147,7 @@ class ClassNotFoundFatalErrorHandlerTest extends TestCase 'file' => 'foo.php', 'message' => 'Class \'Foo\\Bar\\UndefinedFunctionException\' not found', ], - "Attempted to load class \"UndefinedFunctionException\" from namespace \"Foo\\Bar\".\nDid you forget a \"use\" statement for another namespace?", + "/^Attempted to load class \"UndefinedFunctionException\" from namespace \"Foo\\\\Bar\".\nDid you forget a \"use\" statement for another namespace\?$/", function ($className) { /* do nothing here */ }, ], ];