mirror of
https://github.com/rectorphp/rector.git
synced 2025-01-31 12:42:05 +01:00
Updated Rector to commit 5bf03c420e523f365ccc67eebb3f045e854caf55
5bf03c420e
[Configuration] Fix detect /vendor on root project on vendor analyzed on VendorMissAnalyseGuard (#5569)
This commit is contained in:
parent
1cd18a76ae
commit
9d4b461bdb
@ -102,7 +102,7 @@ final class ApplicationFileProcessor
|
||||
{
|
||||
$filePaths = $this->fileFactory->findFilesInPaths($configuration->getPaths(), $configuration);
|
||||
if ($this->vendorMissAnalyseGuard->isVendorAnalyzed($filePaths)) {
|
||||
$this->symfonyStyle->warning(\sprintf('Rector is running on your "/vendor" directory. This is not necessary, as Rector access /vendor by composer autoload. It will cause Rector tu run much slower and possibly with errors.%sRemove "/vendor" from Rector paths and run again.', \PHP_EOL . \PHP_EOL));
|
||||
$this->symfonyStyle->warning(\sprintf('Rector has detected a "/vendor" directory in your configured paths. If this is Composer\'s vendor directory, this is not necessary as it will be autoloaded. Scanning the Composer vendor directory will cause Rector to run much slower and possibly with errors.%sRemove "/vendor" from Rector paths and run again.', \PHP_EOL . \PHP_EOL));
|
||||
\sleep(3);
|
||||
}
|
||||
// no files found
|
||||
|
@ -19,12 +19,12 @@ final class VersionResolver
|
||||
* @api
|
||||
* @var string
|
||||
*/
|
||||
public const PACKAGE_VERSION = '6fe258536fc4a7fb903bea8eef548d37e1de8df5';
|
||||
public const PACKAGE_VERSION = '5bf03c420e523f365ccc67eebb3f045e854caf55';
|
||||
/**
|
||||
* @api
|
||||
* @var string
|
||||
*/
|
||||
public const RELEASE_DATE = '2024-02-07 05:52:02';
|
||||
public const RELEASE_DATE = '2024-02-07 07:20:04';
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
|
@ -32,8 +32,10 @@ final class VendorMissAnalyseGuard
|
||||
*/
|
||||
private function containsVendorPath(array $filePaths) : bool
|
||||
{
|
||||
$cwd = PathNormalizer::normalize(\getcwd());
|
||||
foreach ($filePaths as $filePath) {
|
||||
if (\strpos(PathNormalizer::normalize($filePath), '/vendor/') !== \false) {
|
||||
$normalizedPath = PathNormalizer::normalize(\realpath($filePath));
|
||||
if (\strncmp(\substr($normalizedPath, \strlen($cwd)), '/vendor', \strlen('/vendor')) === 0) {
|
||||
return \true;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user