Skip to content

Commit 4ff61e6

Browse files
committed
phpstan
1 parent 2677503 commit 4ff61e6

24 files changed

+139
-185
lines changed

.github/CONTRIBUTING.md

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

.github/FUNDING.yml

Lines changed: 0 additions & 1 deletion
This file was deleted.

.github/ISSUE_TEMPLATE/config.yml

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

.github/SECURITY.md

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

.github/workflows/phpstan.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Static code analysis
2+
3+
on:
4+
push:
5+
paths:
6+
- '**.php'
7+
- 'phpstan.neon'
8+
9+
jobs:
10+
phpstan:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Checkout code
15+
uses: actions/checkout@v2
16+
17+
- name: Setup PHP
18+
uses: shivammathur/setup-php@v2
19+
with:
20+
php-version: 8.0
21+
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick, fileinfo
22+
coverage: none
23+
24+
- name: Install dependencies
25+
run: composer install --prefer-dist --no-interaction
26+
27+
- name: Run PHPStan
28+
run: ./vendor/bin/phpstan analyse --memory-limit=2G --error-format=github

.github/workflows/psalm.yml

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

.github/workflows/run-tests.yml

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,11 @@ on: [push]
44

55
jobs:
66
test:
7-
name: MySQL ${{ matrix.mysql }}
8-
97
runs-on: ubuntu-latest
108

11-
strategy:
12-
fail-fast: false
13-
matrix:
14-
mysql: [8.0]
15-
169
services:
1710
mysql:
18-
image: mysql:${{ matrix.mysql }}
11+
image: mysql:8.0
1912
env:
2013
MYSQL_ALLOW_EMPTY_PASSWORD: yes
2114
MYSQL_DATABASE: laravel_eloquent_spatial_test

composer.json

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,9 @@
2424
"require-dev": {
2525
"friendsofphp/php-cs-fixer": "^2.17",
2626
"matt-allan/laravel-code-style": "^0.6.0",
27+
"nunomaduro/larastan": "^0.7.0",
2728
"orchestra/testbench": "^6.0",
28-
"phpunit/phpunit": "^9.3",
29-
"psalm/plugin-laravel": "^1.4",
30-
"vimeo/psalm": "^4.3"
29+
"phpunit/phpunit": "^9.3"
3130
},
3231
"autoload": {
3332
"psr-4": {
@@ -45,7 +44,7 @@
4544
},
4645
"scripts": {
4746
"style-fix": "./vendor/bin/php-cs-fixer fix --allow-risky=yes",
48-
"psalm": "vendor/bin/psalm",
47+
"phpstan": "vendor/bin/phpstan analyse --memory-limit=2G",
4948
"test": "vendor/bin/phpunit --colors=always",
5049
"test-coverage": "vendor/bin/phpunit --coverage-html coverage"
5150
},

phpstan.neon

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
includes:
2+
- ./vendor/nunomaduro/larastan/extension.neon
3+
parameters:
4+
paths:
5+
- src
6+
- tests
7+
level: max
8+
excludePaths:
9+
- ./src/Factory.php
10+
checkMissingIterableValueType: true

psalm.xml.dist

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

0 commit comments

Comments
 (0)