Skip to content

Commit 7ad3ac0

Browse files
authored
[remove] Drop nette/utils set, deprecate withComposerBased(netteUtils:) argument (#8329)
1 parent 6a7bd95 commit 7ad3ac0

13 files changed

Lines changed: 23 additions & 217 deletions

File tree

‎config/set/named-args.php‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
use Rector\CodeQuality\Rector\FuncCall\SortCallLikeNamedArgsRector;
1010
use Rector\Config\RectorConfig;
1111
use Rector\DeadCode\Rector\MethodCall\RemoveNullNamedArgOnNullDefaultParamRector;
12-
use Rector\NetteUtils\Rector\StaticCall\UtilsJsonStaticCallNamedArgRector;
1312

1413
return static function (RectorConfig $rectorConfig): void {
1514
$rectorConfig->rules([
@@ -19,6 +18,5 @@
1918
SortCallLikeNamedArgsRector::class,
2019
SortAttributeNamedArgsRector::class,
2120
ExplicitAttributeNamedArgsRector::class,
22-
UtilsJsonStaticCallNamedArgRector::class,
2321
]);
2422
};

‎config/set/nette-utils/composer-based.php‎

Lines changed: 0 additions & 12 deletions
This file was deleted.

‎rules-tests/NetteUtils/Rector/StaticCall/UtilsJsonStaticCallNamedArgRector/Fixture/fixture.php.inc‎

Lines changed: 0 additions & 33 deletions
This file was deleted.

‎rules-tests/NetteUtils/Rector/StaticCall/UtilsJsonStaticCallNamedArgRector/Fixture/skip_already_filled.php.inc‎

Lines changed: 0 additions & 14 deletions
This file was deleted.

‎rules-tests/NetteUtils/Rector/StaticCall/UtilsJsonStaticCallNamedArgRector/Fixture/skip_no_second_arg.php.inc‎

Lines changed: 0 additions & 14 deletions
This file was deleted.

‎rules-tests/NetteUtils/Rector/StaticCall/UtilsJsonStaticCallNamedArgRector/UtilsJsonStaticCallNamedArgRectorTest.php‎

Lines changed: 0 additions & 28 deletions
This file was deleted.

‎rules-tests/NetteUtils/Rector/StaticCall/UtilsJsonStaticCallNamedArgRector/config/configured_rule.php‎

Lines changed: 0 additions & 9 deletions
This file was deleted.

‎rules/NetteUtils/Rector/StaticCall/UtilsJsonStaticCallNamedArgRector.php‎

Lines changed: 0 additions & 97 deletions
This file was deleted.

‎src/Configuration/Option.php‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -260,6 +260,11 @@ final class Option
260260
*/
261261
public const string DEPRECATED_ATTRIBUTES_SETS_ARGS = 'deprecated_attributes_sets_args';
262262

263+
/**
264+
* @internal For reporting deprecated withComposerBased() arguments
265+
*/
266+
public const string DEPRECATED_COMPOSER_BASED_ARGS = 'deprecated_composer_based_args';
267+
263268
/**
264269
* @internal For collect skipped start with short open tag files to be reported
265270
*/

‎src/Configuration/RectorConfigBuilder.php‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -765,9 +765,9 @@ public function withComposerBased(
765765
$this->sets[] = SymfonySetList::COMPOSER_BASED;
766766
}
767767

768+
// deprecated, no longer applied - it only added named args to 2 methods of a single package
768769
if ($netteUtils) {
769-
// single set, as every rule inside is bound to the installed nette/utils version on its own
770-
$this->sets[] = SetList::NETTE_UTILS_COMPOSER_BASED;
770+
SimpleParameterProvider::addParameter(Option::DEPRECATED_COMPOSER_BASED_ARGS, 'netteUtils');
771771
}
772772

773773
return $this;

0 commit comments

Comments
 (0)