From 49bdd12148b861c84189bfed7cc9692c802e126d Mon Sep 17 00:00:00 2001 From: Jan Nedbal Date: Wed, 3 Apr 2024 16:20:55 +0200 Subject: [PATCH] Keep PARSE_KEYS_AS_STRINGS reference --- .../ArgumentRemoverRector/Fixture/fixture2.php.inc | 6 +++--- .../ClassMethod/ArgumentRemoverRector/Source/Yaml.php | 1 - .../ArgumentRemoverRector/config/configured_rule.php | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/rules-tests/Removing/Rector/ClassMethod/ArgumentRemoverRector/Fixture/fixture2.php.inc b/rules-tests/Removing/Rector/ClassMethod/ArgumentRemoverRector/Fixture/fixture2.php.inc index 57e44651dbc..8cf5d08a37b 100644 --- a/rules-tests/Removing/Rector/ClassMethod/ArgumentRemoverRector/Fixture/fixture2.php.inc +++ b/rules-tests/Removing/Rector/ClassMethod/ArgumentRemoverRector/Fixture/fixture2.php.inc @@ -6,13 +6,13 @@ function argumentRemover() { $yaml = []; - Yaml::parse($yaml, Yaml::REMOVED_CONSTANT); + Yaml::parse($yaml, Symfony\Component\Yaml\Yaml::PARSE_KEYS_AS_STRINGS); - Yaml::parse($yaml, Yaml::REMOVED_CONSTANT); + Yaml::parse($yaml, Symfony\Component\Yaml\Yaml::PARSE_KEYS_AS_STRINGS); Yaml::parse($yaml, Yaml::KEPT_CONSTANT); - Yaml::parse($yaml, Yaml::REMOVED_CONSTANT); + Yaml::parse($yaml, Symfony\Component\Yaml\Yaml::PARSE_KEYS_AS_STRINGS); Yaml::parse($yaml, 55); Yaml::parse($yaml, 56); diff --git a/rules-tests/Removing/Rector/ClassMethod/ArgumentRemoverRector/Source/Yaml.php b/rules-tests/Removing/Rector/ClassMethod/ArgumentRemoverRector/Source/Yaml.php index 7a1813a5dd2..2f52ac5f27f 100644 --- a/rules-tests/Removing/Rector/ClassMethod/ArgumentRemoverRector/Source/Yaml.php +++ b/rules-tests/Removing/Rector/ClassMethod/ArgumentRemoverRector/Source/Yaml.php @@ -6,7 +6,6 @@ class Yaml { - public const REMOVED_CONSTANT = 1; public const KEPT_CONSTANT = 2; public static function parse($input, $flags) {} diff --git a/rules-tests/Removing/Rector/ClassMethod/ArgumentRemoverRector/config/configured_rule.php b/rules-tests/Removing/Rector/ClassMethod/ArgumentRemoverRector/config/configured_rule.php index 8ab07dba946..5dab491f835 100644 --- a/rules-tests/Removing/Rector/ClassMethod/ArgumentRemoverRector/config/configured_rule.php +++ b/rules-tests/Removing/Rector/ClassMethod/ArgumentRemoverRector/config/configured_rule.php @@ -17,7 +17,7 @@ Yaml::class, 'parse', 1, - [Yaml::REMOVED_CONSTANT, 'hey', 55, 5.5] + ['Symfony\Component\Yaml\Yaml::PARSE_KEYS_AS_STRINGS', 'hey', 55, 5.5] ), new ArgumentRemover(RemoveInTheMiddle::class, 'run', 1, [ 'name' => 'second',