Skip to content

Commit

Permalink
[2.x] Adds L11 and PHP 8.3 support (#114)
Browse files Browse the repository at this point in the history
* Adds Symfony 7 support

* Adds PHP 8.3 support and adjusts workflow

* Fixes table already exists on L10 and L11

* Adjusts work flow
  • Loading branch information
nunomaduro authored Oct 17, 2023
1 parent 8eeafda commit 932d097
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 8 deletions.
29 changes: 26 additions & 3 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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.*
Expand All @@ -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.*
Expand All @@ -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
Expand Down
8 changes: 4 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
5 changes: 4 additions & 1 deletion src/Sushi.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 932d097

Please sign in to comment.