Skip to content

Commit

Permalink
Adds Laravel 10 Support (#4)
Browse files Browse the repository at this point in the history
* Adds Laravel 10 Support

* Update tests.yaml

* Replace `moln/php-mysql-replication`

---------

Co-authored-by: Deeka Wong <[email protected]>
  • Loading branch information
huangdijia and huangdijia authored Mar 14, 2023
1 parent 7543b71 commit 367be85
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 15 deletions.
6 changes: 6 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
/.vscode export-ignore
/.github export-ignore
/.gitattributes export-ignore
/.gitignore export-ignore
/.php-cs-fixer.php export-ignore
/phpstan.neon
20 changes: 14 additions & 6 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,28 +4,36 @@ on: [push, pull_request]

jobs:
ci:
name: Test on PHP ${{ matrix.php-version }}
name: Test on PHP ${{ matrix.php }} - Laravel ${{ matrix.laravel }}
runs-on: "${{ matrix.os }}"
strategy:
matrix:
os: [ubuntu-latest]
php-version: ['8.0', '8.1', '8.2']
php: ['8.0', '8.1', '8.2']
laravel: [9, 10]
exclude:
- php: 8.0
laravel: 10
# - php: 8.2
# laravel: 8
max-parallel: 4
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
php-version: ${{ matrix.php }}
extensions: redis, pdo, pdo_mysql, bcmath
tools: phpize
coverage: none
- name: Setup Packages
run: composer update -o
- name: Install Dependencies
run: |
composer require "laravel/framework:^${{ matrix.laravel }}" --no-update
composer update --prefer-dist --no-interaction --no-progress
- name: Run Cs Fixer
run: |
if [ "${{ matrix.php-version }}" == "8.2" ]; then
if [ "${{ matrix.php }}" == "8.2" ]; then
PHP_CS_FIXER_IGNORE_ENV=true ./vendor/bin/php-cs-fixer fix $1 --dry-run --diff --verbose --show-progress=dots
else
./vendor/bin/php-cs-fixer fix $1 --dry-run --diff --verbose --show-progress=dots
Expand Down
3 changes: 3 additions & 0 deletions .vscode/cspell.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"words": []
}
5 changes: 1 addition & 4 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,5 @@
"php-cs-fixer.autoFixByBracket": true,
"php-cs-fixer.autoFixBySemicolon": false,
"php-cs-fixer.formatHtml": true,
"php-cs-fixer.documentFormattingProvider": true,
"cSpell.words": [
"stringable"
],
"php-cs-fixer.documentFormattingProvider": true
}
11 changes: 6 additions & 5 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@
"email": "[email protected]"
}],
"require": {
"illuminate/support": "^9.0",
"illuminate/console": "^9.0",
"krowinski/php-mysql-replication": "^7.0"
"illuminate/support": "^9.0|^10.0",
"illuminate/console": "^9.0|^10.0",
"moln/php-mysql-replication": "^1.2"
},
"require-dev": {
"friendsofphp/php-cs-fixer": "^3.0",
"orchestra/testbench": "^7.0",
"orchestra/testbench": "^7.0|^8.0",
"phpstan/phpstan": "^1.0"
},
"autoload": {
Expand All @@ -40,7 +40,8 @@
"config": {
"allow-plugins": {
"composer/package-versions-deprecated": true
}
},
"sort-packages": true
},
"scripts": {
"analyse": "phpstan analyse --memory-limit 300M -l 0 -c phpstan.neon ./src",
Expand Down

0 comments on commit 367be85

Please sign in to comment.