From 63cd219a5c5339218c73485d9ebe9fc6ff55ec14 Mon Sep 17 00:00:00 2001 From: Robin Chalas Date: Sun, 25 Nov 2018 16:28:24 +0100 Subject: [PATCH 1/8] =?UTF-8?q?[Console]=C2=A0Move=20back=20root=20excepti?= =?UTF-8?q?on=20to=20stack=20trace=20in=20verbose=20mode?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Symfony/Component/Console/Application.php | 7 +++++++ .../Component/Console/Tests/ApplicationTest.php | 14 ++++++++++++++ 2 files changed, 21 insertions(+) diff --git a/src/Symfony/Component/Console/Application.php b/src/Symfony/Component/Console/Application.php index 1d415636fc..6800360410 100644 --- a/src/Symfony/Component/Console/Application.php +++ b/src/Symfony/Component/Console/Application.php @@ -783,6 +783,13 @@ class Application // exception related properties $trace = $e->getTrace(); + array_unshift($trace, array( + 'function' => '', + 'file' => $e->getFile() ?: 'n/a', + 'line' => $e->getLine() ?: 'n/a', + 'args' => array(), + )); + for ($i = 0, $count = \count($trace); $i < $count; ++$i) { $class = isset($trace[$i]['class']) ? $trace[$i]['class'] : ''; $type = isset($trace[$i]['type']) ? $trace[$i]['type'] : ''; diff --git a/src/Symfony/Component/Console/Tests/ApplicationTest.php b/src/Symfony/Component/Console/Tests/ApplicationTest.php index faa98e5f5f..7922ce273b 100644 --- a/src/Symfony/Component/Console/Tests/ApplicationTest.php +++ b/src/Symfony/Component/Console/Tests/ApplicationTest.php @@ -776,6 +776,20 @@ class ApplicationTest extends TestCase $this->assertStringMatchesFormatFile(self::$fixturesPath.'/application_renderexception_linebreaks.txt', $tester->getDisplay(true), '->renderException() keep multiple line breaks'); } + public function testRenderExceptionStackTraceContainsRootException() + { + $application = new Application(); + $application->setAutoExit(false); + $application->register('foo')->setCode(function () { + throw new \Exception('Verbose exception'); + }); + + $tester = new ApplicationTester($application); + $tester->run(array('command' => 'foo'), array('decorated' => false, 'verbosity' => Output::VERBOSITY_VERBOSE)); + + $this->assertContains(sprintf('() at %s:', __FILE__), $tester->getDisplay()); + } + public function testRun() { $application = new Application(); From 70e05c643fe1a982e412a3e4ac0b3b35283ffba2 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Mon, 26 Nov 2018 15:04:35 +0100 Subject: [PATCH 2/8] updated CHANGELOG for 3.4.19 --- CHANGELOG-3.4.md | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/CHANGELOG-3.4.md b/CHANGELOG-3.4.md index 1f2a2de81d..dcd1c3bf06 100644 --- a/CHANGELOG-3.4.md +++ b/CHANGELOG-3.4.md @@ -7,6 +7,44 @@ in 3.4 minor versions. To get the diff for a specific change, go to https://github.com/symfony/symfony/commit/XXX where XXX is the change hash To get the diff between two versions, go to https://github.com/symfony/symfony/compare/v3.4.0...v3.4.1 +* 3.4.19 (2018-11-26) + + * bug #29318 [Console] Move back root exception to stack trace in verbose mode (chalasr) + * bug #29332 [PropertyAccess] make cache keys encoding bijective (nicolas-grekas) + * bug #29297 [Routing] fix trailing slash redirection when using RedirectableUrlMatcher (nicolas-grekas) + * bug #29313 [PropertyAccessor] fix encoding of cache keys (nicolas-grekas) + * bug #28917 [DoctrineBridge] catch errors while converting to db values in data collector (alekitto) + * bug #29317 [WebProfiler] Detect non-file paths in file viewer (ro0NL) + * bug #29305 [EventDispatcher] Unwrap wrapped listeners internally (ro0NL) + * bug #27314 [DoctrineBridge] fix case sensitivity issue in RememberMe\DoctrineTokenProvider (PF4Public) + * bug #29308 [Translation] Use XLIFF source rather than resname when there's no target (thewilkybarkid) + * bug #26244 [BrowserKit] fixed BC Break for HTTP_HOST header (brizzz) + * bug #28147 [DomCrawler] exclude fields inside "template" tags (Gorjunov) + * bug #29222 [Dotenv] properly parse backslashes in unquoted env vars (xabbuh) + * bug #29256 [HttpFoundation] Fixed absolute Request URI with default port (thomasbisignani) + * bug #29274 [Routing] Remove duplicate schemes and methods for invokable controllers (claudusd) + * bug #29271 [HttpFoundation] Fix trailing space for mime-type with parameters (Sascha Dens) + * bug #29243 [Cache] fix optimizing Psr6Cache for AdapterInterface pools (nicolas-grekas) + * bug #29247 [DI] fix taking lazy services into account when dumping the container (nicolas-grekas) + * bug #29249 [Form] Fixed empty data for compound date interval (HeahDude) + * bug #29265 [Bridge/PhpUnit] Use composer to download phpunit (nicolas-grekas) + * bug #28769 [FrameworkBundle] deal with explicitly enabled workflow nodes (xabbuh) + * bug #29223 [Validator] Added the missing constraints instance checks (thomasbisignani) + * bug #28966 [PropertyAccessor] Fix unable to write to singular property using setter while plural adder/remover exist (karser) + * bug #29182 [Form] Fixed empty data for compound date types (HeahDude) + * bug #29185 [Form] Fixed keeping hash of equal \DateTimeInterface on submit (HeahDude) + * bug #29137 [Workflow][FrameworkBundle] fixed guard event names for transitions (destillat, lyrixx) + * bug #28731 [Form] invalidate forms on transformation failures (xabbuh) + * bug #29152 [Config] Unset key during normalization (ro0NL) + * bug #29165 [DI] align IniFileLoader to PHP bugfix #76965 (nicolas-grekas) + * bug #29115 Change button_widget class to btn-primary (neFAST) + * bug #29131 [Dotenv] dont use getenv() to read SYMFONY_DOTENV_VARS (nicolas-grekas) + * bug #29057 [HttpFoundation] replace any preexisting Content-Type headers (nicolas-grekas) + * bug #29104 [DI] fix dumping inlined services (nicolas-grekas) + * bug #29054 [VarDumper] fix dump of closures created from callables (nicolas-grekas) + * bug #29102 [DI] fix GraphvizDumper ignoring inline definitions (nicolas-grekas) + * bug #29107 [DI] dont track classes/interfaces used to compute autowiring error messages (nicolas-grekas) + * 3.4.18 (2018-11-03) * bug #28820 [DependencyInjection] Fix tags on multiple decorated service (Soner Sayakci) From ecb09280ef60a513e9955351fd601675a9fc3223 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Mon, 26 Nov 2018 15:04:48 +0100 Subject: [PATCH 3/8] updated VERSION for 3.4.19 --- src/Symfony/Component/HttpKernel/Kernel.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Symfony/Component/HttpKernel/Kernel.php b/src/Symfony/Component/HttpKernel/Kernel.php index 6b80158cf2..bfc961f505 100644 --- a/src/Symfony/Component/HttpKernel/Kernel.php +++ b/src/Symfony/Component/HttpKernel/Kernel.php @@ -67,12 +67,12 @@ abstract class Kernel implements KernelInterface, RebootableInterface, Terminabl private $requestStackSize = 0; private $resetServices = false; - const VERSION = '3.4.19-DEV'; + const VERSION = '3.4.19'; const VERSION_ID = 30419; const MAJOR_VERSION = 3; const MINOR_VERSION = 4; const RELEASE_VERSION = 19; - const EXTRA_VERSION = 'DEV'; + const EXTRA_VERSION = ''; const END_OF_MAINTENANCE = '11/2020'; const END_OF_LIFE = '11/2021'; From acce087074962ea214f0384546d7c720432153cd Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Mon, 26 Nov 2018 15:50:31 +0100 Subject: [PATCH 4/8] bumped Symfony version to 3.4.20 --- src/Symfony/Component/HttpKernel/Kernel.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Symfony/Component/HttpKernel/Kernel.php b/src/Symfony/Component/HttpKernel/Kernel.php index bfc961f505..375e26ee0f 100644 --- a/src/Symfony/Component/HttpKernel/Kernel.php +++ b/src/Symfony/Component/HttpKernel/Kernel.php @@ -67,12 +67,12 @@ abstract class Kernel implements KernelInterface, RebootableInterface, Terminabl private $requestStackSize = 0; private $resetServices = false; - const VERSION = '3.4.19'; - const VERSION_ID = 30419; + const VERSION = '3.4.20-DEV'; + const VERSION_ID = 30420; const MAJOR_VERSION = 3; const MINOR_VERSION = 4; - const RELEASE_VERSION = 19; - const EXTRA_VERSION = ''; + const RELEASE_VERSION = 20; + const EXTRA_VERSION = 'DEV'; const END_OF_MAINTENANCE = '11/2020'; const END_OF_LIFE = '11/2021'; From 43cb7cfb23a8d3920ad2e118fd8ce6d521dfee49 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Mon, 26 Nov 2018 15:52:06 +0100 Subject: [PATCH 5/8] updated CHANGELOG for 4.1.8 --- CHANGELOG-4.1.md | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) diff --git a/CHANGELOG-4.1.md b/CHANGELOG-4.1.md index 60b848a532..ad6a91cdd0 100644 --- a/CHANGELOG-4.1.md +++ b/CHANGELOG-4.1.md @@ -7,6 +7,49 @@ in 4.1 minor versions. To get the diff for a specific change, go to https://github.com/symfony/symfony/commit/XXX where XXX is the change hash To get the diff between two versions, go to https://github.com/symfony/symfony/compare/v4.1.0...v4.1.1 +* 4.1.8 (2018-11-26) + + * bug #29318 [Console] Move back root exception to stack trace in verbose mode (chalasr) + * bug #29332 [PropertyAccess] make cache keys encoding bijective (nicolas-grekas) + * bug #29298 [Routing] fix trailing slash redirection when using RedirectableUrlMatcher (nicolas-grekas) + * bug #29297 [Routing] fix trailing slash redirection when using RedirectableUrlMatcher (nicolas-grekas) + * bug #29313 [PropertyAccessor] fix encoding of cache keys (nicolas-grekas) + * bug #28917 [DoctrineBridge] catch errors while converting to db values in data collector (alekitto) + * bug #29317 [WebProfiler] Detect non-file paths in file viewer (ro0NL) + * bug #29305 [EventDispatcher] Unwrap wrapped listeners internally (ro0NL) + * bug #27314 [DoctrineBridge] fix case sensitivity issue in RememberMe\DoctrineTokenProvider (PF4Public) + * bug #29310 [MonologBridge] Return empty list for unknown requests (ro0NL) + * bug #29308 [Translation] Use XLIFF source rather than resname when there's no target (thewilkybarkid) + * bug #26244 [BrowserKit] fixed BC Break for HTTP_HOST header (brizzz) + * bug #28147 [DomCrawler] exclude fields inside "template" tags (Gorjunov) + * bug #29222 [Dotenv] properly parse backslashes in unquoted env vars (xabbuh) + * bug #29256 [HttpFoundation] Fixed absolute Request URI with default port (thomasbisignani) + * bug #29274 [Routing] Remove duplicate schemes and methods for invokable controllers (claudusd) + * bug #29271 [HttpFoundation] Fix trailing space for mime-type with parameters (Sascha Dens) + * bug #29243 [Cache] fix optimizing Psr6Cache for AdapterInterface pools (nicolas-grekas) + * bug #29247 [DI] fix taking lazy services into account when dumping the container (nicolas-grekas) + * bug #29249 [Form] Fixed empty data for compound date interval (HeahDude) + * bug #29265 [Bridge/PhpUnit] Use composer to download phpunit (nicolas-grekas) + * bug #28769 [FrameworkBundle] deal with explicitly enabled workflow nodes (xabbuh) + * bug #29223 [Validator] Added the missing constraints instance checks (thomasbisignani) + * bug #28966 [PropertyAccessor] Fix unable to write to singular property using setter while plural adder/remover exist (karser) + * bug #29182 [Form] Fixed empty data for compound date types (HeahDude) + * bug #29191 [Routing] generate(null) should throw an exception (nicolas-grekas) + * bug #29185 [Form] Fixed keeping hash of equal \DateTimeInterface on submit (HeahDude) + * bug #29141 [Workflow] Fixed bug of buildTransitionBlockerList when many transition are enabled (Tetragramat, lyrixx) + * bug #29137 [Workflow][FrameworkBundle] fixed guard event names for transitions (destillat, lyrixx) + * bug #28731 [Form] invalidate forms on transformation failures (xabbuh) + * bug #29152 [Config] Unset key during normalization (ro0NL) + * bug #29165 [DI] align IniFileLoader to PHP bugfix #76965 (nicolas-grekas) + * bug #29115 Change button_widget class to btn-primary (neFAST) + * bug #29131 [Dotenv] dont use getenv() to read SYMFONY_DOTENV_VARS (nicolas-grekas) + * bug #29057 [HttpFoundation] replace any preexisting Content-Type headers (nicolas-grekas) + * bug #29076 [Serializer] Allow null values when denormalizing with constructor missing data (danut007ro) + * bug #29104 [DI] fix dumping inlined services (nicolas-grekas) + * bug #29054 [VarDumper] fix dump of closures created from callables (nicolas-grekas) + * bug #29102 [DI] fix GraphvizDumper ignoring inline definitions (nicolas-grekas) + * bug #29107 [DI] dont track classes/interfaces used to compute autowiring error messages (nicolas-grekas) + * 4.1.7 (2018-11-03) * bug #28820 [DependencyInjection] Fix tags on multiple decorated service (Soner Sayakci) From 63201c518c6baacd884f70961377e5c4311e5669 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Mon, 26 Nov 2018 15:52:15 +0100 Subject: [PATCH 6/8] updated VERSION for 4.1.8 --- src/Symfony/Component/HttpKernel/Kernel.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Symfony/Component/HttpKernel/Kernel.php b/src/Symfony/Component/HttpKernel/Kernel.php index f504299532..244f664a64 100644 --- a/src/Symfony/Component/HttpKernel/Kernel.php +++ b/src/Symfony/Component/HttpKernel/Kernel.php @@ -63,12 +63,12 @@ abstract class Kernel implements KernelInterface, RebootableInterface, Terminabl private $requestStackSize = 0; private $resetServices = false; - const VERSION = '4.1.8-DEV'; + const VERSION = '4.1.8'; const VERSION_ID = 40108; const MAJOR_VERSION = 4; const MINOR_VERSION = 1; const RELEASE_VERSION = 8; - const EXTRA_VERSION = 'DEV'; + const EXTRA_VERSION = ''; const END_OF_MAINTENANCE = '01/2019'; const END_OF_LIFE = '07/2019'; From 9fba843a2a3f6c543051bad5d66d632808d6c5b8 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Mon, 26 Nov 2018 16:00:55 +0100 Subject: [PATCH 7/8] bumped Symfony version to 4.1.9 --- src/Symfony/Component/HttpKernel/Kernel.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Symfony/Component/HttpKernel/Kernel.php b/src/Symfony/Component/HttpKernel/Kernel.php index 244f664a64..0a3909dff5 100644 --- a/src/Symfony/Component/HttpKernel/Kernel.php +++ b/src/Symfony/Component/HttpKernel/Kernel.php @@ -63,12 +63,12 @@ abstract class Kernel implements KernelInterface, RebootableInterface, Terminabl private $requestStackSize = 0; private $resetServices = false; - const VERSION = '4.1.8'; - const VERSION_ID = 40108; + const VERSION = '4.1.9-DEV'; + const VERSION_ID = 40109; const MAJOR_VERSION = 4; const MINOR_VERSION = 1; - const RELEASE_VERSION = 8; - const EXTRA_VERSION = ''; + const RELEASE_VERSION = 9; + const EXTRA_VERSION = 'DEV'; const END_OF_MAINTENANCE = '01/2019'; const END_OF_LIFE = '07/2019'; From 53f28bf34ceec93a3a2751d2217a8691d8116970 Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Tue, 27 Nov 2018 08:29:59 +0100 Subject: [PATCH 8/8] Update PR template --- .github/PULL_REQUEST_TEMPLATE.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index b6f39741d9..ac82d7063d 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -1,6 +1,6 @@ | Q | A | ------------- | --- -| Branch? | master for features / 2.8 up to 4.1 for bug fixes +| Branch? | master for features / 3.4 up to 4.2 for bug fixes | Bug fix? | yes/no | New feature? | yes/no | BC breaks? | no