Skip to content

Commit

Permalink
Adds laravel 10 support (#10)
Browse files Browse the repository at this point in the history
* Adds laravel 10 support

Co-authored-by: Deeka Wong <[email protected]>
  • Loading branch information
huangdijia and huangdijia authored Jan 9, 2023
1 parent 2598b6e commit 2123135
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 17 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 export-ignore
26 changes: 17 additions & 9 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,33 +4,41 @@ 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
- name: Checkout code
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, swoole
tools: phpize
coverage: none
- name: Setup Packages
run: composer update -o
- name: Run Cs Fixer
- name: Install dependencies
run: |
if [ "${{ matrix.php-version }}" = "8.2" ]; then
composer require "laravel/framework:^${{ matrix.laravel }}" --no-update
composer update --prefer-dist --no-interaction --no-progress
- name: Run cs fixer
run: |
if [ "${{ matrix.php }}" = "8.2" ]; then
PHP_CS_FIXER_IGNORE_ENV=true php vendor/bin/php-cs-fixer fix --diff --dry-run --verbose
else
php vendor/bin/php-cs-fixer fix --diff --dry-run --verbose
fi
- name: Run Analyse
- name: Run analyse
run: |
# composer analyse src
php vendor/bin/phpstan analyse --memory-limit 300M -l 0 -c phpstan.neon ./src
Expand Down
6 changes: 6 additions & 0 deletions .vscode/cspell.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{

"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
}
9 changes: 5 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@
}],
"require": {
"php": ">=8.0",
"illuminate/support": "^9.0",
"illuminate/console": "^9.0",
"illuminate/bus": "^9.0",
"illuminate/support": "^9.0|^10.0",
"illuminate/console": "^9.0|^10.0",
"illuminate/bus": "^9.0|^10.0",
"laravel/horizon": "^5.0"
},
"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,6 +40,7 @@
]
}
},
"minimum-stability": "dev",
"scripts": {
"analyse": "phpstan analyse --memory-limit 300M -l 0 -c phpstan.neon ./src",
"cs-fix": "php-cs-fixer fix $1"
Expand Down

0 comments on commit 2123135

Please sign in to comment.