diff --git a/.github/dependabot.yml b/.github/dependabot.yml index ce40aac..dfe57b2 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -16,13 +16,11 @@ updates: # Specify a name for the group, which will be used in pull request titles # and branch names minor-patch-dependencies: + applies-to: "version-updates" # Define patterns to include dependencies in the group (based on # dependency name) patterns: - "*" - # update-types: - # - "minor" - # - "patch" exclude-patterns: - "friendsofphp/php-cs-fixer" - "sirbrillig/phpcs-variable-analysis" @@ -48,13 +46,66 @@ updates: include: "scope" prefix: "composer" - # ignore: - # - dependency-name: slevomat/coding-standard - # versions: - # - ">= 0" - # - dependency-name: phpunit/phpunit - # versions: - # - ">= 0" + #allow: + # - '*' + + ignore: + - dependency-name: "laminas/laminas-servicemanager" + - dependency-name: "psr/container" + - dependency-name: "nikic/php-parser" + - dependency-name: "infection/infection" + - dependency-name: "psr/http-message" + - dependency-name: "psr/simple-cache" + + # Disable rebasing for all pull requests + rebase-strategy: "disabled" + + #- package-ecosystem: "composer" + # + # directory: "/" + # + # schedule: + # interval: "daily" + # + # groups: + # # Specify a name for the group, which will be used in pull request titles + # # and branch names + # minor-patch-dependencies: + # applies-to: "version-updates" + # # Define patterns to include dependencies in the group (based on + # # dependency name) + # patterns: + # - "*" + # + # open-pull-requests-limit: 10 + # + # reviewers: + # - "mimmi20" + # + # assignees: + # - "mimmi20" + # + # labels: + # - "dependencies" + # + # versioning-strategy: "widen" + # + # target-branch: "master" + # + # commit-message: + # include: "scope" + # prefix: "composer" + # + # allow: + # - dependency-name: "psr/container" + # - dependency-name: "infection/infection" + # - dependency-name: "nikic/php-parser" + # - dependency-name: "psr/http-message" + # - dependency-name: "laminas/laminas-servicemanager" + # - dependency-name: "psr/simple-cache" + # + # # Disable rebasing for all pull requests + # rebase-strategy: "disabled" - package-ecosystem: "github-actions" @@ -67,15 +118,11 @@ updates: # Specify a name for the group, which will be used in pull request titles # and branch names minor-patch-dependencies: + applies-to: "version-updates" # Define patterns to include dependencies in the group (based on # dependency name) patterns: - "*" - # update-types: - # - "minor" - # - "patch" - # exclude-patterns: - # - "gc_ruboconfig" open-pull-requests-limit: 10 @@ -92,3 +139,6 @@ updates: commit-message: prefix: "github-actions" + + # Disable rebasing for all pull requests + rebase-strategy: "disabled" diff --git a/.github/renovate.json5 b/.github/renovate.json5 index 6b87b59..83c28df 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", "laminas/laminas-servicemanager", "psr/simple-cache"], "rangeStrategy": "widen" }, { 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 d68650b..7ef03e7 100644 --- a/composer.json +++ b/composer.json @@ -42,6 +42,7 @@ "phpstan/extension-installer": "^1.4.1", "phpstan/phpstan": "^1.11.4", "phpstan/phpstan-deprecation-rules": "^1.2.0", + "rector/type-perfect": "^0.1.3", "symplify/phpstan-rules": "^13.0.0", "tomasvotruba/cognitive-complexity": "^0.2.3", "tomasvotruba/type-coverage": "^0.3.1", diff --git a/phpstan.neon b/phpstan.neon index 787bf12..52b2e97 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -39,11 +39,8 @@ parameters: # reports function and method calls with incorrect name case checkFunctionNameCase: true - # it requires type variables always be specified in typehints - checkGenericClassInNonGenericObjectType: true - # be strict about values with an unspecified (implicit mixed) type - checkImplicitMixed: false + checkImplicitMixed: false # todo: fix # reports references to built-in classes with incorrect name case checkInternalClassCaseSensitivity: true @@ -118,14 +115,17 @@ parameters: constants: true local_methods: true + type_perfect: + null_over_false: true + no_mixed: true + narrow_param: true + # ignoreErrors: # - '~PHP_CodeSniffer\\Files\\File~' # - '~PHP_CodeSniffer\\Sniffs\\Sniff~' rules: # code complexity - - Symplify\PHPStanRules\Rules\Explicit\NoMixedPropertyFetcherRule - - Symplify\PHPStanRules\Rules\Explicit\NoMixedMethodCallerRule - Symplify\PHPStanRules\Rules\NoDynamicNameRule # - Symplify\PHPStanRules\Rules\NoReturnArrayVariableListRule # todo: fix @@ -135,25 +135,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 @@ -170,8 +159,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