From b0946520611268201b2b097f05860cb550331d5b Mon Sep 17 00:00:00 2001 From: Sebastian Schreiber Date: Mon, 5 Dec 2022 22:37:33 +0100 Subject: [PATCH] TASK: Update to Rector 0.15.1 --- composer.json | 4 ++-- .../Fixture/fixture.php.inc | 6 ------ .../Fixture/not_working_unit_test_fixture.php.inc | 10 ++-------- .../Nimut/TestingFramework/config/configured_rule.php | 2 +- .../ContentObjectRendererFileResourceRectorTest.php | 1 - .../config/configured_rule.php | 2 +- 6 files changed, 6 insertions(+), 19 deletions(-) diff --git a/composer.json b/composer.json index 13b644189..77da157a8 100644 --- a/composer.json +++ b/composer.json @@ -27,8 +27,8 @@ "helmich/typo3-typoscript-parser": "^2.4.1", "nette/utils": "^3.0", "nikic/php-parser": "^4.14", - "phpstan/phpstan": "1.9.2", - "rector/rector": "0.14.8", + "phpstan/phpstan": "^1.7.12", + "rector/rector": "0.15.1", "symfony/console": "^4.0 || ^5.0 || ^6.0", "symfony/polyfill-php80": "^1.26", "symfony/polyfill-php81": "^1.26", diff --git a/tests/Rector/Extensions/solr/v9/ApacheSolrDocumentToSolariumDocumentRector/Fixture/fixture.php.inc b/tests/Rector/Extensions/solr/v9/ApacheSolrDocumentToSolariumDocumentRector/Fixture/fixture.php.inc index 7c60910bc..91867fddc 100644 --- a/tests/Rector/Extensions/solr/v9/ApacheSolrDocumentToSolariumDocumentRector/Fixture/fixture.php.inc +++ b/tests/Rector/Extensions/solr/v9/ApacheSolrDocumentToSolariumDocumentRector/Fixture/fixture.php.inc @@ -16,9 +16,6 @@ class MySolrIndexer $document->setMultiValue('key', 'foo', true); } - /** - * @param Apache_Solr_Document[] $documents - */ public function multiple(array $documents) { /** @var Apache_Solr_Document $document */ @@ -48,9 +45,6 @@ class MySolrIndexer $document->addField('key', 'foo', true); } - /** - * @param Document[] $documents - */ public function multiple(array $documents) { /** @var Apache_Solr_Document $document */ diff --git a/tests/Rector/Nimut/TestingFramework/Fixture/not_working_unit_test_fixture.php.inc b/tests/Rector/Nimut/TestingFramework/Fixture/not_working_unit_test_fixture.php.inc index cad9be0da..8622cdafe 100644 --- a/tests/Rector/Nimut/TestingFramework/Fixture/not_working_unit_test_fixture.php.inc +++ b/tests/Rector/Nimut/TestingFramework/Fixture/not_working_unit_test_fixture.php.inc @@ -8,10 +8,7 @@ use Nimut\TestingFramework\TestCase\UnitTestCase; class MyUnitTest extends UnitTestCase { - /** - * @var AccessibleMockObjectInterface - */ - protected $fooBarBaz; + protected AccessibleMockObjectInterface $fooBarBaz; public function testFooBar() { @@ -35,10 +32,7 @@ use TYPO3\TestingFramework\Core\Exception; class MyUnitTest extends UnitTestCase { - /** - * @var AccessibleObjectInterface - */ - protected $fooBarBaz; + protected AccessibleObjectInterface $fooBarBaz; public function testFooBar() { diff --git a/tests/Rector/Nimut/TestingFramework/config/configured_rule.php b/tests/Rector/Nimut/TestingFramework/config/configured_rule.php index 4b4cb5a15..94a7a31f9 100644 --- a/tests/Rector/Nimut/TestingFramework/config/configured_rule.php +++ b/tests/Rector/Nimut/TestingFramework/config/configured_rule.php @@ -6,6 +6,6 @@ use Ssch\TYPO3Rector\Set\Extension\NimutTestingFrameworkSetList; return static function (RectorConfig $rectorConfig): void { - $rectorConfig->disableImportNames(); + $rectorConfig->importNames(false); $rectorConfig->sets([NimutTestingFrameworkSetList::NIMUT_TESTING_FRAMEWORK_TO_TYPO3_TESTING_FRAMEWORK]); }; diff --git a/tests/Rector/v8/v5/ContentObjectRendererFileResourceRector/ContentObjectRendererFileResourceRectorTest.php b/tests/Rector/v8/v5/ContentObjectRendererFileResourceRector/ContentObjectRendererFileResourceRectorTest.php index 00e372532..1d48d930a 100644 --- a/tests/Rector/v8/v5/ContentObjectRendererFileResourceRector/ContentObjectRendererFileResourceRectorTest.php +++ b/tests/Rector/v8/v5/ContentObjectRendererFileResourceRector/ContentObjectRendererFileResourceRectorTest.php @@ -16,7 +16,6 @@ final class ContentObjectRendererFileResourceRectorTest extends AbstractRectorTe public function test(string $filePath): void { $this->markTestIncomplete('The comparison is false positive wrongly.'); - #$this->doTestFile($filePath); } /** diff --git a/tests/Rector/v9/v5/RefactorTypeInternalTypeFileAndFileReferenceToFalRector/config/configured_rule.php b/tests/Rector/v9/v5/RefactorTypeInternalTypeFileAndFileReferenceToFalRector/config/configured_rule.php index a5b81c12a..c3dc89108 100644 --- a/tests/Rector/v9/v5/RefactorTypeInternalTypeFileAndFileReferenceToFalRector/config/configured_rule.php +++ b/tests/Rector/v9/v5/RefactorTypeInternalTypeFileAndFileReferenceToFalRector/config/configured_rule.php @@ -7,6 +7,6 @@ return static function (RectorConfig $rectorConfig): void { $rectorConfig->import(__DIR__ . '/../../../../../../config/config_test.php'); - $rectorConfig->disableImportNames(); + $rectorConfig->importNames(false); $rectorConfig->rule(RefactorTypeInternalTypeFileAndFileReferenceToFalRector::class); };