Skip to content

Commit ea39a69

Browse files
committed
PHPStan
1 parent 6d104da commit ea39a69

File tree

3 files changed

+17
-11
lines changed

3 files changed

+17
-11
lines changed

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,5 @@ Homestead.json
2525
.phpunit.result.cache
2626

2727
cghooks.lock
28-
.php_cs.cache
2928
.php-cs-fixer.cache
3029
composer.lock

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@ Laravel package template.
88
## Installing
99

1010
```shell
11-
$ composer require overtrue/laravel-package -vvv
11+
composer require overtrue/laravel-package -vvv
1212
```
1313

1414
### Migrations
1515

16-
This step is also optional, if you want to custom the pivot table, you can publish the migration files:
16+
You can publish the migration files to your project's `database/migrations` directory and config files to `config/` directory by running:
1717

1818
```php
19-
$ php artisan vendor:publish --provider="Overtrue\\LaravelPackage\\PackageServiceProvider" --tag=migrations
19+
php artisan vendor:publish
2020
```
2121

2222
## Usage
@@ -25,9 +25,9 @@ TODO
2525

2626
### Events
2727

28-
| **Event** | **Description** |
29-
| ----------------------------------------------- | ------------------------------------------- |
30-
| `Overtrue\LaravelPackage\Events\SampleEvent` | Sample description. |
28+
| **Event** | **Description** |
29+
|----------------------------------------------|---------------------|
30+
| `Overtrue\LaravelPackage\Events\SampleEvent` | Sample description. |
3131

3232
## :heart: Sponsor me
3333

composer.json

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@
99
}
1010
],
1111
"require": {
12-
"laravel/framework": "^8.0"
12+
"laravel/framework": "^9.4",
13+
"phpstan/phpstan": "^1.4"
1314
},
1415
"autoload": {
1516
"psr-4": {
@@ -24,8 +25,7 @@
2425
"require-dev": {
2526
"mockery/mockery": "^1.2",
2627
"phpunit/phpunit": "^9.0",
27-
"orchestra/testbench": "^6.18",
28-
"brainmaestro/composer-git-hooks": "^2.8",
28+
"orchestra/testbench": "^7.1",
2929
"friendsofphp/php-cs-fixer": "^3.0",
3030
"vimeo/psalm": "^4.10",
3131
"jetbrains/phpstorm-attributes": "^1.0"
@@ -39,10 +39,11 @@
3939
"hooks": {
4040
"pre-commit": [
4141
"composer check-style",
42+
"composer phpstan",
4243
"composer test"
4344
],
4445
"pre-push": [
45-
"composer test"
46+
"composer check-style"
4647
]
4748
}
4849
},
@@ -62,12 +63,18 @@
6263
"check-style": "php-cs-fixer fix --using-cache=no --diff --dry-run --ansi",
6364
"fix-style": "php-cs-fixer fix --using-cache=no --ansi",
6465
"test": "phpunit --colors",
66+
"phpstan": "phpstan analyse",
6567
"psalm": "psalm --show-info=true --no-cache",
6668
"psalm-fix": "psalm --no-cache --alter --issues=MissingReturnType,MissingParamType"
6769
},
6870
"scripts-descriptions": {
6971
"test": "Run all tests.",
7072
"check-style": "Run style checks (only dry run - no fixing!).",
7173
"fix-style": "Run style checks and fix violations."
74+
},
75+
"config": {
76+
"allow-plugins": {
77+
"composer/package-versions-deprecated": true
78+
}
7279
}
7380
}

0 commit comments

Comments
 (0)