From 1e562244a5bbe2aeab4da3459505ca865d76fc73 Mon Sep 17 00:00:00 2001 From: Tomas Votruba Date: Sun, 14 Jun 2026 19:16:52 +0200 Subject: [PATCH 1/3] misc --- composer.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/composer.json b/composer.json index b79fad78..4679691c 100644 --- a/composer.json +++ b/composer.json @@ -5,17 +5,17 @@ "license": "MIT", "require": { "php": "^8.4", - "webmozart/assert": "^2.0", + "webmozart/assert": "^2.4", "phpstan/phpstan": "^2.2", "nette/utils": "^4.1", "phpstan/phpdoc-parser": "^2.3" }, "require-dev": { "nikic/php-parser": "^5.7", - "phpunit/phpunit": "^13.0", - "symfony/framework-bundle": "^6.2", - "illuminate/container": "^11.0", - "symplify/easy-coding-standard": "^13.1", + "phpunit/phpunit": "^13.2", + "symfony/framework-bundle": "^6.4", + "illuminate/container": "^11.51", + "symplify/easy-coding-standard": "^13.2", "tomasvotruba/class-leak": "^2.1", "rector/rector": "^2.4", "phpstan/extension-installer": "^1.4", From 10bc4c015bf8ef1a852e7fea811953ab0c726764 Mon Sep 17 00:00:00 2001 From: Tomas Votruba Date: Sun, 14 Jun 2026 19:21:18 +0200 Subject: [PATCH 2/3] nest parameters under symplify vendor, as convention --- config/ctor-rules.neon | 8 +++++++- config/mock-rules.neon | 6 ++++-- config/phpstan-extensions.neon | 14 ++++++++------ config/services/services.neon | 30 +++++++++++++++++++++++++++++- 4 files changed, 48 insertions(+), 10 deletions(-) diff --git a/config/ctor-rules.neon b/config/ctor-rules.neon index e5bb8715..3b67881a 100644 --- a/config/ctor-rules.neon +++ b/config/ctor-rules.neon @@ -1,6 +1,12 @@ parameters: # enables NewOverSettersRule, disabled by default - ctor: false + # + # parameters: + # symplify: + # ctor: true + # + # kept flat for backward compatibility, defaults to %symplify.ctor% + ctor: %symplify.ctor% parametersSchema: ctor: bool() diff --git a/config/mock-rules.neon b/config/mock-rules.neon index 6e3db73d..f96f3df9 100644 --- a/config/mock-rules.neon +++ b/config/mock-rules.neon @@ -1,10 +1,12 @@ # PHPUnit mocking rules, enable in your phpstan.neon with: # # parameters: -# mocks: true +# symplify: +# mocks: true parameters: - mocks: false + # kept flat for backward compatibility, defaults to %symplify.mocks% + mocks: %symplify.mocks% parametersSchema: mocks: bool() diff --git a/config/phpstan-extensions.neon b/config/phpstan-extensions.neon index 5a9deab4..de1e14a0 100644 --- a/config/phpstan-extensions.neon +++ b/config/phpstan-extensions.neon @@ -1,14 +1,16 @@ # return type extensions are disabled by default; enable in your phpstan.neon with: # # parameters: -# symfonyReturnType: true -# laravelReturnType: true -# pathStrings: true +# symplify: +# symfonyReturnType: true +# laravelReturnType: true +# pathStrings: true parameters: - symfonyReturnType: false - laravelReturnType: false - pathStrings: false + # kept flat for backward compatibility, default to the %symplify.*% nested values + symfonyReturnType: %symplify.symfonyReturnType% + laravelReturnType: %symplify.laravelReturnType% + pathStrings: %symplify.pathStrings% parametersSchema: symfonyReturnType: bool() diff --git a/config/services/services.neon b/config/services/services.neon index 504f113a..9e5bd5f4 100644 --- a/config/services/services.neon +++ b/config/services/services.neon @@ -1,8 +1,36 @@ parameters: + # nested configuration, the clear and preferred way to configure these rules: + # + # parameters: + # symplify: + # mocks: true + # ctor: true + # symfonyReturnType: true + # laravelReturnType: true + # pathStrings: true + # maximumIgnoredErrorCount: 0 + symplify: + mocks: false + ctor: false + symfonyReturnType: false + laravelReturnType: false + pathStrings: false + maximumIgnoredErrorCount: 0 + # related to MaximumIgnoredErrorCountRule - maximumIgnoredErrorCount: 0 + # kept flat for backward compatibility, defaults to the nested value above + maximumIgnoredErrorCount: %symplify.maximumIgnoredErrorCount% parametersSchema: + symplify: structure([ + mocks: bool() + ctor: bool() + symfonyReturnType: bool() + laravelReturnType: bool() + pathStrings: bool() + maximumIgnoredErrorCount: int() + ]) + # related to MaximumIgnoredErrorCountRule maximumIgnoredErrorCount: int() From 1546456d9353c6ae5d2ca0b8abe263cf7c6d89c5 Mon Sep 17 00:00:00 2001 From: Tomas Votruba Date: Sun, 14 Jun 2026 19:26:49 +0200 Subject: [PATCH 3/3] next --- config/phpstan-extensions.neon | 3 +++ config/services/services.neon | 32 ++++---------------------------- config/symplify-parameters.neon | 31 +++++++++++++++++++++++++++++++ 3 files changed, 38 insertions(+), 28 deletions(-) create mode 100644 config/symplify-parameters.neon diff --git a/config/phpstan-extensions.neon b/config/phpstan-extensions.neon index de1e14a0..c90ce4da 100644 --- a/config/phpstan-extensions.neon +++ b/config/phpstan-extensions.neon @@ -6,6 +6,9 @@ # laravelReturnType: true # pathStrings: true +includes: + - symplify-parameters.neon + parameters: # kept flat for backward compatibility, default to the %symplify.*% nested values symfonyReturnType: %symplify.symfonyReturnType% diff --git a/config/services/services.neon b/config/services/services.neon index 9e5bd5f4..188a8fba 100644 --- a/config/services/services.neon +++ b/config/services/services.neon @@ -1,36 +1,12 @@ -parameters: - # nested configuration, the clear and preferred way to configure these rules: - # - # parameters: - # symplify: - # mocks: true - # ctor: true - # symfonyReturnType: true - # laravelReturnType: true - # pathStrings: true - # maximumIgnoredErrorCount: 0 - symplify: - mocks: false - ctor: false - symfonyReturnType: false - laravelReturnType: false - pathStrings: false - maximumIgnoredErrorCount: 0 +includes: + - ../symplify-parameters.neon +parameters: # related to MaximumIgnoredErrorCountRule - # kept flat for backward compatibility, defaults to the nested value above + # kept flat for backward compatibility, defaults to %symplify.maximumIgnoredErrorCount% maximumIgnoredErrorCount: %symplify.maximumIgnoredErrorCount% parametersSchema: - symplify: structure([ - mocks: bool() - ctor: bool() - symfonyReturnType: bool() - laravelReturnType: bool() - pathStrings: bool() - maximumIgnoredErrorCount: int() - ]) - # related to MaximumIgnoredErrorCountRule maximumIgnoredErrorCount: int() diff --git a/config/symplify-parameters.neon b/config/symplify-parameters.neon new file mode 100644 index 00000000..46ae5551 --- /dev/null +++ b/config/symplify-parameters.neon @@ -0,0 +1,31 @@ +# Nested configuration, the clear and preferred way to configure these rules: +# +# parameters: +# symplify: +# mocks: true +# ctor: true +# symfonyReturnType: true +# laravelReturnType: true +# pathStrings: true +# maximumIgnoredErrorCount: 0 +# +# The flat parameters (e.g. "mocks: true") are kept for backward compatibility +# and default to their nested "symplify.*" counterpart. +parameters: + symplify: + mocks: false + ctor: false + symfonyReturnType: false + laravelReturnType: false + pathStrings: false + maximumIgnoredErrorCount: 0 + +parametersSchema: + symplify: structure([ + mocks: bool() + ctor: bool() + symfonyReturnType: bool() + laravelReturnType: bool() + pathStrings: bool() + maximumIgnoredErrorCount: int() + ])