|
28 | 28 | use Symplify\EasyCodingStandard\Configuration\Levels\LevelRulesResolver; |
29 | 29 | use Symplify\EasyCodingStandard\Exception\Configuration\InitializationException; |
30 | 30 | use Symplify\EasyCodingStandard\Exception\Configuration\SuperfluousConfigurationException; |
31 | | -use Symplify\EasyCodingStandard\Exception\DeprecatedException; |
32 | 31 | use Symplify\EasyCodingStandard\ValueObject\Option; |
33 | 32 | use Symplify\EasyCodingStandard\ValueObject\Set\SetList; |
34 | 33 |
|
@@ -333,8 +332,10 @@ public function withPreparedSets( |
333 | 332 |
|
334 | 333 | if ($symplify) { |
335 | 334 | // soft-deprecated: rules moved to the "common" sets, still loaded for backward compatibility |
336 | | - // deprecation warning is emitted on set import, see config/set/symplify.php |
337 | | - $this->sets[] = SetList::SYMPLIFY; |
| 335 | + trigger_error( |
| 336 | + 'The "symplify" set is deprecated. Its rules now live in the "common" sets - use ->withPreparedSets(common: true) or the matching ->withDocblockLevel()/->withSpacesLevel()/->withArrayLevel() methods instead.', |
| 337 | + E_USER_DEPRECATED |
| 338 | + ); |
338 | 339 | } |
339 | 340 |
|
340 | 341 | if ($laravel) { |
@@ -654,21 +655,6 @@ public function withPhpCsFixerSets( |
654 | 655 | */ |
655 | 656 | public function withSets(array $sets): self |
656 | 657 | { |
657 | | - // report deprecated STRICT set |
658 | | - foreach ($sets as $set) { |
659 | | - if ($set === SetList::STRICT) { |
660 | | - throw new DeprecatedException( |
661 | | - 'The "strict" set is deprecated as it is dangerous without context. Use Rector instead to make sure you are not breaking your code' |
662 | | - ); |
663 | | - } |
664 | | - |
665 | | - if ($set === SetList::PHPUNIT) { |
666 | | - throw new DeprecatedException( |
667 | | - 'The "phpunit" set is deprecated as it is dangerous to run without proper context. Please use Rector instead.' |
668 | | - ); |
669 | | - } |
670 | | - } |
671 | | - |
672 | 658 | $this->sets = [...$this->sets, ...$sets]; |
673 | 659 |
|
674 | 660 | return $this; |
|
0 commit comments