Skip to content

[Rector] Apply Option::PARALLEL to speed up analyze #5523

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 2, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions rector.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
use Rector\Php73\Rector\FuncCall\JsonThrowOnErrorRector;
use Rector\Php73\Rector\FuncCall\StringifyStrNeedlesRector;
use Rector\PHPUnit\Set\PHPUnitSetList;
use Rector\PSR4\Rector\FileWithoutNamespace\NormalizeNamespaceByPSR4ComposerAutoloadRector;
use Rector\Set\ValueObject\LevelSetList;
use Rector\Set\ValueObject\SetList;
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
Expand All @@ -59,6 +60,7 @@

$parameters = $containerConfigurator->parameters();

$parameters->set(Option::PARALLEL, true);
// paths to refactor; solid alternative to CLI arguments
$parameters->set(Option::PATHS, [__DIR__ . '/app', __DIR__ . '/system', __DIR__ . '/tests', __DIR__ . '/utils/Rector']);

Expand Down Expand Up @@ -145,4 +147,5 @@
$services->set(FuncGetArgsToVariadicParamRector::class);
$services->set(MakeInheritedMethodVisibilitySameAsParentRector::class);
$services->set(SimplifyEmptyArrayCheckRector::class);
$services->set(NormalizeNamespaceByPSR4ComposerAutoloadRector::class);
};
4 changes: 2 additions & 2 deletions tests/system/Commands/BaseCommandTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,14 @@ public function testMagicIssetTrue()
{
$command = new AppInfo($this->logger, service('commands'));

$this->assertTrue(isset($command->group));
$this->assertObjectHasAttribute('group', $command);
}

public function testMagicIssetFalse()
{
$command = new AppInfo($this->logger, service('commands'));

$this->assertFalse(isset($command->foobar));
$this->assertObjectNotHasAttribute('foobar', $command);
}

public function testMagicGet()
Expand Down
4 changes: 2 additions & 2 deletions tests/system/Files/FileCollectionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
* the LICENSE file that was distributed with this source code.
*/

namespace CodeIgniter\Files;

use CodeIgniter\Files\Exceptions\FileException;
use CodeIgniter\Files\File;
use CodeIgniter\Files\FileCollection;
use CodeIgniter\Test\CIUnitTestCase;

/**
Expand Down
3 changes: 2 additions & 1 deletion tests/system/Publisher/PublisherInputTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
* the LICENSE file that was distributed with this source code.
*/

use CodeIgniter\Publisher\Publisher;
namespace CodeIgniter\Publisher;

use CodeIgniter\Test\CIUnitTestCase;

/**
Expand Down
3 changes: 2 additions & 1 deletion tests/system/Publisher/PublisherOutputTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
* the LICENSE file that was distributed with this source code.
*/

use CodeIgniter\Publisher\Publisher;
namespace CodeIgniter\Publisher;

use CodeIgniter\Test\CIUnitTestCase;
use org\bovigo\vfs\vfsStream;
use org\bovigo\vfs\vfsStreamDirectory;
Expand Down
3 changes: 2 additions & 1 deletion tests/system/Publisher/PublisherRestrictionsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@
* the LICENSE file that was distributed with this source code.
*/

namespace CodeIgniter\Publisher;

use CodeIgniter\Publisher\Exceptions\PublisherException;
use CodeIgniter\Publisher\Publisher;
use CodeIgniter\Test\CIUnitTestCase;

/**
Expand Down
3 changes: 2 additions & 1 deletion tests/system/Publisher/PublisherSupportTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@
* the LICENSE file that was distributed with this source code.
*/

namespace CodeIgniter\Publisher;

use CodeIgniter\Publisher\Exceptions\PublisherException;
use CodeIgniter\Publisher\Publisher;
use CodeIgniter\Test\CIUnitTestCase;
use Tests\Support\Publishers\TestPublisher;

Expand Down