mirror of
https://github.com/rectorphp/rector.git
synced 2025-01-16 21:08:19 +01:00
Updated Rector to commit cd0424801754474ba37a42f389e5ae7438a3b83a
cd04248017
php
This commit is contained in:
parent
148e704714
commit
824b15c9ab
55
bin/resolve-version.php
Normal file
55
bin/resolve-version.php
Normal file
@ -0,0 +1,55 @@
|
||||
<?php
|
||||
|
||||
declare (strict_types=1);
|
||||
namespace RectorPrefix20220529;
|
||||
|
||||
// resolve git version stored in released rector
|
||||
// tag for tagged one, hash for dev
|
||||
/**
|
||||
* Inspired by https://github.com/composer/composer/blob/master/src/Composer/Composer.php
|
||||
* See https://github.com/composer/composer/blob/6587715d0f8cae0cd39073b3bc5f018d0e6b84fe/src/Composer/Compiler.php#L208
|
||||
*
|
||||
* @see \Rector\Core\Tests\Application\VersionResolverTest
|
||||
*/
|
||||
final class VersionResolver
|
||||
{
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
private const SUCCESS_CODE = 0;
|
||||
public function resolve() : string
|
||||
{
|
||||
// resolve current tag
|
||||
\exec('git tag --points-at', $tagExecOutput, $tagExecResultCode);
|
||||
if ($tagExecResultCode !== self::SUCCESS_CODE) {
|
||||
die('Ensure to run compile from composer git repository clone and that git binary is available.');
|
||||
}
|
||||
// debug output
|
||||
\var_dump($tagExecOutput);
|
||||
if ($tagExecOutput !== []) {
|
||||
$tag = $tagExecOutput[0];
|
||||
if ($tag !== '') {
|
||||
return $tag;
|
||||
}
|
||||
}
|
||||
\exec('git log --pretty="%H" -n1 HEAD', $commitHashExecOutput, $commitHashResultCode);
|
||||
if ($commitHashResultCode !== 0) {
|
||||
die('Ensure to run compile from composer git repository clone and that git binary is available.');
|
||||
}
|
||||
// debug output
|
||||
\var_dump($commitHashExecOutput);
|
||||
$version = \trim($commitHashExecOutput[0]);
|
||||
return \trim($version, '"');
|
||||
}
|
||||
}
|
||||
// resolve git version stored in released rector
|
||||
// tag for tagged one, hash for dev
|
||||
/**
|
||||
* Inspired by https://github.com/composer/composer/blob/master/src/Composer/Composer.php
|
||||
* See https://github.com/composer/composer/blob/6587715d0f8cae0cd39073b3bc5f018d0e6b84fe/src/Composer/Compiler.php#L208
|
||||
*
|
||||
* @see \Rector\Core\Tests\Application\VersionResolverTest
|
||||
*/
|
||||
\class_alias('VersionResolver', 'VersionResolver', \false);
|
||||
$versionResolver = new \RectorPrefix20220529\VersionResolver();
|
||||
echo $versionResolver->resolve() . \PHP_EOL;
|
2
vendor/autoload.php
vendored
2
vendor/autoload.php
vendored
@ -9,4 +9,4 @@ if (PHP_VERSION_ID < 50600) {
|
||||
|
||||
require_once __DIR__ . '/composer/autoload_real.php';
|
||||
|
||||
return ComposerAutoloaderInit60f38889a608bb03580a069a00c85f45::getLoader();
|
||||
return ComposerAutoloaderInitff688ad1ad36414b5e0335c1fc3e9915::getLoader();
|
||||
|
14
vendor/composer/autoload_real.php
vendored
14
vendor/composer/autoload_real.php
vendored
@ -2,7 +2,7 @@
|
||||
|
||||
// autoload_real.php @generated by Composer
|
||||
|
||||
class ComposerAutoloaderInit60f38889a608bb03580a069a00c85f45
|
||||
class ComposerAutoloaderInitff688ad1ad36414b5e0335c1fc3e9915
|
||||
{
|
||||
private static $loader;
|
||||
|
||||
@ -22,19 +22,19 @@ class ComposerAutoloaderInit60f38889a608bb03580a069a00c85f45
|
||||
return self::$loader;
|
||||
}
|
||||
|
||||
spl_autoload_register(array('ComposerAutoloaderInit60f38889a608bb03580a069a00c85f45', 'loadClassLoader'), true, true);
|
||||
spl_autoload_register(array('ComposerAutoloaderInitff688ad1ad36414b5e0335c1fc3e9915', 'loadClassLoader'), true, true);
|
||||
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
|
||||
spl_autoload_unregister(array('ComposerAutoloaderInit60f38889a608bb03580a069a00c85f45', 'loadClassLoader'));
|
||||
spl_autoload_unregister(array('ComposerAutoloaderInitff688ad1ad36414b5e0335c1fc3e9915', 'loadClassLoader'));
|
||||
|
||||
require __DIR__ . '/autoload_static.php';
|
||||
call_user_func(\Composer\Autoload\ComposerStaticInit60f38889a608bb03580a069a00c85f45::getInitializer($loader));
|
||||
call_user_func(\Composer\Autoload\ComposerStaticInitff688ad1ad36414b5e0335c1fc3e9915::getInitializer($loader));
|
||||
|
||||
$loader->setClassMapAuthoritative(true);
|
||||
$loader->register(true);
|
||||
|
||||
$includeFiles = \Composer\Autoload\ComposerStaticInit60f38889a608bb03580a069a00c85f45::$files;
|
||||
$includeFiles = \Composer\Autoload\ComposerStaticInitff688ad1ad36414b5e0335c1fc3e9915::$files;
|
||||
foreach ($includeFiles as $fileIdentifier => $file) {
|
||||
composerRequire60f38889a608bb03580a069a00c85f45($fileIdentifier, $file);
|
||||
composerRequireff688ad1ad36414b5e0335c1fc3e9915($fileIdentifier, $file);
|
||||
}
|
||||
|
||||
return $loader;
|
||||
@ -46,7 +46,7 @@ class ComposerAutoloaderInit60f38889a608bb03580a069a00c85f45
|
||||
* @param string $file
|
||||
* @return void
|
||||
*/
|
||||
function composerRequire60f38889a608bb03580a069a00c85f45($fileIdentifier, $file)
|
||||
function composerRequireff688ad1ad36414b5e0335c1fc3e9915($fileIdentifier, $file)
|
||||
{
|
||||
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
|
||||
$GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;
|
||||
|
8
vendor/composer/autoload_static.php
vendored
8
vendor/composer/autoload_static.php
vendored
@ -4,7 +4,7 @@
|
||||
|
||||
namespace Composer\Autoload;
|
||||
|
||||
class ComposerStaticInit60f38889a608bb03580a069a00c85f45
|
||||
class ComposerStaticInitff688ad1ad36414b5e0335c1fc3e9915
|
||||
{
|
||||
public static $files = array (
|
||||
'320cde22f66dd4f5d3fd621d3e88b98f' => __DIR__ . '/..' . '/symfony/polyfill-ctype/bootstrap.php',
|
||||
@ -3850,9 +3850,9 @@ class ComposerStaticInit60f38889a608bb03580a069a00c85f45
|
||||
public static function getInitializer(ClassLoader $loader)
|
||||
{
|
||||
return \Closure::bind(function () use ($loader) {
|
||||
$loader->prefixLengthsPsr4 = ComposerStaticInit60f38889a608bb03580a069a00c85f45::$prefixLengthsPsr4;
|
||||
$loader->prefixDirsPsr4 = ComposerStaticInit60f38889a608bb03580a069a00c85f45::$prefixDirsPsr4;
|
||||
$loader->classMap = ComposerStaticInit60f38889a608bb03580a069a00c85f45::$classMap;
|
||||
$loader->prefixLengthsPsr4 = ComposerStaticInitff688ad1ad36414b5e0335c1fc3e9915::$prefixLengthsPsr4;
|
||||
$loader->prefixDirsPsr4 = ComposerStaticInitff688ad1ad36414b5e0335c1fc3e9915::$prefixDirsPsr4;
|
||||
$loader->classMap = ComposerStaticInitff688ad1ad36414b5e0335c1fc3e9915::$classMap;
|
||||
|
||||
}, null, ClassLoader::class);
|
||||
}
|
||||
|
13
vendor/scoper-autoload.php
vendored
13
vendor/scoper-autoload.php
vendored
@ -9,8 +9,11 @@ $loader = require_once __DIR__.'/autoload.php';
|
||||
if (!class_exists('AutoloadIncluder', false) && !interface_exists('AutoloadIncluder', false) && !trait_exists('AutoloadIncluder', false)) {
|
||||
spl_autoload_call('RectorPrefix20220529\AutoloadIncluder');
|
||||
}
|
||||
if (!class_exists('ComposerAutoloaderInit60f38889a608bb03580a069a00c85f45', false) && !interface_exists('ComposerAutoloaderInit60f38889a608bb03580a069a00c85f45', false) && !trait_exists('ComposerAutoloaderInit60f38889a608bb03580a069a00c85f45', false)) {
|
||||
spl_autoload_call('RectorPrefix20220529\ComposerAutoloaderInit60f38889a608bb03580a069a00c85f45');
|
||||
if (!class_exists('VersionResolver', false) && !interface_exists('VersionResolver', false) && !trait_exists('VersionResolver', false)) {
|
||||
spl_autoload_call('RectorPrefix20220529\VersionResolver');
|
||||
}
|
||||
if (!class_exists('ComposerAutoloaderInitff688ad1ad36414b5e0335c1fc3e9915', false) && !interface_exists('ComposerAutoloaderInitff688ad1ad36414b5e0335c1fc3e9915', false) && !trait_exists('ComposerAutoloaderInitff688ad1ad36414b5e0335c1fc3e9915', false)) {
|
||||
spl_autoload_call('RectorPrefix20220529\ComposerAutoloaderInitff688ad1ad36414b5e0335c1fc3e9915');
|
||||
}
|
||||
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('RectorPrefix20220529\Helmich\TypoScriptParser\Parser\AST\Statement');
|
||||
@ -59,9 +62,9 @@ if (!function_exists('print_node')) {
|
||||
return \RectorPrefix20220529\print_node(...func_get_args());
|
||||
}
|
||||
}
|
||||
if (!function_exists('composerRequire60f38889a608bb03580a069a00c85f45')) {
|
||||
function composerRequire60f38889a608bb03580a069a00c85f45() {
|
||||
return \RectorPrefix20220529\composerRequire60f38889a608bb03580a069a00c85f45(...func_get_args());
|
||||
if (!function_exists('composerRequireff688ad1ad36414b5e0335c1fc3e9915')) {
|
||||
function composerRequireff688ad1ad36414b5e0335c1fc3e9915() {
|
||||
return \RectorPrefix20220529\composerRequireff688ad1ad36414b5e0335c1fc3e9915(...func_get_args());
|
||||
}
|
||||
}
|
||||
if (!function_exists('scanPath')) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user