You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
\trigger_error('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.', \E_USER_DEPRECATED);
@@ -205,7 +204,10 @@ public function withPreparedSets(
205
204
bool$psr12 = \false,
206
205
/** @see SetList::COMMON */
207
206
bool$common = \false,
208
-
/** @see SetList::SYMPLIFY */
207
+
/**
208
+
* @deprecated rules moved to the "common" sets. Use common: true or the with*Level() methods instead.
209
+
* @see SetList::SYMPLIFY
210
+
*/
209
211
bool$symplify = \false,
210
212
/** @see SetList::LARAVEL */
211
213
bool$laravel = \false,
@@ -226,16 +228,6 @@ public function withPreparedSets(
226
228
bool$casing = \false,
227
229
/** @see SetList::CLEANUP */
228
230
bool$cleanup = \false,
229
-
/**
230
-
* @deprecated as never worked, used different rules. Use Rector instead.
231
-
* @see SetList::PHPUNIT
232
-
*/
233
-
bool$phpunit = \false,
234
-
/**
235
-
* @deprecated as dangerous without context. Use Rector instead.
236
-
* @see SetList::STRICT
237
-
*/
238
-
bool$strict = \false,
239
231
/** @see SetList::CLEAN_CODE */
240
232
bool$cleanCode = \false
241
233
): self
@@ -268,9 +260,6 @@ public function withPreparedSets(
268
260
if ($controlStructures) {
269
261
$this->sets[] = SetList::CONTROL_STRUCTURES;
270
262
}
271
-
if ($phpunit) {
272
-
thrownewDeprecatedException('The "phpunit" set is deprecated as it is dangerous to run without proper context. Please use Rector instead.');
273
-
}
274
263
if ($comments) {
275
264
$this->sets[] = SetList::COMMENTS;
276
265
}
@@ -281,15 +270,12 @@ public function withPreparedSets(
281
270
$this->sets[] = SetList::CLEANUP;
282
271
}
283
272
}
284
-
if ($strict) {
285
-
// throw exception, as deprecated
286
-
thrownewDeprecatedException('The "strict" set is deprecated as it is dangerous without context. Remove the "strict: true" from ->withPreparedSets(strict: true, ...) call in "ecs.php" and use Rector instead to make sure you are not breaking your code.');
287
-
}
288
273
if ($cleanCode) {
289
274
$this->sets[] = SetList::CLEAN_CODE;
290
275
}
291
276
if ($symplify) {
292
-
$this->sets[] = SetList::SYMPLIFY;
277
+
// soft-deprecated: rules moved to the "common" sets, still loaded for backward compatibility
278
+
trigger_error('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.', \E_USER_DEPRECATED);
293
279
}
294
280
if ($laravel) {
295
281
$this->sets[] = SetList::LARAVEL;
@@ -485,15 +471,6 @@ public function withPhpCsFixerSets(bool $doctrineAnnotation = \false, bool $per
485
471
*/
486
472
publicfunctionwithSets(array$sets): self
487
473
{
488
-
// report deprecated STRICT set
489
-
foreach ($setsas$set) {
490
-
if ($set === SetList::STRICT) {
491
-
thrownewDeprecatedException('The "strict" set is deprecated as it is dangerous without context. Use Rector instead to make sure you are not breaking your code');
492
-
}
493
-
if ($set === SetList::PHPUNIT) {
494
-
thrownewDeprecatedException('The "phpunit" set is deprecated as it is dangerous to run without proper context. Please use Rector instead.');
0 commit comments