Skip to content

Commit 1dace7f

Browse files
committed
cleanup
1 parent 0e5e759 commit 1dace7f

2 files changed

Lines changed: 4 additions & 30 deletions

File tree

src/Configuration/ECSConfigBuilder.php

Lines changed: 4 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@
2828
use Symplify\EasyCodingStandard\Configuration\Levels\LevelRulesResolver;
2929
use Symplify\EasyCodingStandard\Exception\Configuration\InitializationException;
3030
use Symplify\EasyCodingStandard\Exception\Configuration\SuperfluousConfigurationException;
31-
use Symplify\EasyCodingStandard\Exception\DeprecatedException;
3231
use Symplify\EasyCodingStandard\ValueObject\Option;
3332
use Symplify\EasyCodingStandard\ValueObject\Set\SetList;
3433

@@ -333,8 +332,10 @@ public function withPreparedSets(
333332

334333
if ($symplify) {
335334
// 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+
);
338339
}
339340

340341
if ($laravel) {
@@ -654,21 +655,6 @@ public function withPhpCsFixerSets(
654655
*/
655656
public function withSets(array $sets): self
656657
{
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-
672658
$this->sets = [...$this->sets, ...$sets];
673659

674660
return $this;

src/ValueObject/Set/SetList.php

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -55,23 +55,11 @@ final class SetList
5555
*/
5656
public const string NAMESPACES = __DIR__ . '/../../../config/set/common/namespaces.php';
5757

58-
/**
59-
* @api
60-
* @deprecated as dangerous without context. Use Rector instead.
61-
*/
62-
public const string PHPUNIT = __DIR__ . '/../../../config/set/common/phpunit.php';
63-
6458
/**
6559
* @api
6660
*/
6761
public const string SPACES = __DIR__ . '/../../../config/set/common/spaces.php';
6862

69-
/**
70-
* @api
71-
* @deprecated as dangerous without context. Use Rector instead.
72-
*/
73-
public const string STRICT = __DIR__ . '/../../../config/set/common/strict.php';
74-
7563
/**
7664
* @api
7765
*/

0 commit comments

Comments
 (0)