Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for PHPStan 2.0 #367

Merged
merged 4 commits into from
Dec 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
php: [8.3, 8.2, 8.1, 8.0, 7.4]
php: [8.4, 8.3, 8.2, 8.1, 8.0, 7.4]
laravel: [11.*, 10.*, 9.*, 8.*, 7.*]
dependency-version: [prefer-stable]
include:
Expand All @@ -34,12 +34,18 @@ jobs:
php: 8.0
- laravel: 10.*
php: 7.4
- laravel: 9.*
php: 8.4
- laravel: 9.*
php: 8.3
- laravel: 9.*
php: 7.4
- laravel: 8.*
php: 8.4
- laravel: 8.*
php: 8.3
- laravel: 7.*
php: 8.4
- laravel: 7.*
php: 8.3
- laravel: 7.*
Expand Down
76 changes: 38 additions & 38 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
{
"name": "spatie/laravel-ray",
"description": "Easily debug Laravel apps",
"license": "MIT",
"keywords": [
"spatie",
"laravel-ray"
],
"homepage": "https://github.com/spatie/laravel-ray",
"license": "MIT",
"authors": [
{
"name": "Freek Van der Herten",
Expand All @@ -15,29 +14,42 @@
"role": "Developer"
}
],
"homepage": "https://github.com/spatie/laravel-ray",
"funding": [
{
"type": "github",
"url": "https://github.com/sponsors/spatie"
},
{
"type": "other",
"url": "https://spatie.be/open-source/support-us"
}
],
"require": {
"php": "^7.4 || ^8.0",
"ext-json": "*",
"php": "^7.4|^8.0",
"illuminate/contracts": "^7.20|^8.19|^9.0|^10.0|^11.0",
"illuminate/database": "^7.20|^8.19|^9.0|^10.0|^11.0",
"illuminate/queue": "^7.20|^8.19|^9.0|^10.0|^11.0",
"illuminate/support": "^7.20|^8.19|^9.0|^10.0|^11.0",
"rector/rector": "^0.19.2|^1.0",
"illuminate/contracts": "^7.20 || ^8.19 || ^9.0 || ^10.0 || ^11.0",
"illuminate/database": "^7.20 || ^8.19 || ^9.0 || ^10.0 || ^11.0",
"illuminate/queue": "^7.20 || ^8.19 || ^9.0 || ^10.0 || ^11.0",
"illuminate/support": "^7.20 || ^8.19 || ^9.0 || ^10.0 || ^11.0",
"rector/rector": "dev-main",
"spatie/backtrace": "^1.0",
"spatie/ray": "^1.41.1",
"symfony/stopwatch": "4.2|^5.1|^6.0|^7.0",
"zbateson/mail-mime-parser": "^1.3.1|^2.0|^3.0"
"spatie/ray": "^1.41.3",
"symfony/stopwatch": "4.2 || ^5.1 || ^6.0 || ^7.0",
"zbateson/mail-mime-parser": "^1.3.1 || ^2.0 || ^3.0"
},
"require-dev": {
"guzzlehttp/guzzle": "^7.3",
"laravel/framework": "^7.20|^8.19|^9.0|^10.0|^11.0",
"orchestra/testbench-core": "^5.0|^6.0|^7.0|^8.0|^9.0",
"pestphp/pest": "^1.22|^2.0",
"phpstan/phpstan": "^1.10.57",
"phpunit/phpunit": "^9.3|^10.1",
"spatie/pest-plugin-snapshots": "^1.1|^2.0",
"symfony/var-dumper": "^4.2|^5.1|^6.0|^7.0.3"
"laravel/framework": "^7.20 || ^8.19 || ^9.0 || ^10.0 || ^11.0",
"orchestra/testbench-core": "^5.0 || ^6.0 || ^7.0 || ^8.0 || ^9.0",
"pestphp/pest": "^1.22 || ^2.0",
"phpstan/phpstan": "^1.10.57 || ^2.0.2",
"phpunit/phpunit": "^9.3 || ^10.1",
"spatie/pest-plugin-snapshots": "^1.1 || ^2.0",
"symfony/var-dumper": "^4.2 || ^5.1 || ^6.0 || ^7.0.3"
},
"minimum-stability": "dev",
"prefer-stable": true,
"autoload": {
"psr-4": {
"Spatie\\LaravelRay\\": "src"
Expand All @@ -48,17 +60,11 @@
"Spatie\\LaravelRay\\Tests\\": "tests"
}
},
"scripts": {
"analyse": "vendor/bin/phpstan",
"test": "vendor/bin/pest",
"test-coverage": "vendor/bin/pest --coverage",
"format": "vendor/bin/php-cs-fixer fix --allow-risky=yes"
},
"config": {
"sort-packages": true,
"allow-plugins": {
"pestphp/pest-plugin": true
}
},
"sort-packages": true
},
"extra": {
"branch-alias": {
Expand All @@ -70,16 +76,10 @@
]
}
},
"minimum-stability": "dev",
"prefer-stable": true,
"funding": [
{
"type": "github",
"url": "https://github.com/sponsors/spatie"
},
{
"type": "other",
"url": "https://spatie.be/open-source/support-us"
}
]
"scripts": {
"analyse": "vendor/bin/phpstan",
"format": "vendor/bin/php-cs-fixer fix --allow-risky=yes",
"test": "vendor/bin/pest",
"test-coverage": "vendor/bin/pest --coverage"
}
}
39 changes: 39 additions & 0 deletions phpstan-baseline.neon
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ parameters:
count: 1
path: src/Watchers/ExceptionWatcher.php

-
message: "#^Call to method createReport\\(\\) on an unknown class Spatie\\\\FlareClient\\\\Flare\\.$#"
count: 1
path: src/Watchers/ExceptionWatcher.php

-
message: "#^Call to method trim\\(\\) on an unknown class Facade\\\\FlareClient\\\\Truncation\\\\ReportTrimmer\\.$#"
count: 1
Expand Down Expand Up @@ -50,3 +55,37 @@ parameters:
count: 1
path: src/Watchers/ExceptionWatcher.php

-
message: "#^Access to an undefined property Illuminate\\\\Support\\\\Optional::\\$file.$#"
count: 1
path: src/OriginFactory.php

-
message: "#^Access to an undefined property Illuminate\\\\Support\\\\Optional::\\$lineNumber.$#"
count: 1
path: src/OriginFactory.php

-
message: "#^Call to an undefined method Illuminate\\\\Support\\\\Optional::applyCalledMethods\\(\\).$#"
count: 10
path: src/

-
message: "#^Call to an undefined method Illuminate\\\\Support\\\\Optional::getActionName\\(\\).$#"
count: 1
path: src/Watchers/RequestWatcher.php

-
message: "#^Call to an undefined method Illuminate\\\\Support\\\\Optional::gatherMiddleware\\(\\).$#"
count: 1
path: src/Watchers/RequestWatcher.php

-
message: "#^Access to protected property Illuminate\\\\Support\\\\Collection::\\$items.$#"
count: 2
path: src/RayServiceProvider.php

-
message: "#^Access to protected property Illuminate\\\\Support\\\\Stringable::\\$value.$#"
count: 2
path: src/RayServiceProvider.php
6 changes: 0 additions & 6 deletions phpstan.neon.dist
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,3 @@ parameters:
- '#^Call to method \w+\(\) on an unknown class Spatie\\WordPressRay\\Ray\.$#'
- '#^Call to method \w+\(\) on an unknown class Spatie\\RayBundle\\Ray\.$#'
- '#^Access to an undefined property Spatie\\Ray\\Settings\\Settings\:\:\$\w+\.$#'
-
message: '#^Access to an undefined property Spatie\\LaravelRay\\RayServiceProvider\:\:\$items\.$#'
path: src/RayServiceProvider.php
-
message: '#^Access to an undefined property Spatie\\LaravelRay\\RayServiceProvider\:\:\$value\.$#'
path: src/RayServiceProvider.php
Loading