Skip to content

Commit 367be85

Browse files
authored
Adds Laravel 10 Support (#4)
* Adds Laravel 10 Support * Update tests.yaml * Replace `moln/php-mysql-replication` --------- Co-authored-by: Deeka Wong <[email protected]>
1 parent 7543b71 commit 367be85

File tree

5 files changed

+30
-15
lines changed

5 files changed

+30
-15
lines changed

Diff for: .gitattributes

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
/.vscode export-ignore
2+
/.github export-ignore
3+
/.gitattributes export-ignore
4+
/.gitignore export-ignore
5+
/.php-cs-fixer.php export-ignore
6+
/phpstan.neon

Diff for: .github/workflows/tests.yaml

+14-6
Original file line numberDiff line numberDiff line change
@@ -4,28 +4,36 @@ on: [push, pull_request]
44

55
jobs:
66
ci:
7-
name: Test on PHP ${{ matrix.php-version }}
7+
name: Test on PHP ${{ matrix.php }} - Laravel ${{ matrix.laravel }}
88
runs-on: "${{ matrix.os }}"
99
strategy:
1010
matrix:
1111
os: [ubuntu-latest]
12-
php-version: ['8.0', '8.1', '8.2']
12+
php: ['8.0', '8.1', '8.2']
13+
laravel: [9, 10]
14+
exclude:
15+
- php: 8.0
16+
laravel: 10
17+
# - php: 8.2
18+
# laravel: 8
1319
max-parallel: 4
1420
steps:
1521
- name: Checkout
1622
uses: actions/checkout@v2
1723
- name: Setup PHP
1824
uses: shivammathur/setup-php@v2
1925
with:
20-
php-version: ${{ matrix.php-version }}
26+
php-version: ${{ matrix.php }}
2127
extensions: redis, pdo, pdo_mysql, bcmath
2228
tools: phpize
2329
coverage: none
24-
- name: Setup Packages
25-
run: composer update -o
30+
- name: Install Dependencies
31+
run: |
32+
composer require "laravel/framework:^${{ matrix.laravel }}" --no-update
33+
composer update --prefer-dist --no-interaction --no-progress
2634
- name: Run Cs Fixer
2735
run: |
28-
if [ "${{ matrix.php-version }}" == "8.2" ]; then
36+
if [ "${{ matrix.php }}" == "8.2" ]; then
2937
PHP_CS_FIXER_IGNORE_ENV=true ./vendor/bin/php-cs-fixer fix $1 --dry-run --diff --verbose --show-progress=dots
3038
else
3139
./vendor/bin/php-cs-fixer fix $1 --dry-run --diff --verbose --show-progress=dots

Diff for: .vscode/cspell.json

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"words": []
3+
}

Diff for: .vscode/settings.json

+1-4
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,5 @@
1515
"php-cs-fixer.autoFixByBracket": true,
1616
"php-cs-fixer.autoFixBySemicolon": false,
1717
"php-cs-fixer.formatHtml": true,
18-
"php-cs-fixer.documentFormattingProvider": true,
19-
"cSpell.words": [
20-
"stringable"
21-
],
18+
"php-cs-fixer.documentFormattingProvider": true
2219
}

Diff for: composer.json

+6-5
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@
1414
"email": "[email protected]"
1515
}],
1616
"require": {
17-
"illuminate/support": "^9.0",
18-
"illuminate/console": "^9.0",
19-
"krowinski/php-mysql-replication": "^7.0"
17+
"illuminate/support": "^9.0|^10.0",
18+
"illuminate/console": "^9.0|^10.0",
19+
"moln/php-mysql-replication": "^1.2"
2020
},
2121
"require-dev": {
2222
"friendsofphp/php-cs-fixer": "^3.0",
23-
"orchestra/testbench": "^7.0",
23+
"orchestra/testbench": "^7.0|^8.0",
2424
"phpstan/phpstan": "^1.0"
2525
},
2626
"autoload": {
@@ -40,7 +40,8 @@
4040
"config": {
4141
"allow-plugins": {
4242
"composer/package-versions-deprecated": true
43-
}
43+
},
44+
"sort-packages": true
4445
},
4546
"scripts": {
4647
"analyse": "phpstan analyse --memory-limit 300M -l 0 -c phpstan.neon ./src",

0 commit comments

Comments
 (0)