mirror of
https://github.com/rectorphp/rector.git
synced 2025-01-17 05:18:18 +01:00
ignore stubs on composer install to prevent PHPStorm autocomplete break-down
This commit is contained in:
parent
2c22f48321
commit
dbac28077c
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -29,3 +29,4 @@ phpstan.neon export-ignore
|
||||
phpunit.xml export-ignore
|
||||
rector.yaml export-ignore
|
||||
utils export-ignore
|
||||
stubs export-ignore
|
||||
|
@ -25,6 +25,12 @@ final class StubLoader
|
||||
|
||||
$stubDirectory = __DIR__ . '/../../stubs';
|
||||
|
||||
// stubs might not exists on composer install, to prevent PHPStorm duplicated confusion
|
||||
// @see https://github.com/rectorphp/rector/issues/1899
|
||||
if (! file_exists($stubDirectory)) {
|
||||
return;
|
||||
}
|
||||
|
||||
$robotLoader = new RobotLoader();
|
||||
$robotLoader->addDirectory($stubDirectory);
|
||||
$robotLoader->setTempDirectory(sys_get_temp_dir() . '/_rector_stubs');
|
||||
|
Loading…
x
Reference in New Issue
Block a user