diff --git a/.github/renovate.json5 b/.github/renovate.json5 index f025f16..b3b7636 100644 --- a/.github/renovate.json5 +++ b/.github/renovate.json5 @@ -51,7 +51,7 @@ "rangeStrategy": "widen" }, { - "matchPackageNames": ["nikic/php-parser", "infection/infection"], + "matchPackageNames": ["nikic/php-parser", "infection/infection", "psr/container", "psr/http-message"], "rangeStrategy": "widen" }, { diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index cc68752..86d216f 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -57,7 +57,7 @@ jobs: skip-phpmd: false tests: - name: "UnitTests & Code Coverage" + name: "UnitTests with PHPUnit" needs: "analytics" diff --git a/.github/workflows/lint-workflow-files.yml b/.github/workflows/lint-workflow-files.yml index 0ff71c6..86e6ab9 100644 --- a/.github/workflows/lint-workflow-files.yml +++ b/.github/workflows/lint-workflow-files.yml @@ -18,6 +18,14 @@ jobs: lfs: false persist-credentials: false + - name: "install libimagequant-dev" + run: "sudo apt-get install libimagequant-dev -y" + + - name: "Use Node.js 20" + uses: "actions/setup-node@v4" + with: + node-version: "20" + - name: "Check workflow files" uses: "raven-actions/actionlint@v1" with: diff --git a/composer.json b/composer.json index c2c5a70..28d7888 100644 --- a/composer.json +++ b/composer.json @@ -36,13 +36,14 @@ "laminas/laminas-servicemanager": "^3.22.1", "mimmi20/coding-standard": "^5.2.33", "nikic/php-parser": "^4.19.1 || ^5.0.2", - "phpstan/extension-installer": "^1.3.1", - "phpstan/phpstan": "^1.11.3", + "phpstan/extension-installer": "^1.4.1", + "phpstan/phpstan": "^1.11.4", "phpstan/phpstan-deprecation-rules": "^1.2.0", "phpstan/phpstan-phpunit": "^1.4.0", "phpunit/phpunit": "^10.5.20", "rector/rector": "^1.1.0", - "symplify/phpstan-rules": "^12.7.0", + "rector/type-perfect": "^0.1.3", + "symplify/phpstan-rules": "^13.0.0", "tomasvotruba/cognitive-complexity": "^0.2.3", "tomasvotruba/type-coverage": "^0.3.0", "tomasvotruba/unused-public": "^0.3.9" diff --git a/phpstan.neon b/phpstan.neon index 9aa2454..f7f8903 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -114,6 +114,11 @@ parameters: constants: true local_methods: true + type_perfect: + null_over_false: true + no_mixed: true + narrow_param: true + ignoreErrors: - '~Parameter #1 \$options of static method Mimmi20\\Routing\\Router\\HostName::factory\(\) expects array{host\?: string, hosts\?: array, defaults\?: array}\|bool\|Traversable, ~' - '~is not subtype of Throwable~' @@ -122,8 +127,6 @@ parameters: rules: # code complexity - - Symplify\PHPStanRules\Rules\Explicit\NoMixedPropertyFetcherRule - - Symplify\PHPStanRules\Rules\Explicit\NoMixedMethodCallerRule - Symplify\PHPStanRules\Rules\NoDynamicNameRule # - Symplify\PHPStanRules\Rules\NoReturnArrayVariableListRule # todo: fix @@ -133,25 +136,14 @@ rules: - Symplify\PHPStanRules\Rules\Domain\RequireExceptionNamespaceRule - Symplify\PHPStanRules\Rules\Domain\RequireAttributeNamespaceRule - Symplify\PHPStanRules\Rules\Enum\RequireUniqueEnumConstantRule - - Symplify\PHPStanRules\Rules\ForbiddenParamTypeRemovalRule - Symplify\PHPStanRules\Rules\PreventParentMethodVisibilityOverrideRule # paths - - Symplify\PHPStanRules\Rules\NoMissingDirPathRule - - Symplify\PHPStanRules\Rules\NoReferenceRule # References are required - - Symplify\PHPStanRules\Rules\NoArrayAccessOnObjectRule - - - Symplify\PHPStanRules\Rules\NoNullableArrayPropertyRule - - # dead-code - - Symplify\PHPStanRules\Rules\NoIssetOnObjectRule + - Symplify\PHPStanRules\Rules\NoReferenceRule # explicit naming - Symplify\PHPStanRules\Rules\ForbiddenMultipleClassLikeInOneFileRule - # comlexity - - Symplify\PHPStanRules\Rules\NarrowType\NoReturnFalseInNonBoolClassMethodRule - - Symplify\PHPStanRules\Rules\Complexity\ForbiddenArrayMethodCallRule # - Symplify\PHPStanRules\Rules\CheckRequiredInterfaceInContractNamespaceRule @@ -168,8 +160,4 @@ rules: - Symplify\PHPStanRules\Rules\NoReturnSetterMethodRule - Symplify\PHPStanRules\Rules\UppercaseConstantRule - Symplify\PHPStanRules\Rules\ClassNameRespectsParentSuffixRule - - Symplify\PHPStanRules\Rules\CheckTypehintCallerTypeRule - Symplify\PHPStanRules\Rules\CheckClassNamespaceFollowPsr4Rule - -includes: - - vendor/symplify/phpstan-rules/config/collector-rules.neon