forked from thephpleague/openapi-psr7-validator
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
133 additions
and
18 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,8 +4,8 @@ on: [push, pull_request] | |
|
||
jobs: | ||
|
||
build: | ||
name: Build | ||
tests: | ||
name: Tests | ||
runs-on: ubuntu-latest | ||
continue-on-error: ${{ matrix.experimental }} | ||
strategy: | ||
|
@@ -68,3 +68,27 @@ jobs: | |
|
||
- name: Run tests | ||
run: ./vendor/bin/phpcs | ||
|
||
static-analysis: | ||
name: Static analysis | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
php: | ||
- '7.2' | ||
|
||
steps: | ||
- name: Set up PHP | ||
uses: shivammathur/[email protected] | ||
with: | ||
php-version: ${{ matrix.php }} | ||
|
||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Download dependencies | ||
run: composer update --no-interaction --prefer-dist --optimize-autoloader --prefer-stable | ||
|
||
- name: Run PHPStan | ||
run: ./vendor/bin/phpstan analyse --memory-limit 512M |
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,77 @@ | ||
parameters: | ||
ignoreErrors: | ||
- | ||
message: "#^Parameter \\#4 \\$prev of static method League\\\\OpenAPIValidation\\\\PSR7\\\\Exception\\\\Validation\\\\InvalidCookies\\:\\:becauseValueDoesNotMatchSchema\\(\\) expects League\\\\OpenAPIValidation\\\\Schema\\\\Exception\\\\SchemaMismatch, Throwable\\|null given\\.$#" | ||
count: 1 | ||
path: src/PSR7/Validators/CookiesValidator/ServerRequestCookieValidator.php | ||
|
||
- | ||
message: "#^Parameter \\#1 \\$openApiSpec of class League\\\\OpenAPIValidation\\\\PSR7\\\\PathFinder constructor expects cebe\\\\openapi\\\\spec\\\\OpenApi, cebe\\\\openapi\\\\SpecObjectInterface given\\.$#" | ||
count: 2 | ||
path: tests/FromCommunity/Issue79Test.php | ||
|
||
- | ||
message: "#^Generator expects value type string, array\\<int, string\\> given\\.$#" | ||
count: 7 | ||
path: tests/FromCommunity/Issue79Test.php | ||
|
||
- | ||
message: "#^Parameter \\#1 \\$openApiSpec of class League\\\\OpenAPIValidation\\\\PSR7\\\\PathFinder constructor expects cebe\\\\openapi\\\\spec\\\\OpenApi, cebe\\\\openapi\\\\SpecObjectInterface given\\.$#" | ||
count: 4 | ||
path: tests/PSR7/PathFinderTest.php | ||
|
||
- | ||
message: "#^Method League\\\\OpenAPIValidation\\\\Tests\\\\PSR7\\\\Validators\\\\BodyValidator\\\\MultipartValidatorTest\\:\\:dataProviderMultipartRed\\(\\) should return array\\<array\\<string, string\\>\\> but returns array\\<int, array\\<int, string\\>\\>\\.$#" | ||
count: 1 | ||
path: tests/PSR7/Validators/BodyValidator/MultipartValidatorTest.php | ||
|
||
- | ||
message: "#^Method League\\\\OpenAPIValidation\\\\Tests\\\\PSR7\\\\Validators\\\\BodyValidatorTest\\:\\:dataProviderGreen\\(\\) should return array\\<array\\<string, string\\>\\> but returns array\\<int, array\\<int, League\\\\OpenAPIValidation\\\\PSR7\\\\OperationAddress\\|string\\>\\>\\.$#" | ||
count: 1 | ||
path: tests/PSR7/Validators/BodyValidatorTest.php | ||
|
||
- | ||
message: "#^Method League\\\\OpenAPIValidation\\\\Tests\\\\PSR7\\\\Validators\\\\BodyValidatorTest\\:\\:dataProviderRed\\(\\) should return array\\<array\\<string, string\\>\\> but returns array\\<int, array\\<int, string\\>\\>\\.$#" | ||
count: 1 | ||
path: tests/PSR7/Validators/BodyValidatorTest.php | ||
|
||
- | ||
message: "#^Method League\\\\OpenAPIValidation\\\\Tests\\\\Schema\\\\Keywords\\\\PatternTest\\:\\:validDataProvider\\(\\) should return array\\<array\\<string, string\\>\\> but returns array\\<int, array\\<int, string\\>\\>\\.$#" | ||
count: 1 | ||
path: tests/Schema/Keywords/PatternTest.php | ||
|
||
- | ||
message: "#^Method League\\\\OpenAPIValidation\\\\Tests\\\\Schema\\\\Keywords\\\\TypeTest\\:\\:validDataProvider\\(\\) should return array\\<array\\<string, mixed\\>\\> but returns array\\<int, array\\<int, array\\<int\\|string, int\\|string\\>\\|bool\\|float\\|int\\|string\\|null\\>\\>\\.$#" | ||
count: 1 | ||
path: tests/Schema/Keywords/TypeTest.php | ||
|
||
- | ||
message: "#^Method League\\\\OpenAPIValidation\\\\Tests\\\\Schema\\\\Keywords\\\\TypeTest\\:\\:invalidDataProvider\\(\\) should return array\\<array\\<string, mixed\\>\\> but returns array\\<int, array\\<int, array\\<int\\|string, int\\>\\|float\\|int\\|stdClass\\|string\\>\\>\\.$#" | ||
count: 1 | ||
path: tests/Schema/Keywords/TypeTest.php | ||
|
||
- | ||
message: "#^Method League\\\\OpenAPIValidation\\\\Tests\\\\Schema\\\\Keywords\\\\UniqueItemsTest\\:\\:dataProviderGreen\\(\\) should return array\\<array\\<string, array\\>\\> but returns array\\<int, array\\<int, array\\<int, array\\<int\\|string, array\\<string, int\\>\\|int\\>\\|bool\\|float\\|int\\|string\\>\\|string\\>\\>\\.$#" | ||
count: 1 | ||
path: tests/Schema/Keywords/UniqueItemsTest.php | ||
|
||
- | ||
message: "#^Method League\\\\OpenAPIValidation\\\\Tests\\\\Schema\\\\Keywords\\\\UniqueItemsTest\\:\\:dataProviderRed\\(\\) should return array\\<array\\<string, array\\>\\> but returns array\\<int, array\\<int, array\\<int, array\\<int\\|string, array\\<string, int\\>\\|int\\>\\|bool\\|int\\|string\\>\\|string\\>\\>\\.$#" | ||
count: 1 | ||
path: tests/Schema/Keywords/UniqueItemsTest.php | ||
|
||
- | ||
message: "#^Access to an undefined property cebe\\\\openapi\\\\SpecObjectInterface\\:\\:\\$schema\\.$#" | ||
count: 2 | ||
path: tests/Schema/SchemaValidatorTest.php | ||
|
||
- | ||
message: "#^Method League\\\\OpenAPIValidation\\\\Tests\\\\Schema\\\\TypeFormats\\\\StringDateTimeTest\\:\\:dateTimeGreenDataProvider\\(\\) should return array\\<string\\> but returns array\\<int, array\\<int, string\\>\\>\\.$#" | ||
count: 1 | ||
path: tests/Schema/TypeFormats/StringDateTimeTest.php | ||
|
||
- | ||
message: "#^Method League\\\\OpenAPIValidation\\\\Tests\\\\Schema\\\\TypeFormats\\\\StringDateTimeTest\\:\\:dateTimeRedDataProvider\\(\\) should return array\\<string\\> but returns array\\<int, array\\<int, string\\>\\>\\.$#" | ||
count: 1 | ||
path: tests/Schema/TypeFormats/StringDateTimeTest.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,11 @@ | ||
includes: | ||
- phpstan-baseline.neon | ||
parameters: | ||
level: 6 | ||
paths: | ||
- src | ||
- tests | ||
treatPhpDocTypesAsCertain: false | ||
ignoreErrors: | ||
- '#Unsafe usage of new static\(\)\.#' | ||
- '#Method [a-zA-Z0-9_\\]+::[a-zA-Z0-9_]+\(\) should return cebe\\openapi\\spec\\OpenApi but returns cebe\\openapi\\SpecObjectInterface\.#' |
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
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
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