From 44a17cb13ac6810a35a998c57f5850c29c163800 Mon Sep 17 00:00:00 2001 From: aurimasbutkus Date: Mon, 1 Jul 2024 12:13:53 +0300 Subject: [PATCH] Laravel 11 compatibility --- .github/workflows/laravel-test.yml | 8 ++++++-- composer.json | 10 +++++----- composer.lock | 2 +- tests/Unit/GhostConnectionTest.php | 4 ++-- tests/Unit/PtOnlineSchemaChangeConnectionTest.php | 6 +++--- 5 files changed, 17 insertions(+), 13 deletions(-) diff --git a/.github/workflows/laravel-test.yml b/.github/workflows/laravel-test.yml index bae4aaf..dcc66ca 100644 --- a/.github/workflows/laravel-test.yml +++ b/.github/workflows/laravel-test.yml @@ -16,10 +16,14 @@ jobs: fail-fast: true matrix: php: [ 8.0, 8.1, 8.2, 8.3 ] - laravel: [ 8, 9, 10 ] + laravel: [ 8, 9, 10, 11 ] exclude: - php: 8.0 laravel: 10 + - php: 8.0 + laravel: 11 + - php: 8.1 + laravel: 11 services: mysql: @@ -75,4 +79,4 @@ jobs: run: vendor/bin/phpunit --testsuite=Integration env: DB_PORT: ${{ job.services.mysql.ports[3306] }} - DB_USERNAME: root \ No newline at end of file + DB_USERNAME: root diff --git a/composer.json b/composer.json index 8d10016..4223fbb 100644 --- a/composer.json +++ b/composer.json @@ -3,13 +3,13 @@ "description": "Zero downtime migrations with Laravel and percona toolkit", "require": { "php": ">=8.0", - "illuminate/database": "^8.0|^9.0|^10.0", - "illuminate/support": "^8.0|^9.0|^10.0", - "symfony/console": "^5.0|^6.0", - "symfony/process": "^5.0|^6.0" + "illuminate/database": "^8.0|^9.0|^10.0|^11.0", + "illuminate/support": "^8.0|^9.0|^10.0|^11.0", + "symfony/console": "^5.0|^6.0|^7.0", + "symfony/process": "^5.0|^6.0|^7.0" }, "require-dev": { - "orchestra/testbench": "6.*|7.*|8.*", + "orchestra/testbench": "6.*|7.*|8.*|9.*", "phpunit/phpunit": "^8.4|^9.5|^10.0", "squizlabs/php_codesniffer": "^3.3" }, diff --git a/composer.lock b/composer.lock index fdf0c55..56730d7 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "ffb4c3a93cd30c910fefb61eb3f045f3", + "content-hash": "59d2bced7a7d0a8118309b835fc266eb", "packages": [ { "name": "brick/math", diff --git a/tests/Unit/GhostConnectionTest.php b/tests/Unit/GhostConnectionTest.php index 2d18b17..bbc1153 100644 --- a/tests/Unit/GhostConnectionTest.php +++ b/tests/Unit/GhostConnectionTest.php @@ -25,7 +25,7 @@ function () { 'password' => $password, ], ]) - ->setMethods(['getProcess', 'isPretending']) + ->onlyMethods(['getProcess', 'isPretending']) ->getMock(); $connection->method('getProcess')->willReturn($process); @@ -46,7 +46,7 @@ private function getMockedProcess() { return $this->getMockBuilder(Process::class) ->setConstructorArgs([[]]) - ->setMethods(['stop', 'mustRun']) + ->onlyMethods(['stop', 'mustRun']) ->getMock(); } } diff --git a/tests/Unit/PtOnlineSchemaChangeConnectionTest.php b/tests/Unit/PtOnlineSchemaChangeConnectionTest.php index 9be431e..4ab8510 100644 --- a/tests/Unit/PtOnlineSchemaChangeConnectionTest.php +++ b/tests/Unit/PtOnlineSchemaChangeConnectionTest.php @@ -162,7 +162,7 @@ function () { 'password' => $password, ], ]) - ->setMethods(['getProcess', 'isPretending']) + ->onlyMethods(['getProcess', 'isPretending']) ->getMock(); $connection->method('getProcess')->willReturn($process); @@ -183,7 +183,7 @@ private function getMockedProcess() { return $this->getMockBuilder(Process::class) ->setConstructorArgs([[]]) - ->setMethods(['stop', 'mustRun']) + ->onlyMethods(['stop', 'mustRun']) ->getMock(); } @@ -197,7 +197,7 @@ function () { '', $config, ]) - ->setMethods(['runProcess', 'isPretending']) + ->onlyMethods(['runProcess', 'isPretending']) ->getMock(); } }