From b731b394906a35734b3a054525c113e8d85997ce Mon Sep 17 00:00:00 2001 From: zia Date: Fri, 15 Mar 2024 13:07:50 +0500 Subject: [PATCH 1/2] support for laravel 11 --- .github/workflows/run-tests.yml | 17 +++++++++++++---- composer.json | 8 ++++---- tests/TestCase.php | 10 ++++++++++ 3 files changed, 27 insertions(+), 8 deletions(-) diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index 1f30ca7..a4e853b 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -13,14 +13,23 @@ jobs: fail-fast: true matrix: os: [ubuntu-latest] - php: [8.1,8.2] - laravel: [9.*,10.*] + php: [8.0,8.1,8.2] + laravel: ["^11.0", "^10.0", "^9.0"] stability: [prefer-stable] include: - - laravel: 10.* + - laravel: "^11.0" + testbench: 9.* + - laravel: "^10.0" testbench: 8.* - - laravel: 9.* + - laravel: "^9.0" testbench: 7.* + exclude: + - laravel: "^11.0" + php: 8.1 + - laravel: "^11.0" + php: 8.0 + - laravel: "^10.0" + php: 8.0 name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }} - ${{ matrix.os }} diff --git a/composer.json b/composer.json index 2151739..144a367 100644 --- a/composer.json +++ b/composer.json @@ -21,14 +21,14 @@ "require": { "php": "^8.0.2|^8.1|^8.2", "guzzlehttp/guzzle": "^7.0", - "illuminate/contracts": "^9.0|^10.0", - "laravel/telescope": "^4.0", + "illuminate/contracts": "^11.0|^10.0|^9.0", + "laravel/telescope": "^5.0", "spatie/laravel-package-tools": "^1.14.0" }, "require-dev": { "laravel/pint": "^1.0", - "nunomaduro/collision": "^7.9|^6.0", - "orchestra/testbench": "^8.0|^7.0" + "nunomaduro/collision": "^8.0|^7.9|^6.0", + "orchestra/testbench": "^9.0|^8.0|^7.0" }, "autoload": { "psr-4": { diff --git a/tests/TestCase.php b/tests/TestCase.php index 84fe925..8eedb36 100644 --- a/tests/TestCase.php +++ b/tests/TestCase.php @@ -83,4 +83,14 @@ public function terminateTelescope() { Telescope::store(app(EntriesRepository::class)); } + + protected function beforeRefreshingDatabase() + { + if (version_compare($this->app->version(), '11.0.0', '>=')) { + $config = $this->app->get('config'); + $config->set('database.migrations.update_date_on_publish', false); + } + + $this->artisan('vendor:publish', ['--tag' => 'telescope-migrations']); + } } From 05e96634c2db4b52734d844c0451593e56661973 Mon Sep 17 00:00:00 2001 From: ziarv Date: Fri, 15 Mar 2024 08:08:19 +0000 Subject: [PATCH 2/2] Fix styling --- src/TelescopeGuzzleRecorder.php | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/TelescopeGuzzleRecorder.php b/src/TelescopeGuzzleRecorder.php index ae4ead9..f30a0b6 100644 --- a/src/TelescopeGuzzleRecorder.php +++ b/src/TelescopeGuzzleRecorder.php @@ -73,7 +73,6 @@ public function contentWithinLimits($content) /** * Format the given response object. * - * @param \MuhammadHuzaifa\TelescopeGuzzleWatcher\Response $response * @return array|string */ protected function response(Response $response) @@ -176,7 +175,6 @@ protected function hideParameters($data, $hidden) /** * Extract the input from the given request. * - * @param \MuhammadHuzaifa\TelescopeGuzzleWatcher\Request $request * @return array */ protected function input(Request $request) @@ -217,7 +215,6 @@ protected function input(Request $request) /** * Extract the query string from the given request url * - * @param \MuhammadHuzaifa\TelescopeGuzzleWatcher\Request $request * @return array */ protected function queryString(Request $request)