Skip to content

Commit 00b2a98

Browse files
Bugfix - Self referential foreign key creating separate migration (#87)
* Fix self referential constraint being created as a separate file * Pull in laravel pint, use it for formatting * Add test * Add a matrix for testing * Include php version in keys
1 parent eb120d3 commit 00b2a98

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+384
-965
lines changed

.github/workflows/php.yml

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ on:
88

99
jobs:
1010
build:
11+
strategy:
12+
matrix:
13+
php: ['7.4', '8.0', '8.1']
1114
runs-on: ubuntu-latest
1215

1316
steps:
@@ -16,22 +19,25 @@ jobs:
1619
- name: Setup PHP
1720
uses: shivammathur/setup-php@v2
1821
with:
19-
php-version: '7.4'
22+
php-version: ${{ matrix.php }}
2023

2124
- name: Cache Composer packages
2225
id: composer-cache
2326
uses: actions/cache@v2
2427
with:
2528
path: vendor
26-
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
29+
key: ${{ runner.os }}-php-${{ matrix.php }}-${{ hashFiles('**/composer.lock') }}
2730
restore-keys: |
28-
${{ runner.os }}-php-
31+
${{ runner.os }}-php-${{ matrix.php }}-
32+
33+
- name: Remove pint if not PHP 8.1
34+
run: |
35+
if [ '${{ matrix.php }}' != '8.1' ]; then
36+
composer remove laravel/pint --dev
37+
fi
2938
3039
- name: Install dependencies
3140
run: composer install --prefer-dist --no-progress
3241

33-
# Add a test script to composer.json, for instance: "test": "vendor/bin/phpunit"
34-
# Docs: https://getcomposer.org/doc/articles/scripts.md
35-
3642
- name: Run test suite
3743
run: composer run test

.php_cs

Lines changed: 0 additions & 108 deletions
This file was deleted.

composer.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
},
3030
"require-dev": {
3131
"orchestra/testbench": "^6.17|^8.0|^9.0",
32-
"friendsofphp/php-cs-fixer": "^2.16|^3.14"
32+
"laravel/pint": "^1.15"
3333
},
3434
"scripts": {
3535
"post-autoload-dump": [
@@ -38,7 +38,7 @@
3838
"test": [
3939
"vendor/bin/phpunit"
4040
],
41-
"lint": "vendor/bin/php-cs-fixer fix"
41+
"lint": "vendor/bin/pint"
4242
},
4343
"extra": {
4444
"laravel": {
@@ -48,4 +48,4 @@
4848
}
4949
},
5050
"prefer-stable": true
51-
}
51+
}

0 commit comments

Comments
 (0)