mirror of
https://github.com/rectorphp/rector.git
synced 2024-06-01 17:00:51 +00:00
Fix ci of missing PHPStan extension types (#43)
This commit is contained in:
parent
e7732fbebe
commit
8ce853d8ff
|
@ -85,9 +85,7 @@
|
||||||
"Rector\\RuleDocGenerator\\": "utils/rule-doc-generator/src"
|
"Rector\\RuleDocGenerator\\": "utils/rule-doc-generator/src"
|
||||||
},
|
},
|
||||||
"classmap": [
|
"classmap": [
|
||||||
"stubs/Annotations",
|
"stubs",
|
||||||
"stubs/Nette",
|
|
||||||
"stubs/MyCLabs",
|
|
||||||
"rules-tests/Autodiscovery/Rector/Class_/MoveServicesBySuffixToDirectoryRector/Expected",
|
"rules-tests/Autodiscovery/Rector/Class_/MoveServicesBySuffixToDirectoryRector/Expected",
|
||||||
"rules-tests/Autodiscovery/Rector/Interface_/MoveInterfacesToContractNamespaceDirectoryRector/Expected",
|
"rules-tests/Autodiscovery/Rector/Interface_/MoveInterfacesToContractNamespaceDirectoryRector/Expected",
|
||||||
"rules-tests/CodingStyle/Rector/Namespace_/ImportFullyQualifiedNamesRector/Source",
|
"rules-tests/CodingStyle/Rector/Namespace_/ImportFullyQualifiedNamesRector/Source",
|
||||||
|
|
37
dev-docs/packages_ci_status.md
Normal file
37
dev-docs/packages_ci_status.md
Normal file
|
@ -0,0 +1,37 @@
|
||||||
|
# Packages CI Status
|
||||||
|
|
||||||
|
## Nette
|
||||||
|
|
||||||
|
* https://github.com/rectorphp/rector-nette
|
||||||
|
* ![](https://github.com/rectorphp/rector-nette/actions/workflows/tests.yaml/badge.svg)
|
||||||
|
* ![](https://github.com/rectorphp/rector-nette/actions/workflows/code_analysis.yaml/badge.svg)
|
||||||
|
|
||||||
|
## Symfony
|
||||||
|
|
||||||
|
* https://github.com/rectorphp/rector-symfony
|
||||||
|
* ![](https://github.com/rectorphp/rector-symfony/actions/workflows/tests.yaml/badge.svg)
|
||||||
|
* ![](https://github.com/rectorphp/rector-symfony/actions/workflows/code_analysis.yaml/badge.svg)
|
||||||
|
|
||||||
|
## Laravel
|
||||||
|
|
||||||
|
* https://github.com/rectorphp/rector-laravel
|
||||||
|
* ![](https://github.com/rectorphp/rector-laravel/actions/workflows/tests.yaml/badge.svg)
|
||||||
|
* ![](https://github.com/rectorphp/rector-laravel/actions/workflows/code_analysis.yaml/badge.svg)
|
||||||
|
|
||||||
|
## PHPUnit
|
||||||
|
|
||||||
|
* https://github.com/rectorphp/rector-phpunit
|
||||||
|
* ![](https://github.com/rectorphp/rector-phpunit/actions/workflows/tests.yaml/badge.svg)
|
||||||
|
* ![](https://github.com/rectorphp/rector-phpunit/actions/workflows/code_analysis.yaml/badge.svg)
|
||||||
|
|
||||||
|
## CakePHP
|
||||||
|
|
||||||
|
* https://github.com/rectorphp/rector-cakephp
|
||||||
|
* ![](https://github.com/rectorphp/rector-cakephp/actions/workflows/tests.yaml/badge.svg)
|
||||||
|
* ![](https://github.com/rectorphp/rector-cakephp/actions/workflows/code_analysis.yaml/badge.svg)
|
||||||
|
|
||||||
|
## Nette to Symfony
|
||||||
|
|
||||||
|
* https://github.com/rectorphp/rector-nette-to-symfony
|
||||||
|
* ![](https://github.com/rectorphp/rector-nette-to-symfony/actions/workflows/tests.yaml/badge.svg)
|
||||||
|
* ![](https://github.com/rectorphp/rector-nette-to-symfony/actions/workflows/code_analysis.yaml/badge.svg)
|
|
@ -31,6 +31,7 @@ final class PHPStanServicesFactory
|
||||||
$containerFactory = new ContainerFactory(getcwd());
|
$containerFactory = new ContainerFactory(getcwd());
|
||||||
|
|
||||||
$additionalConfigFiles = [];
|
$additionalConfigFiles = [];
|
||||||
|
|
||||||
$additionalConfigFiles[] = $parameterProvider->provideStringParameter(Option::PHPSTAN_FOR_RECTOR_PATH);
|
$additionalConfigFiles[] = $parameterProvider->provideStringParameter(Option::PHPSTAN_FOR_RECTOR_PATH);
|
||||||
$additionalConfigFiles[] = __DIR__ . '/../../../config/phpstan/static-reflection.neon';
|
$additionalConfigFiles[] = __DIR__ . '/../../../config/phpstan/static-reflection.neon';
|
||||||
$additionalConfigFiles[] = __DIR__ . '/../../../config/phpstan/better-infer.neon';
|
$additionalConfigFiles[] = __DIR__ . '/../../../config/phpstan/better-infer.neon';
|
||||||
|
|
|
@ -12,13 +12,11 @@
|
||||||
<directory>rules-tests</directory>
|
<directory>rules-tests</directory>
|
||||||
<directory>packages-tests</directory>
|
<directory>packages-tests</directory>
|
||||||
<directory>utils/*/tests</directory>
|
<directory>utils/*/tests</directory>
|
||||||
<exclude>rules-tests/NetteTesterToPHPUnit/Rector/RenameTesterTestToPHPUnitToTestFileRector/Source/*</exclude>
|
|
||||||
</testsuite>
|
</testsuite>
|
||||||
</testsuites>
|
</testsuites>
|
||||||
|
|
||||||
<php>
|
<php>
|
||||||
<ini name="memory_limit" value="-1" />
|
<ini name="memory_limit" value="-1" />
|
||||||
<const name="RECTOR_REPOSITORY" value="true"/>
|
|
||||||
<env name="XDEBUG_MODE" value="coverage"/>
|
<env name="XDEBUG_MODE" value="coverage"/>
|
||||||
<env name="KERNEL_CACHE_DIRECTORY" value="tmp/rector/cache"/>
|
<env name="KERNEL_CACHE_DIRECTORY" value="tmp/rector/cache"/>
|
||||||
</php>
|
</php>
|
||||||
|
|
|
@ -10,6 +10,7 @@ use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigura
|
||||||
return static function (ContainerConfigurator $containerConfigurator): void {
|
return static function (ContainerConfigurator $containerConfigurator): void {
|
||||||
$parameters = $containerConfigurator->parameters();
|
$parameters = $containerConfigurator->parameters();
|
||||||
$parameters->set(Option::PHP_VERSION_FEATURES, PhpVersionFeature::UNION_TYPES - 1);
|
$parameters->set(Option::PHP_VERSION_FEATURES, PhpVersionFeature::UNION_TYPES - 1);
|
||||||
|
$parameters->set(Option::PHPSTAN_FOR_RECTOR_PATH, __DIR__ . '/../../../../../../phpstan-for-rector.neon');
|
||||||
|
|
||||||
$services = $containerConfigurator->services();
|
$services = $containerConfigurator->services();
|
||||||
$services->set(ReturnTypeDeclarationRector::class);
|
$services->set(ReturnTypeDeclarationRector::class);
|
||||||
|
|
|
@ -232,16 +232,16 @@ final class PhpFileProcessor implements FileProcessorInterface
|
||||||
|
|
||||||
private function printFileErrors(File $file): void
|
private function printFileErrors(File $file): void
|
||||||
{
|
{
|
||||||
if(!$this->symfonyStyle->isVerbose()) {
|
if (! $this->symfonyStyle->isVerbose()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!$file->hasErrors()) {
|
if (! $file->hasErrors()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach ($file->getErrors() as $error) {
|
foreach ($file->getErrors() as $rectorError) {
|
||||||
$this->symfonyStyle->error($error->getMessage());
|
$this->symfonyStyle->error($rectorError->getMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user