Skip to content

Commit

Permalink
bump: PHPQA 1.85 (#116)
Browse files Browse the repository at this point in the history
* fix: switch back to sh for all shells

* infra: add Analyze to build

* fix: docker-compose => docker compose

* feat: bump PHPQA image

* fix: use make init to streamline config

* infra: fix build

* infra: fix build

* infra: fix build

* config: fix common config files
  • Loading branch information
dkarlovi authored Mar 16, 2023
1 parent bd2fa44 commit 3f1366f
Show file tree
Hide file tree
Showing 22 changed files with 415 additions and 63 deletions.
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
/docs export-ignore
/tests export-ignore
/.* export-ignore
/*dist export-ignore
/*baseline* export-ignore
/composer.lock export-ignore
/Makefile export-ignore
/package.json export-ignore
16 changes: 14 additions & 2 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,18 @@ on:
- "main"

jobs:
CodeQualityAnalysis:
runs-on: ubuntu-latest
steps:
-
name: Repo checkout
uses: actions/checkout@v3
-
name: Install dependencies
run: make composer/install
-
name: Run code quality analysis
run: make analyze
Test:
runs-on: ${{ matrix.operating-system }}
strategy:
Expand All @@ -17,8 +29,8 @@ jobs:
with:
php-version: 8.2
extensions: mbstring, intl
ini-values: post_max_size=256M, max_execution_time=180
tools: php-cs-fixer
coverage: xdebug
ini-values: post_max_size=256M, max_execution_time=180, xdebug.mode=develop
-
name: Repo checkout
uses: actions/checkout@v3
Expand Down
151 changes: 151 additions & 0 deletions phpstan.baseline.neon
Original file line number Diff line number Diff line change
@@ -0,0 +1,151 @@
parameters:
ignoreErrors:
-
message: "#^Method Sigwin\\\\Infra\\\\Test\\\\Functional\\\\Common\\\\DefaultTest\\:\\:getExpectedHelpCommandsExecutionPath\\(\\) return type has no value type specified in iterable type array\\.$#"
count: 1
path: tests/functional/Common/DefaultTest.php

-
message: "#^Method Sigwin\\\\Infra\\\\Test\\\\Functional\\\\Common\\\\DefaultTest\\:\\:getExpectedInitPaths\\(\\) return type has no value type specified in iterable type array\\.$#"
count: 1
path: tests/functional/Common/DefaultTest.php

-
message: "#^Method Sigwin\\\\Infra\\\\Test\\\\Functional\\\\MakefileTestCase\\:\\:dryRun\\(\\) has parameter \\$args with no value type specified in iterable type array\\.$#"
count: 1
path: tests/functional/MakefileTestCase.php

-
message: "#^Method Sigwin\\\\Infra\\\\Test\\\\Functional\\\\MakefileTestCase\\:\\:dryRun\\(\\) return type has no value type specified in iterable type array\\.$#"
count: 1
path: tests/functional/MakefileTestCase.php

-
message: "#^Method Sigwin\\\\Infra\\\\Test\\\\Functional\\\\MakefileTestCase\\:\\:execute\\(\\) has parameter \\$args with no value type specified in iterable type array\\.$#"
count: 1
path: tests/functional/MakefileTestCase.php

-
message: "#^Method Sigwin\\\\Infra\\\\Test\\\\Functional\\\\MakefileTestCase\\:\\:generateHelpCommandsExecutionPathFixtures\\(\\) return type has no value type specified in iterable type array\\.$#"
count: 1
path: tests/functional/MakefileTestCase.php

-
message: "#^Method Sigwin\\\\Infra\\\\Test\\\\Functional\\\\MakefileTestCase\\:\\:generateHelpExecutionPath\\(\\) has parameter \\$additionalFiles with no value type specified in iterable type array\\.$#"
count: 1
path: tests/functional/MakefileTestCase.php

-
message: "#^Method Sigwin\\\\Infra\\\\Test\\\\Functional\\\\MakefileTestCase\\:\\:generateHelpExecutionPath\\(\\) has parameter \\$files with no value type specified in iterable type array\\.$#"
count: 1
path: tests/functional/MakefileTestCase.php

-
message: "#^Method Sigwin\\\\Infra\\\\Test\\\\Functional\\\\MakefileTestCase\\:\\:generateHelpList\\(\\) has parameter \\$commands with no value type specified in iterable type array\\.$#"
count: 1
path: tests/functional/MakefileTestCase.php

-
message: "#^Method Sigwin\\\\Infra\\\\Test\\\\Functional\\\\MakefileTestCase\\:\\:generatePermissionsExecutionPath\\(\\) has parameter \\$dirs with no value type specified in iterable type array\\.$#"
count: 1
path: tests/functional/MakefileTestCase.php

-
message: "#^Method Sigwin\\\\Infra\\\\Test\\\\Functional\\\\MakefileTestCase\\:\\:generatePermissionsExecutionPath\\(\\) return type has no value type specified in iterable type array\\.$#"
count: 1
path: tests/functional/MakefileTestCase.php

-
message: "#^Method Sigwin\\\\Infra\\\\Test\\\\Functional\\\\MakefileTestCase\\:\\:getExpectedHelpCommandsExecutionPath\\(\\) return type has no value type specified in iterable type array\\.$#"
count: 1
path: tests/functional/MakefileTestCase.php

-
message: "#^Method Sigwin\\\\Infra\\\\Test\\\\Functional\\\\MakefileTestCase\\:\\:getExpectedInitPaths\\(\\) return type has no value type specified in iterable type array\\.$#"
count: 1
path: tests/functional/MakefileTestCase.php

-
message: "#^Method Sigwin\\\\Infra\\\\Test\\\\Functional\\\\MakefileTestCase\\:\\:getMakefileHelpCommands\\(\\) return type has no value type specified in iterable type array\\.$#"
count: 1
path: tests/functional/MakefileTestCase.php

-
message: "#^Method Sigwin\\\\Infra\\\\Test\\\\Functional\\\\MakefileTestCase\\:\\:testMakefileCommandsWork\\(\\) has parameter \\$expected with no value type specified in iterable type array\\.$#"
count: 1
path: tests/functional/MakefileTestCase.php

-
message: "#^Property Sigwin\\\\Infra\\\\Test\\\\Functional\\\\MakefileTestCase\\:\\:\\$help type has no value type specified in iterable type array\\.$#"
count: 1
path: tests/functional/MakefileTestCase.php

-
message: "#^Property Sigwin\\\\Infra\\\\Test\\\\Functional\\\\MakefileTestCase\\:\\:\\$helpOverride type has no value type specified in iterable type array\\.$#"
count: 1
path: tests/functional/MakefileTestCase.php

-
message: "#^Method Sigwin\\\\Infra\\\\Test\\\\Functional\\\\PHP\\\\LibraryTest\\:\\:getExpectedHelpCommandsExecutionPath\\(\\) return type has no value type specified in iterable type array\\.$#"
count: 1
path: tests/functional/PHP/LibraryTest.php

-
message: "#^Method Sigwin\\\\Infra\\\\Test\\\\Functional\\\\PHP\\\\LibraryTest\\:\\:getExpectedInitPaths\\(\\) return type has no value type specified in iterable type array\\.$#"
count: 1
path: tests/functional/PHP/LibraryTest.php

-
message: "#^Method Sigwin\\\\Infra\\\\Test\\\\Functional\\\\PHP\\\\LibraryTest\\:\\:paths\\(\\) return type has no value type specified in iterable type array\\.$#"
count: 1
path: tests/functional/PHP/LibraryTest.php

-
message: "#^Method Sigwin\\\\Infra\\\\Test\\\\Functional\\\\Pimcore\\\\ApplicationTest\\:\\:getExpectedHelpCommandsExecutionPath\\(\\) return type has no value type specified in iterable type array\\.$#"
count: 1
path: tests/functional/Pimcore/ApplicationTest.php

-
message: "#^Method Sigwin\\\\Infra\\\\Test\\\\Functional\\\\Pimcore\\\\ApplicationTest\\:\\:getExpectedInitPaths\\(\\) return type has no value type specified in iterable type array\\.$#"
count: 1
path: tests/functional/Pimcore/ApplicationTest.php

-
message: "#^Method Sigwin\\\\Infra\\\\Test\\\\Functional\\\\Pimcore\\\\ApplicationTest\\:\\:paths\\(\\) return type has no value type specified in iterable type array\\.$#"
count: 1
path: tests/functional/Pimcore/ApplicationTest.php

-
message: "#^Method Sigwin\\\\Infra\\\\Test\\\\Functional\\\\Pimcore\\\\LibraryTest\\:\\:getExpectedHelpCommandsExecutionPath\\(\\) return type has no value type specified in iterable type array\\.$#"
count: 1
path: tests/functional/Pimcore/LibraryTest.php

-
message: "#^Method Sigwin\\\\Infra\\\\Test\\\\Functional\\\\Pimcore\\\\LibraryTest\\:\\:getExpectedInitPaths\\(\\) return type has no value type specified in iterable type array\\.$#"
count: 1
path: tests/functional/Pimcore/LibraryTest.php

-
message: "#^Method Sigwin\\\\Infra\\\\Test\\\\Functional\\\\Pimcore\\\\LibraryTest\\:\\:paths\\(\\) return type has no value type specified in iterable type array\\.$#"
count: 1
path: tests/functional/Pimcore/LibraryTest.php

-
message: "#^Method Sigwin\\\\Infra\\\\Test\\\\Functional\\\\YASSG\\\\CompatTest\\:\\:getExpectedHelpCommandsExecutionPath\\(\\) return type has no value type specified in iterable type array\\.$#"
count: 1
path: tests/functional/YASSG/CompatTest.php

-
message: "#^Method Sigwin\\\\Infra\\\\Test\\\\Functional\\\\YASSG\\\\CompatTest\\:\\:getExpectedInitPaths\\(\\) return type has no value type specified in iterable type array\\.$#"
count: 1
path: tests/functional/YASSG/CompatTest.php

-
message: "#^Method Sigwin\\\\Infra\\\\Test\\\\Functional\\\\YASSG\\\\CompatTest\\:\\:paths\\(\\) return type has no value type specified in iterable type array\\.$#"
count: 1
path: tests/functional/YASSG/CompatTest.php

-
message: "#^Property Sigwin\\\\Infra\\\\Test\\\\Functional\\\\YASSG\\\\CompatTest\\:\\:\\$helpOverride type has no value type specified in iterable type array\\.$#"
count: 1
path: tests/functional/YASSG/CompatTest.php
6 changes: 3 additions & 3 deletions phpstan.neon.dist
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ includes:
- /tools/.composer/vendor-bin/phpstan/vendor/phpstan/phpstan-strict-rules/rules.neon
- /tools/.composer/vendor-bin/phpstan/vendor/phpstan/phpstan-phpunit/extension.neon
- /tools/.composer/vendor-bin/phpstan/vendor/phpstan/phpstan-symfony/extension.neon
- phpstan.baseline.neon
parameters:
checkMissingIterableValueType: false
checkGenericClassInNonGenericObjectType: false
tmpDir: %currentWorkingDirectory%/var/phpqa/phpstan
level: max
paths:
- ./
excludePaths:
- resources/PHP/php-cs-fixer.php
- resources/
- var/
- vendor/
9 changes: 6 additions & 3 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -1,22 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.5/phpunit.xsd"
beStrictAboutChangesToGlobalState="true"
beStrictAboutCoversAnnotation="true"
beStrictAboutOutputDuringTests="true"
beStrictAboutResourceUsageDuringSmallTests="true"
beStrictAboutTodoAnnotatedTests="true"
bootstrap="./vendor/autoload.php"
cacheResult="false"
cacheResultFile="var/phpqa/phpunit.result.cache"
colors="true"
convertDeprecationsToExceptions="true"
enforceTimeLimit="true"
executionOrder="random"
failOnEmptyTestSuite="true"
failOnRisky="true"
failOnWarning="true"
forceCoversAnnotation="true"
verbose="true">
<testsuites>
<testsuite name="Suite">
<directory>tests</directory>
<directory>./tests</directory>
</testsuite>
</testsuites>
</phpunit>
Loading

0 comments on commit 3f1366f

Please sign in to comment.