From 56b1f714f2d285a0aa1888fe1b5c3e54490a5cde Mon Sep 17 00:00:00 2001 From: Tomas Votruba Date: Wed, 5 Aug 2026 14:08:59 +0200 Subject: [PATCH] [Sets] Ignore the deprecated set objects in TwigSetProvider rectorphp/rector-src#8296 deprecates the set objects in favor of bonding rules with the ComposerPackageConstraintInterface. Twig is still resolved through a composer-triggered set, so the provider keeps using them until its rules are bonded. The entry is not reported when unmatched, so it holds both before and after the deprecation is released. --- phpstan.neon | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/phpstan.neon b/phpstan.neon index f26c752e..d8d97f27 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -89,5 +89,11 @@ parameters: path: src/ValueObjectFactory/ServiceMapFactory.php message: '#"@simplexml_load_string\(\$fileContents\)" is forbidden to use#' - - + # the set objects are deprecated in favor of the ComposerPackageConstraintInterface, but Twig is still + # resolved through a composer-triggered set + # @see https://github.com/rectorphp/rector-src/pull/8296 + - + message: '#deprecated (class|interface) Rector\\Set\\#' + path: src/Set/SetProvider/TwigSetProvider.php + # the deprecation is not released yet, so the errors are not reported here yet either + reportUnmatched: false