YamlFlagsToConstantRector
Replace the boolean flag arguments of Yaml::parse() and Yaml::dump() with the matching Yaml flag constants
use Symfony\Component\Yaml\Yaml;
-$data = Yaml::parse($yaml, false, false, true);
+$data = Yaml::parse($yaml, Yaml::PARSE_OBJECT_FOR_MAP);
Configure your rector.php:
<?php
use Rector\Config\RectorConfig;
use Rector\Symfony\Yaml\Rector\StaticCall\YamlFlagsToConstantRector;
return RectorConfig::configure()
->withRules([
YamlFlagsToConstantRector::class,
]);
PACKAGE:
symfony/yaml >=3.1