mirror of https://github.com/rectorphp/rector.git
Updated Rector to commit 2c46d4fc4d
2c46d4fc4d
[DX] Drop YamlFileFormatter as Rector does not process YAML (#2376)
This commit is contained in:
parent
dde87d99cf
commit
02fbc78a36
|
@ -1,26 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
declare (strict_types=1);
|
|
||||||
namespace Rector\FileFormatter\Formatter;
|
|
||||||
|
|
||||||
use Rector\Core\ValueObject\Application\File;
|
|
||||||
use Rector\FileFormatter\Contract\Formatter\FileFormatterInterface;
|
|
||||||
use Rector\FileFormatter\ValueObject\EditorConfigConfiguration;
|
|
||||||
use RectorPrefix20220527\Symfony\Component\Yaml\Yaml;
|
|
||||||
/**
|
|
||||||
* @see \Rector\Tests\FileFormatter\Formatter\YamlFileFormatter\YamlFileFormatterTest
|
|
||||||
*/
|
|
||||||
final class YamlFileFormatter implements \Rector\FileFormatter\Contract\Formatter\FileFormatterInterface
|
|
||||||
{
|
|
||||||
public function supports(\Rector\Core\ValueObject\Application\File $file) : bool
|
|
||||||
{
|
|
||||||
$smartFileInfo = $file->getSmartFileInfo();
|
|
||||||
return \in_array($smartFileInfo->getExtension(), ['yaml', 'yml'], \true);
|
|
||||||
}
|
|
||||||
public function format(\Rector\Core\ValueObject\Application\File $file, \Rector\FileFormatter\ValueObject\EditorConfigConfiguration $editorConfigConfiguration) : void
|
|
||||||
{
|
|
||||||
$yaml = \RectorPrefix20220527\Symfony\Component\Yaml\Yaml::parse($file->getFileContent(), \RectorPrefix20220527\Symfony\Component\Yaml\Yaml::PARSE_CUSTOM_TAGS);
|
|
||||||
$newFileContent = \RectorPrefix20220527\Symfony\Component\Yaml\Yaml::dump($yaml, 99, $editorConfigConfiguration->getIndentSize());
|
|
||||||
$file->changeFileContent($newFileContent);
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -16,11 +16,11 @@ final class VersionResolver
|
||||||
/**
|
/**
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
public const PACKAGE_VERSION = 'a7e6b685e90d74eeee9bf3346820826d53725f1c';
|
public const PACKAGE_VERSION = '2c46d4fc4d5a2fbd58c9b6e923aaafa8afa23c8b';
|
||||||
/**
|
/**
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
public const RELEASE_DATE = '2022-05-27 15:26:22';
|
public const RELEASE_DATE = '2022-05-27 17:33:40';
|
||||||
/**
|
/**
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -9,4 +9,4 @@ if (PHP_VERSION_ID < 50600) {
|
||||||
|
|
||||||
require_once __DIR__ . '/composer/autoload_real.php';
|
require_once __DIR__ . '/composer/autoload_real.php';
|
||||||
|
|
||||||
return ComposerAutoloaderInit36d1e579de49b885aa0af3fcb219e006::getLoader();
|
return ComposerAutoloaderInit33d18337111f15dfa5503c18b3f18ebd::getLoader();
|
||||||
|
|
|
@ -2132,7 +2132,6 @@ return array(
|
||||||
'Rector\\FileFormatter\\Exception\\ParseIndentException' => $baseDir . '/packages/FileFormatter/Exception/ParseIndentException.php',
|
'Rector\\FileFormatter\\Exception\\ParseIndentException' => $baseDir . '/packages/FileFormatter/Exception/ParseIndentException.php',
|
||||||
'Rector\\FileFormatter\\FileFormatter' => $baseDir . '/packages/FileFormatter/FileFormatter.php',
|
'Rector\\FileFormatter\\FileFormatter' => $baseDir . '/packages/FileFormatter/FileFormatter.php',
|
||||||
'Rector\\FileFormatter\\Formatter\\JsonFileFormatter' => $baseDir . '/packages/FileFormatter/Formatter/JsonFileFormatter.php',
|
'Rector\\FileFormatter\\Formatter\\JsonFileFormatter' => $baseDir . '/packages/FileFormatter/Formatter/JsonFileFormatter.php',
|
||||||
'Rector\\FileFormatter\\Formatter\\YamlFileFormatter' => $baseDir . '/packages/FileFormatter/Formatter/YamlFileFormatter.php',
|
|
||||||
'Rector\\FileFormatter\\ValueObjectFactory\\EditorConfigConfigurationBuilder' => $baseDir . '/packages/FileFormatter/ValueObjectFactory/EditorConfigConfigurationBuilder.php',
|
'Rector\\FileFormatter\\ValueObjectFactory\\EditorConfigConfigurationBuilder' => $baseDir . '/packages/FileFormatter/ValueObjectFactory/EditorConfigConfigurationBuilder.php',
|
||||||
'Rector\\FileFormatter\\ValueObject\\EditorConfigConfiguration' => $baseDir . '/packages/FileFormatter/ValueObject/EditorConfigConfiguration.php',
|
'Rector\\FileFormatter\\ValueObject\\EditorConfigConfiguration' => $baseDir . '/packages/FileFormatter/ValueObject/EditorConfigConfiguration.php',
|
||||||
'Rector\\FileFormatter\\ValueObject\\EditorConfigOption' => $baseDir . '/packages/FileFormatter/ValueObject/EditorConfigOption.php',
|
'Rector\\FileFormatter\\ValueObject\\EditorConfigOption' => $baseDir . '/packages/FileFormatter/ValueObject/EditorConfigOption.php',
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
// autoload_real.php @generated by Composer
|
// autoload_real.php @generated by Composer
|
||||||
|
|
||||||
class ComposerAutoloaderInit36d1e579de49b885aa0af3fcb219e006
|
class ComposerAutoloaderInit33d18337111f15dfa5503c18b3f18ebd
|
||||||
{
|
{
|
||||||
private static $loader;
|
private static $loader;
|
||||||
|
|
||||||
|
@ -22,19 +22,19 @@ class ComposerAutoloaderInit36d1e579de49b885aa0af3fcb219e006
|
||||||
return self::$loader;
|
return self::$loader;
|
||||||
}
|
}
|
||||||
|
|
||||||
spl_autoload_register(array('ComposerAutoloaderInit36d1e579de49b885aa0af3fcb219e006', 'loadClassLoader'), true, true);
|
spl_autoload_register(array('ComposerAutoloaderInit33d18337111f15dfa5503c18b3f18ebd', 'loadClassLoader'), true, true);
|
||||||
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
|
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
|
||||||
spl_autoload_unregister(array('ComposerAutoloaderInit36d1e579de49b885aa0af3fcb219e006', 'loadClassLoader'));
|
spl_autoload_unregister(array('ComposerAutoloaderInit33d18337111f15dfa5503c18b3f18ebd', 'loadClassLoader'));
|
||||||
|
|
||||||
require __DIR__ . '/autoload_static.php';
|
require __DIR__ . '/autoload_static.php';
|
||||||
call_user_func(\Composer\Autoload\ComposerStaticInit36d1e579de49b885aa0af3fcb219e006::getInitializer($loader));
|
call_user_func(\Composer\Autoload\ComposerStaticInit33d18337111f15dfa5503c18b3f18ebd::getInitializer($loader));
|
||||||
|
|
||||||
$loader->setClassMapAuthoritative(true);
|
$loader->setClassMapAuthoritative(true);
|
||||||
$loader->register(true);
|
$loader->register(true);
|
||||||
|
|
||||||
$includeFiles = \Composer\Autoload\ComposerStaticInit36d1e579de49b885aa0af3fcb219e006::$files;
|
$includeFiles = \Composer\Autoload\ComposerStaticInit33d18337111f15dfa5503c18b3f18ebd::$files;
|
||||||
foreach ($includeFiles as $fileIdentifier => $file) {
|
foreach ($includeFiles as $fileIdentifier => $file) {
|
||||||
composerRequire36d1e579de49b885aa0af3fcb219e006($fileIdentifier, $file);
|
composerRequire33d18337111f15dfa5503c18b3f18ebd($fileIdentifier, $file);
|
||||||
}
|
}
|
||||||
|
|
||||||
return $loader;
|
return $loader;
|
||||||
|
@ -46,7 +46,7 @@ class ComposerAutoloaderInit36d1e579de49b885aa0af3fcb219e006
|
||||||
* @param string $file
|
* @param string $file
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
function composerRequire36d1e579de49b885aa0af3fcb219e006($fileIdentifier, $file)
|
function composerRequire33d18337111f15dfa5503c18b3f18ebd($fileIdentifier, $file)
|
||||||
{
|
{
|
||||||
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
|
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
|
||||||
$GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;
|
$GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
namespace Composer\Autoload;
|
namespace Composer\Autoload;
|
||||||
|
|
||||||
class ComposerStaticInit36d1e579de49b885aa0af3fcb219e006
|
class ComposerStaticInit33d18337111f15dfa5503c18b3f18ebd
|
||||||
{
|
{
|
||||||
public static $files = array (
|
public static $files = array (
|
||||||
'320cde22f66dd4f5d3fd621d3e88b98f' => __DIR__ . '/..' . '/symfony/polyfill-ctype/bootstrap.php',
|
'320cde22f66dd4f5d3fd621d3e88b98f' => __DIR__ . '/..' . '/symfony/polyfill-ctype/bootstrap.php',
|
||||||
|
@ -2501,7 +2501,6 @@ class ComposerStaticInit36d1e579de49b885aa0af3fcb219e006
|
||||||
'Rector\\FileFormatter\\Exception\\ParseIndentException' => __DIR__ . '/../..' . '/packages/FileFormatter/Exception/ParseIndentException.php',
|
'Rector\\FileFormatter\\Exception\\ParseIndentException' => __DIR__ . '/../..' . '/packages/FileFormatter/Exception/ParseIndentException.php',
|
||||||
'Rector\\FileFormatter\\FileFormatter' => __DIR__ . '/../..' . '/packages/FileFormatter/FileFormatter.php',
|
'Rector\\FileFormatter\\FileFormatter' => __DIR__ . '/../..' . '/packages/FileFormatter/FileFormatter.php',
|
||||||
'Rector\\FileFormatter\\Formatter\\JsonFileFormatter' => __DIR__ . '/../..' . '/packages/FileFormatter/Formatter/JsonFileFormatter.php',
|
'Rector\\FileFormatter\\Formatter\\JsonFileFormatter' => __DIR__ . '/../..' . '/packages/FileFormatter/Formatter/JsonFileFormatter.php',
|
||||||
'Rector\\FileFormatter\\Formatter\\YamlFileFormatter' => __DIR__ . '/../..' . '/packages/FileFormatter/Formatter/YamlFileFormatter.php',
|
|
||||||
'Rector\\FileFormatter\\ValueObjectFactory\\EditorConfigConfigurationBuilder' => __DIR__ . '/../..' . '/packages/FileFormatter/ValueObjectFactory/EditorConfigConfigurationBuilder.php',
|
'Rector\\FileFormatter\\ValueObjectFactory\\EditorConfigConfigurationBuilder' => __DIR__ . '/../..' . '/packages/FileFormatter/ValueObjectFactory/EditorConfigConfigurationBuilder.php',
|
||||||
'Rector\\FileFormatter\\ValueObject\\EditorConfigConfiguration' => __DIR__ . '/../..' . '/packages/FileFormatter/ValueObject/EditorConfigConfiguration.php',
|
'Rector\\FileFormatter\\ValueObject\\EditorConfigConfiguration' => __DIR__ . '/../..' . '/packages/FileFormatter/ValueObject/EditorConfigConfiguration.php',
|
||||||
'Rector\\FileFormatter\\ValueObject\\EditorConfigOption' => __DIR__ . '/../..' . '/packages/FileFormatter/ValueObject/EditorConfigOption.php',
|
'Rector\\FileFormatter\\ValueObject\\EditorConfigOption' => __DIR__ . '/../..' . '/packages/FileFormatter/ValueObject/EditorConfigOption.php',
|
||||||
|
@ -3916,9 +3915,9 @@ class ComposerStaticInit36d1e579de49b885aa0af3fcb219e006
|
||||||
public static function getInitializer(ClassLoader $loader)
|
public static function getInitializer(ClassLoader $loader)
|
||||||
{
|
{
|
||||||
return \Closure::bind(function () use ($loader) {
|
return \Closure::bind(function () use ($loader) {
|
||||||
$loader->prefixLengthsPsr4 = ComposerStaticInit36d1e579de49b885aa0af3fcb219e006::$prefixLengthsPsr4;
|
$loader->prefixLengthsPsr4 = ComposerStaticInit33d18337111f15dfa5503c18b3f18ebd::$prefixLengthsPsr4;
|
||||||
$loader->prefixDirsPsr4 = ComposerStaticInit36d1e579de49b885aa0af3fcb219e006::$prefixDirsPsr4;
|
$loader->prefixDirsPsr4 = ComposerStaticInit33d18337111f15dfa5503c18b3f18ebd::$prefixDirsPsr4;
|
||||||
$loader->classMap = ComposerStaticInit36d1e579de49b885aa0af3fcb219e006::$classMap;
|
$loader->classMap = ComposerStaticInit33d18337111f15dfa5503c18b3f18ebd::$classMap;
|
||||||
|
|
||||||
}, null, ClassLoader::class);
|
}, null, ClassLoader::class);
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,8 +9,8 @@ $loader = require_once __DIR__.'/autoload.php';
|
||||||
if (!class_exists('AutoloadIncluder', false) && !interface_exists('AutoloadIncluder', false) && !trait_exists('AutoloadIncluder', false)) {
|
if (!class_exists('AutoloadIncluder', false) && !interface_exists('AutoloadIncluder', false) && !trait_exists('AutoloadIncluder', false)) {
|
||||||
spl_autoload_call('RectorPrefix20220527\AutoloadIncluder');
|
spl_autoload_call('RectorPrefix20220527\AutoloadIncluder');
|
||||||
}
|
}
|
||||||
if (!class_exists('ComposerAutoloaderInit36d1e579de49b885aa0af3fcb219e006', false) && !interface_exists('ComposerAutoloaderInit36d1e579de49b885aa0af3fcb219e006', false) && !trait_exists('ComposerAutoloaderInit36d1e579de49b885aa0af3fcb219e006', false)) {
|
if (!class_exists('ComposerAutoloaderInit33d18337111f15dfa5503c18b3f18ebd', false) && !interface_exists('ComposerAutoloaderInit33d18337111f15dfa5503c18b3f18ebd', false) && !trait_exists('ComposerAutoloaderInit33d18337111f15dfa5503c18b3f18ebd', false)) {
|
||||||
spl_autoload_call('RectorPrefix20220527\ComposerAutoloaderInit36d1e579de49b885aa0af3fcb219e006');
|
spl_autoload_call('RectorPrefix20220527\ComposerAutoloaderInit33d18337111f15dfa5503c18b3f18ebd');
|
||||||
}
|
}
|
||||||
if (!class_exists('Helmich\TypoScriptParser\Parser\AST\Statement', false) && !interface_exists('Helmich\TypoScriptParser\Parser\AST\Statement', false) && !trait_exists('Helmich\TypoScriptParser\Parser\AST\Statement', false)) {
|
if (!class_exists('Helmich\TypoScriptParser\Parser\AST\Statement', false) && !interface_exists('Helmich\TypoScriptParser\Parser\AST\Statement', false) && !trait_exists('Helmich\TypoScriptParser\Parser\AST\Statement', false)) {
|
||||||
spl_autoload_call('RectorPrefix20220527\Helmich\TypoScriptParser\Parser\AST\Statement');
|
spl_autoload_call('RectorPrefix20220527\Helmich\TypoScriptParser\Parser\AST\Statement');
|
||||||
|
@ -59,9 +59,9 @@ if (!function_exists('print_node')) {
|
||||||
return \RectorPrefix20220527\print_node(...func_get_args());
|
return \RectorPrefix20220527\print_node(...func_get_args());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!function_exists('composerRequire36d1e579de49b885aa0af3fcb219e006')) {
|
if (!function_exists('composerRequire33d18337111f15dfa5503c18b3f18ebd')) {
|
||||||
function composerRequire36d1e579de49b885aa0af3fcb219e006() {
|
function composerRequire33d18337111f15dfa5503c18b3f18ebd() {
|
||||||
return \RectorPrefix20220527\composerRequire36d1e579de49b885aa0af3fcb219e006(...func_get_args());
|
return \RectorPrefix20220527\composerRequire33d18337111f15dfa5503c18b3f18ebd(...func_get_args());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!function_exists('scanPath')) {
|
if (!function_exists('scanPath')) {
|
||||||
|
|
Loading…
Reference in New Issue