mirror of
https://github.com/rectorphp/rector.git
synced 2025-04-20 23:41:57 +02:00
[scoped on PHP 7.0] bin/rector run with extracted phpstan (#6371)
This commit is contained in:
parent
4f8985a30f
commit
d225be28d8
11
.github/workflows/build_scoped_rector_php70.yaml
vendored
11
.github/workflows/build_scoped_rector_php70.yaml
vendored
@ -40,8 +40,15 @@ jobs:
|
||||
# extra content of phpstan.phar to vendor/phpstan/phpstan-extracted
|
||||
- run: php box.phar extract vendor/phpstan/phpstan/phpstan.phar vendor/phpstan/phpstan-extracted
|
||||
|
||||
# original phpstan/phpstan is now duplicated, we don't need it now
|
||||
- run: composer remove phpstan/phpstan
|
||||
# "composer remove phpstan/phpstan" original phpstan/phpstan is now duplicated, we don't need it now -required by phpstan extensions, cannot be removed like this
|
||||
|
||||
# to avoid double packing the same code
|
||||
- run: rm -rf vendor/bin/phpstan
|
||||
- run: rm -rf vendor/phpstan/phpstan/phpstan.phar
|
||||
- run: rm phpstan-for-rector.neon
|
||||
|
||||
# THIS MUST WORK
|
||||
- run: bin/rector downgrade-paths
|
||||
|
||||
# 1. copy files to $NESTED_DIRECTORY directory Exclude the scoped/nested directories to prevent rsync from copying in a loop
|
||||
- run: rsync --exclude rector-build-php70 -av * rector-build-php70 --quiet
|
||||
|
@ -25,7 +25,12 @@ define('__RECTOR_RUNNING__', true);
|
||||
$autoloadIncluder = new AutoloadIncluder();
|
||||
$autoloadIncluder->includeDependencyOrRepositoryVendorAutoloadIfExists();
|
||||
|
||||
if (should_include_preload()) {
|
||||
|
||||
// load extracted PHPStan with its own preload.php
|
||||
$extractedPhpstanAutoload = __DIR__ . '/../vendor/phpstan/phpstan-extracted/vendor/autoload.php';
|
||||
if (file_exists($extractedPhpstanAutoload)) {
|
||||
require_once $extractedPhpstanAutoload;
|
||||
} elseif (should_include_preload()) {
|
||||
require_once __DIR__ . '/../preload.php';
|
||||
}
|
||||
|
||||
|
@ -25,7 +25,7 @@
|
||||
"phpstan/phpstan-phpunit": "^0.12.18",
|
||||
"rector/rector-cakephp": "^0.10.4",
|
||||
"rector/rector-doctrine": "^0.10.6",
|
||||
"rector/rector-installer": "^0.10.1",
|
||||
"rector/extension-installer": "^0.10.2",
|
||||
"rector/rector-laravel": "^0.10.2",
|
||||
"rector/rector-nette": "^0.10.9",
|
||||
"rector/rector-nette-to-symfony": "^0.10.0",
|
||||
|
@ -488,3 +488,5 @@ parameters:
|
||||
paths:
|
||||
- rules/EarlyReturn/Rector/If_/ChangeNestedIfsToEarlyReturnRector.php
|
||||
- rules/EarlyReturn/Rector/If_/ChangeAndIfToEarlyReturnRector.php
|
||||
|
||||
- '#Class with base "PhpVersionFactory" name is already used in "PHPStan\\Php\\PhpVersionFactory", "Rector\\Core\\Util\\PhpVersionFactory"\. Use unique name to make classes easy to recognize#'
|
||||
|
@ -23,9 +23,6 @@ use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigura
|
||||
use Symplify\SymfonyPhpConfig\ValueObjectInliner;
|
||||
|
||||
return static function (ContainerConfigurator $containerConfigurator): void {
|
||||
$parameters = $containerConfigurator->parameters();
|
||||
$parameters->set(Option::SETS, [SetList::NAMING]);
|
||||
|
||||
// include sets
|
||||
$containerConfigurator->import(SetList::CODING_STYLE);
|
||||
$containerConfigurator->import(SetList::CODE_QUALITY);
|
||||
|
Loading…
x
Reference in New Issue
Block a user