diff --git a/bin/rector_bootstrap.php b/bin/rector_bootstrap.php index 190c9f66c7c..379b93b1c5e 100644 --- a/bin/rector_bootstrap.php +++ b/bin/rector_bootstrap.php @@ -12,7 +12,11 @@ $possibleAutoloadPaths = [ foreach ($possibleAutoloadPaths as $possibleAutoloadPath) { if (is_file($possibleAutoloadPath)) { require_once $possibleAutoloadPath; - - break; + return; } } + +throw new RuntimeException(sprintf( + 'Composer autoload.php was not found in paths "%s". Have you run "composer update"?', + implode('", "', $possibleAutoloadPaths) +));