diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 57a8fb9..057ba4a 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -13,10 +13,13 @@ jobs: strategy: matrix: - php: [7.1, 7.2, 7.3, 7.4, '8.0', 8.1, 8.2] - laravel: [5.8.*, 6.*, 7.*, 8.*, 9.*, 10.*] + php: [7.1, 7.2, 7.3, 7.4, '8.0', 8.1, 8.2, 8.3] + laravel: [5.8.*, 6.*, 7.*, 8.*, 9.*, 10.*, 11.*] os: [ubuntu-latest] include: + - laravel: 11.* + testbench: 9.* + dbal: 3.* - laravel: 10.* testbench: 8.* dbal: 3.* @@ -42,24 +45,32 @@ jobs: php: 8.1 - laravel: 5.8.* php: 8.2 + - laravel: 5.8.* + php: 8.3 - laravel: 6.* php: 7.1 - laravel: 6.* php: 8.1 - laravel: 6.* php: 8.2 + - laravel: 6.* + php: 8.3 - laravel: 7.* php: 7.1 - laravel: 7.* php: 8.1 - laravel: 7.* php: 8.2 + - laravel: 7.* + php: 8.3 - laravel: 8.* php: 7.1 - laravel: 8.* php: 7.2 - laravel: 8.* php: 8.2 + - laravel: 8.* + php: 8.3 - laravel: 9.* php: 7.1 - laravel: 9.* @@ -78,12 +89,24 @@ jobs: php: 7.4 - laravel: 10.* php: '8.0' + - laravel: 11.* + php: 7.1 + - laravel: 11.* + php: 7.2 + - laravel: 11.* + php: 7.3 + - laravel: 11.* + php: 7.4 + - laravel: 11.* + php: '8.0' + - laravel: 11.* + php: '8.1' name: PHP ${{ matrix.php }} / Laravel ${{ matrix.laravel }} steps: - name: Checkout the code - uses: actions/checkout@v1 + uses: actions/checkout@v4 - name: Setup PHP uses: shivammathur/setup-php@v2 diff --git a/composer.json b/composer.json index 8813ec5..de80566 100644 --- a/composer.json +++ b/composer.json @@ -10,13 +10,13 @@ ], "require": { "php": "^7.1.3|^8.0", - "illuminate/database": "^5.8 || ^6.0 || ^7.0 || ^8.0 || ^9.0 || ^10.0", - "illuminate/support": "^5.8 || ^6.0 || ^7.0 || ^8.0 || ^9.0 || ^10.0" + "illuminate/database": "^5.8 || ^6.0 || ^7.0 || ^8.0 || ^9.0 || ^10.0 || ^11.0", + "illuminate/support": "^5.8 || ^6.0 || ^7.0 || ^8.0 || ^9.0 || ^10.0 || ^11.0" }, "require-dev": { "doctrine/dbal": "^2.9 || ^3.1.4", - "orchestra/testbench": "3.8.* || 3.9.* || ^4.0 || ^6.0 || ^7.0 || ^8.0", - "phpunit/phpunit": "^7.5 || ^8.4 || ^9.0" + "orchestra/testbench": "3.8.* || 3.9.* || ^4.0 || ^6.0 || ^7.0 || ^8.0 || ^9.0", + "phpunit/phpunit": "^7.5 || ^8.4 || ^9.0 || ^10.0" }, "autoload": { "psr-4": { diff --git a/src/Sushi.php b/src/Sushi.php index 2320e50..4433812 100644 --- a/src/Sushi.php +++ b/src/Sushi.php @@ -190,7 +190,10 @@ protected function createTableSafely(string $tableName, Closure $callback) try { $schemaBuilder->create($tableName, $callback); } catch (QueryException $e) { - if (Str::contains($e->getMessage(), 'already exists (SQL: create table')) { + if (Str::contains($e->getMessage(), [ + 'already exists (SQL: create table', + sprintf('table "%s" already exists', $tableName), + ])) { // This error can happen in rare circumstances due to a race condition. // Concurrent requests may both see the necessary preconditions for // the table creation, but only one can actually succeed.