mirror of
https://github.com/rectorphp/rector.git
synced 2025-01-18 05:48:21 +01:00
Updated Rector to commit 3ca5734242eb340dda3ca5ea16d0111cc8edf1dd
3ca5734242
error when no files will be processed (#4326)
This commit is contained in:
parent
4bb7391372
commit
437d47448a
@ -79,4 +79,8 @@ final class DynamicSourceLocatorProvider
|
||||
Assert::allString($files);
|
||||
$this->filesByDirectory[$directory] = $files;
|
||||
}
|
||||
public function isPathsEmpty() : bool
|
||||
{
|
||||
return $this->filePaths === [] && $this->filesByDirectory === [];
|
||||
}
|
||||
}
|
||||
|
@ -19,12 +19,12 @@ final class VersionResolver
|
||||
* @api
|
||||
* @var string
|
||||
*/
|
||||
public const PACKAGE_VERSION = '715561ce71380357545db851fd44ad8b55948b6d';
|
||||
public const PACKAGE_VERSION = '3ca5734242eb340dda3ca5ea16d0111cc8edf1dd';
|
||||
/**
|
||||
* @api
|
||||
* @var string
|
||||
*/
|
||||
public const RELEASE_DATE = '2023-06-26 19:51:49';
|
||||
public const RELEASE_DATE = '2023-06-26 19:53:14';
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
|
@ -112,6 +112,10 @@ final class ProcessCommand extends \Rector\Core\Console\Command\AbstractProcessC
|
||||
$paths = $configuration->getPaths();
|
||||
// 1. add files and directories to static locator
|
||||
$this->dynamicSourceLocatorDecorator->addPaths($paths);
|
||||
if ($this->dynamicSourceLocatorDecorator->isPathsEmpty()) {
|
||||
$this->rectorOutputStyle->error("The given paths do not match any files");
|
||||
return ExitCode::FAILURE;
|
||||
}
|
||||
// 2. inform user about registering configurable rule without configuration
|
||||
$this->emptyConfigurableRectorChecker->check();
|
||||
// MAIN PHASE
|
||||
|
@ -49,4 +49,8 @@ final class DynamicSourceLocatorDecorator
|
||||
$this->dynamicSourceLocatorProvider->addFilesByDirectory($directory, $filesInDirectory);
|
||||
}
|
||||
}
|
||||
public function isPathsEmpty() : bool
|
||||
{
|
||||
return $this->dynamicSourceLocatorProvider->isPathsEmpty();
|
||||
}
|
||||
}
|
||||
|
2
vendor/autoload.php
vendored
2
vendor/autoload.php
vendored
@ -22,4 +22,4 @@ if (PHP_VERSION_ID < 50600) {
|
||||
|
||||
require_once __DIR__ . '/composer/autoload_real.php';
|
||||
|
||||
return ComposerAutoloaderInit2850f5fba6be0c35b9db1bcbf577cf41::getLoader();
|
||||
return ComposerAutoloaderInit0b1224b99b63ad1a44a64b873fc5403f::getLoader();
|
||||
|
10
vendor/composer/autoload_real.php
vendored
10
vendor/composer/autoload_real.php
vendored
@ -2,7 +2,7 @@
|
||||
|
||||
// autoload_real.php @generated by Composer
|
||||
|
||||
class ComposerAutoloaderInit2850f5fba6be0c35b9db1bcbf577cf41
|
||||
class ComposerAutoloaderInit0b1224b99b63ad1a44a64b873fc5403f
|
||||
{
|
||||
private static $loader;
|
||||
|
||||
@ -22,17 +22,17 @@ class ComposerAutoloaderInit2850f5fba6be0c35b9db1bcbf577cf41
|
||||
return self::$loader;
|
||||
}
|
||||
|
||||
spl_autoload_register(array('ComposerAutoloaderInit2850f5fba6be0c35b9db1bcbf577cf41', 'loadClassLoader'), true, true);
|
||||
spl_autoload_register(array('ComposerAutoloaderInit0b1224b99b63ad1a44a64b873fc5403f', 'loadClassLoader'), true, true);
|
||||
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
|
||||
spl_autoload_unregister(array('ComposerAutoloaderInit2850f5fba6be0c35b9db1bcbf577cf41', 'loadClassLoader'));
|
||||
spl_autoload_unregister(array('ComposerAutoloaderInit0b1224b99b63ad1a44a64b873fc5403f', 'loadClassLoader'));
|
||||
|
||||
require __DIR__ . '/autoload_static.php';
|
||||
call_user_func(\Composer\Autoload\ComposerStaticInit2850f5fba6be0c35b9db1bcbf577cf41::getInitializer($loader));
|
||||
call_user_func(\Composer\Autoload\ComposerStaticInit0b1224b99b63ad1a44a64b873fc5403f::getInitializer($loader));
|
||||
|
||||
$loader->setClassMapAuthoritative(true);
|
||||
$loader->register(true);
|
||||
|
||||
$filesToLoad = \Composer\Autoload\ComposerStaticInit2850f5fba6be0c35b9db1bcbf577cf41::$files;
|
||||
$filesToLoad = \Composer\Autoload\ComposerStaticInit0b1224b99b63ad1a44a64b873fc5403f::$files;
|
||||
$requireFile = \Closure::bind(static function ($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 ComposerStaticInit2850f5fba6be0c35b9db1bcbf577cf41
|
||||
class ComposerStaticInit0b1224b99b63ad1a44a64b873fc5403f
|
||||
{
|
||||
public static $files = array (
|
||||
'ad155f8f1cf0d418fe49e248db8c661b' => __DIR__ . '/..' . '/react/promise/src/functions_include.php',
|
||||
@ -3098,9 +3098,9 @@ class ComposerStaticInit2850f5fba6be0c35b9db1bcbf577cf41
|
||||
public static function getInitializer(ClassLoader $loader)
|
||||
{
|
||||
return \Closure::bind(function () use ($loader) {
|
||||
$loader->prefixLengthsPsr4 = ComposerStaticInit2850f5fba6be0c35b9db1bcbf577cf41::$prefixLengthsPsr4;
|
||||
$loader->prefixDirsPsr4 = ComposerStaticInit2850f5fba6be0c35b9db1bcbf577cf41::$prefixDirsPsr4;
|
||||
$loader->classMap = ComposerStaticInit2850f5fba6be0c35b9db1bcbf577cf41::$classMap;
|
||||
$loader->prefixLengthsPsr4 = ComposerStaticInit0b1224b99b63ad1a44a64b873fc5403f::$prefixLengthsPsr4;
|
||||
$loader->prefixDirsPsr4 = ComposerStaticInit0b1224b99b63ad1a44a64b873fc5403f::$prefixDirsPsr4;
|
||||
$loader->classMap = ComposerStaticInit0b1224b99b63ad1a44a64b873fc5403f::$classMap;
|
||||
|
||||
}, null, ClassLoader::class);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user