Updated Rector to commit b99ece5043b641bff347ad3decca281b2b107d88

b99ece5043 use ->ignoreVCSIgnored() on RectorConfigBuilder::withRootFiles() over custom logic (#6669)
This commit is contained in:
Tomas Votruba 2025-01-15 02:55:20 +00:00
parent 287ee5498b
commit 5d08064c62
5 changed files with 19 additions and 51 deletions

View File

@ -19,12 +19,12 @@ final class VersionResolver
* @api
* @var string
*/
public const PACKAGE_VERSION = '5ad54809ac3cac41862b13b786e13020861a6c01';
public const PACKAGE_VERSION = 'b99ece5043b641bff347ad3decca281b2b107d88';
/**
* @api
* @var string
*/
public const RELEASE_DATE = '2025-01-13 18:20:21';
public const RELEASE_DATE = '2025-01-15 09:52:56';
/**
* @var int
*/

View File

@ -3,7 +3,6 @@
declare (strict_types=1);
namespace Rector\Configuration;
use RectorPrefix202501\Nette\Utils\FileSystem;
use Rector\Bridge\SetProviderCollector;
use Rector\Bridge\SetRectorsResolver;
use Rector\Caching\Contract\ValueObject\Storage\CacheStorageInterface;
@ -273,40 +272,9 @@ final class RectorConfigBuilder
*/
public function withRootFiles() : self
{
$gitIgnoreContents = [];
if (\file_exists(\getcwd() . '/.gitignore')) {
$gitIgnoreContents = \array_filter(\iterator_to_array(FileSystem::readLines(\getcwd() . '/.gitignore')), function (string $string) : bool {
$string = \trim($string);
// new line
if ($string === '') {
return \false;
}
// comment
if (\strncmp($string, '#', \strlen('#')) === 0) {
return \false;
}
// normalize
$string = \ltrim($string, '/\\');
// files in deep directory, no need to be in lists
if (\strpos($string, '/') !== \false || \strpos($string, '\\') !== \false) {
return \false;
}
// only files
return \is_file($string);
});
// make realpath collection
$gitIgnoreContents = \array_map(function (string $string) : string {
// normalize
$string = \ltrim($string, '/\\');
return \realpath($string);
}, $gitIgnoreContents);
}
$rootPhpFilesFinder = (new Finder())->files()->in(\getcwd())->depth(0)->ignoreDotFiles(\false)->name('*.php')->name('.*.php')->notName('.phpstorm.meta.php');
$rootPhpFilesFinder = (new Finder())->files()->in(\getcwd())->depth(0)->ignoreDotFiles(\false)->ignoreVCSIgnored(\true)->name('*.php')->name('.*.php')->notName('.phpstorm.meta.php');
foreach ($rootPhpFilesFinder as $rootPhpFileFinder) {
$path = $rootPhpFileFinder->getRealPath();
if (\in_array($path, $gitIgnoreContents, \true)) {
continue;
}
$this->paths[] = $path;
}
return $this;

View File

@ -512,8 +512,8 @@
},
{
"name": "illuminate\/container",
"version": "v11.37.0",
"version_normalized": "11.37.0.0",
"version": "v11.38.2",
"version_normalized": "11.38.2.0",
"source": {
"type": "git",
"url": "https:\/\/github.com\/illuminate\/container.git",
@ -569,17 +569,17 @@
},
{
"name": "illuminate\/contracts",
"version": "v11.37.0",
"version_normalized": "11.37.0.0",
"version": "v11.38.2",
"version_normalized": "11.38.2.0",
"source": {
"type": "git",
"url": "https:\/\/github.com\/illuminate\/contracts.git",
"reference": "184317f701ba20ca265e36808ed54b75b115972d"
"reference": "534b697fc1dd9fbdd9fbf2f33fc9dcbb943dea75"
},
"dist": {
"type": "zip",
"url": "https:\/\/api.github.com\/repos\/illuminate\/contracts\/zipball\/184317f701ba20ca265e36808ed54b75b115972d",
"reference": "184317f701ba20ca265e36808ed54b75b115972d",
"url": "https:\/\/api.github.com\/repos\/illuminate\/contracts\/zipball\/534b697fc1dd9fbdd9fbf2f33fc9dcbb943dea75",
"reference": "534b697fc1dd9fbdd9fbf2f33fc9dcbb943dea75",
"shasum": ""
},
"require": {
@ -587,7 +587,7 @@
"psr\/container": "^1.1.1|^2.0.1",
"psr\/simple-cache": "^1.0|^2.0|^3.0"
},
"time": "2024-11-25T15:33:38+00:00",
"time": "2025-01-10T20:57:00+00:00",
"type": "library",
"extra": {
"branch-alias": {

File diff suppressed because one or more lines are too long

View File

@ -6,21 +6,21 @@ use Closure;
interface Pipeline
{
/**
* Set the traveler object being sent on the pipeline.
* Set the object being sent through the pipeline.
*
* @param mixed $traveler
* @param mixed $passable
* @return $this
*/
public function send($traveler);
public function send($passable);
/**
* Set the stops of the pipeline.
* Set the array of pipes.
*
* @param dynamic|array $stops
* @param array|mixed $pipes
* @return $this
*/
public function through($stops);
public function through($pipes);
/**
* Set the method to call on the stops.
* Set the method to call on the pipes.
*
* @param string $method
* @return $this