Skip to content

Commit

Permalink
Merge pull request #28 from laravel/chore/adds-type-checking
Browse files Browse the repository at this point in the history
[1.x] Adds type checking
  • Loading branch information
taylorotwell authored Feb 23, 2023
2 parents 4dd0f94 + 66023cb commit fe94e2b
Show file tree
Hide file tree
Showing 5 changed files with 50 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,5 @@
.gitignore export-ignore
.styleci.yml export-ignore
CHANGELOG.md export-ignore
phpstan.neon.dist export-ignore
phpunit.xml.dist export-ignore
41 changes: 41 additions & 0 deletions .github/workflows/static-analysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: static analysis

on:
push:
branches:
- master
- '*.x'
pull_request:

permissions:
contents: read

jobs:
tests:
runs-on: ubuntu-22.04

strategy:
fail-fast: true

name: Static Analysis

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.2
tools: composer:v2
coverage: none

- name: Install dependencies
uses: nick-fields/retry@v2
with:
timeout_minutes: 5
max_attempts: 5
command: composer update --prefer-stable --prefer-dist --no-interaction --no-progress

- name: Execute type checking
run: vendor/bin/phpstan
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
strategy:
fail-fast: true
matrix:
php: [7.1, 7.2, 7.3, 7.4, '8.0', 8.1, 8.2]
php: [7.2, 7.3, 7.4, '8.0', 8.1, 8.2]

name: PHP ${{ matrix.php }}

Expand Down
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,11 @@
}
],
"require": {
"php": "^7.1.3|^8.0",
"php": "^7.2.0|^8.0",
"illuminate/support": "~5.8.0|^6.0|^7.0|^8.0|^9.0|^10.0"
},
"require-dev": {
"phpstan/phpstan": "^1.10",
"phpunit/phpunit": "^7.0|^8.0|^9.0"
},
"autoload": {
Expand Down
5 changes: 5 additions & 0 deletions phpstan.neon.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
parameters:
paths:
- src

level: 0

0 comments on commit fe94e2b

Please sign in to comment.