-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
php: Split phpstan tests into a separate workflow (#325)
- Loading branch information
Showing
7 changed files
with
98 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
name: PHPStan | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
phpstan: | ||
uses: icinga/github-actions/.github/workflows/phpstan.yml@main | ||
with: | ||
dependencies: | | ||
{ | ||
"/icingaweb2" : "https://github.com/Icinga/icingaweb2.git", | ||
"/usr/share/icingaweb2-modules/icingadb" : "https://github.com/Icinga/icingadb-web.git" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
parameters: | ||
ignoreErrors: | ||
- | ||
message: "#^Parameter \\#1 \\$str of function urldecode expects string, mixed given\\.$#" | ||
count: 1 | ||
path: application/controllers/HostsController.php | ||
|
||
- | ||
message: "#^Parameter \\#1 \\$str of function urldecode expects string, mixed given\\.$#" | ||
count: 1 | ||
path: application/controllers/ServicesController.php | ||
|
||
- | ||
message: "#^Argument of an invalid type array\\<int, string\\>\\|false supplied for foreach, only iterables are supported\\.$#" | ||
count: 1 | ||
path: library/Graphite/Util/MacroTemplate.php | ||
|
||
- | ||
message: "#^Cannot access offset int on non\\-empty\\-array\\<int, string\\>\\|false\\.$#" | ||
count: 1 | ||
path: library/Graphite/Util/MacroTemplate.php | ||
|
||
- | ||
message: "#^Parameter \\#1 \\$var of function count expects array\\|Countable, array\\<int, string\\>\\|false given\\.$#" | ||
count: 1 | ||
path: library/Graphite/Util/MacroTemplate.php | ||
|
||
- | ||
message: "#^Property Icinga\\\\Module\\\\Graphite\\\\Util\\\\MacroTemplate\\:\\:\\$template \\(array\\<string\\>\\) does not accept array\\<int, string\\>\\|false\\.$#" | ||
count: 1 | ||
path: library/Graphite/Util/MacroTemplate.php | ||
|
||
- | ||
message: "#^Parameter \\#1 \\$str of function strtolower expects string, mixed given\\.$#" | ||
count: 1 | ||
path: library/Graphite/Web/Controller/MonitoringAwareController.php |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
parameters: | ||
ignoreErrors: | ||
- | ||
message: "#^Parameter \\#1 \\$string of function urldecode expects string, mixed given\\.$#" | ||
count: 1 | ||
path: application/controllers/HostsController.php | ||
|
||
- | ||
message: "#^Parameter \\#1 \\$string of function urldecode expects string, mixed given\\.$#" | ||
count: 1 | ||
path: application/controllers/ServicesController.php | ||
|
||
- | ||
message: "#^Parameter \\#1 \\$separator of function explode expects non\\-empty\\-string, string given\\.$#" | ||
count: 1 | ||
path: library/Graphite/Util/MacroTemplate.php | ||
|
||
- | ||
message: "#^Parameter \\#1 \\$string of function strtolower expects string, mixed given\\.$#" | ||
count: 1 | ||
path: library/Graphite/Web/Controller/MonitoringAwareController.php |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<?php | ||
|
||
$includes = []; | ||
if (PHP_VERSION_ID < 80000) { | ||
$includes[] = __DIR__ . '/phpstan-baseline-7x.neon'; | ||
} else { | ||
$includes[] = __DIR__ . '/phpstan-baseline-8x.neon'; | ||
} | ||
|
||
return [ | ||
'includes' => $includes | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters