From 6c3e36904584e960b11f93e6b75884186659433f Mon Sep 17 00:00:00 2001 From: Dries Vints Date: Fri, 16 May 2025 09:26:38 +0200 Subject: [PATCH 1/4] Do not export changelog to source control Seems we forgot to update this when we moved changelogs to a single file. --- .gitattributes | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitattributes b/.gitattributes index 7e0ca4441814..2b658b97786d 100644 --- a/.gitattributes +++ b/.gitattributes @@ -14,7 +14,7 @@ .gitattributes export-ignore .gitignore export-ignore .styleci.yml export-ignore -CHANGELOG-* export-ignore +CHANGELOG.md export-ignore CODE_OF_CONDUCT.md export-ignore CONTRIBUTING.md export-ignore docker-compose.yml export-ignore From 4807fee12b8ebaa876aee49cdea4cebc1b3f6eac Mon Sep 17 00:00:00 2001 From: Graham Campbell Date: Mon, 19 May 2025 13:53:09 +0100 Subject: [PATCH 2/4] [11.x] Backport `TestResponse::assertRedirectBack` (#55780) * Backport `TestResponse::assertRedirectBack` * Backport tests too --- src/Illuminate/Testing/TestResponse.php | 17 +++++++++++++++++ tests/Testing/TestResponseTest.php | 21 +++++++++++++++++++++ 2 files changed, 38 insertions(+) diff --git a/src/Illuminate/Testing/TestResponse.php b/src/Illuminate/Testing/TestResponse.php index c0a468a7d0f0..d3abdacd9bcb 100644 --- a/src/Illuminate/Testing/TestResponse.php +++ b/src/Illuminate/Testing/TestResponse.php @@ -214,6 +214,23 @@ public function assertRedirectContains($uri) return $this; } + /** + * Assert whether the response is redirecting back to the previous location. + * + * @return $this + */ + public function assertRedirectBack() + { + PHPUnit::withResponse($this)->assertTrue( + $this->isRedirect(), + $this->statusMessageWithDetails('201, 301, 302, 303, 307, 308', $this->getStatusCode()), + ); + + $this->assertLocation(app('url')->previous()); + + return $this; + } + /** * Assert whether the response is redirecting to a given route. * diff --git a/tests/Testing/TestResponseTest.php b/tests/Testing/TestResponseTest.php index 9de88ddff3f3..e1964202063e 100644 --- a/tests/Testing/TestResponseTest.php +++ b/tests/Testing/TestResponseTest.php @@ -2631,6 +2631,27 @@ public function testAssertRedirect() $response->assertRedirect(); } + public function testAssertRedirectBack() + { + app()->instance('session.store', $store = new Store('test-session', new ArraySessionHandler(1))); + + $store->setPreviousUrl('https://url.com'); + + app('url')->setSessionResolver(fn () => app('session.store')); + + $response = TestResponse::fromBaseResponse( + (new Response('', 302))->withHeaders(['Location' => 'https://url.com']) + ); + + $response->assertRedirectBack(); + + $this->expectException(ExpectationFailedException::class); + + $store->setPreviousUrl('https://url.net'); + + $response->assertRedirectBack(); + } + public function testGetDecryptedCookie() { $response = TestResponse::fromBaseResponse( From d0730deb427632004d24801be7ca1ed2c10fbc4e Mon Sep 17 00:00:00 2001 From: taylorotwell <463230+taylorotwell@users.noreply.github.com> Date: Tue, 20 May 2025 15:15:58 +0000 Subject: [PATCH 3/4] Update version to v11.45.0 --- src/Illuminate/Foundation/Application.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Illuminate/Foundation/Application.php b/src/Illuminate/Foundation/Application.php index 61546f679b2b..d2d9c3362732 100755 --- a/src/Illuminate/Foundation/Application.php +++ b/src/Illuminate/Foundation/Application.php @@ -45,7 +45,7 @@ class Application extends Container implements ApplicationContract, CachesConfig * * @var string */ - const VERSION = '11.44.7'; + const VERSION = '11.45.0'; /** * The base path for the Laravel installation. From 382a6d5e5c0fca1f1e3d0bf54b46fe75a757ef7f Mon Sep 17 00:00:00 2001 From: taylorotwell <463230+taylorotwell@users.noreply.github.com> Date: Tue, 20 May 2025 15:17:42 +0000 Subject: [PATCH 4/4] Update CHANGELOG --- CHANGELOG.md | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 453ba8d2aac6..4f635e994899 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,16 @@ # Release Notes for 11.x -## [Unreleased](https://github.com/laravel/framework/compare/v11.44.7...11.x) +## [Unreleased](https://github.com/laravel/framework/compare/v11.45.0...11.x) + +## [v11.45.0](https://github.com/laravel/framework/compare/v11.44.7...v11.45.0) - 2025-05-20 + +* [11.x] Test Improvements by [@crynobone](https://github.com/crynobone) in https://github.com/laravel/framework/pull/55549 +* [11.x] Install Passport 13.x by [@hafezdivandari](https://github.com/hafezdivandari) in https://github.com/laravel/framework/pull/55621 +* [11.x] Bump minimum league/commonmark by [@andrextor](https://github.com/andrextor) in https://github.com/laravel/framework/pull/55660 +* Backporting Timebox fixes to 11.x by [@valorin](https://github.com/valorin) in https://github.com/laravel/framework/pull/55705 +* Test SQLServer 2017 on Ubuntu 22.04 by [@crynobone](https://github.com/crynobone) in https://github.com/laravel/framework/pull/55716 +* [11.x] Fix Symfony 7.3 deprecations by [@crynobone](https://github.com/crynobone) in https://github.com/laravel/framework/pull/55711 +* [11.x] Backport `TestResponse::assertRedirectBack` by [@GrahamCampbell](https://github.com/GrahamCampbell) in https://github.com/laravel/framework/pull/55780 ## [v11.44.7](https://github.com/laravel/framework/compare/v11.44.6...v11.44.7) - 2025-04-25