WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Commit 835ccad

Browse files
Merge branch '2.5' of github.com:sulu/skeleton into 2.6
2 parents 6d69f84 + 826a9ee commit 835ccad

File tree

3 files changed

+15
-40
lines changed

3 files changed

+15
-40
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858
"php-cs-fixer/shim": "^3.58",
5959
"phpspec/prophecy-phpunit": "^2.1",
6060
"phpstan/extension-installer": "^1.3",
61-
"phpstan/phpstan": "^1.10",
61+
"phpstan/phpstan": "^1.12",
6262
"phpstan/phpstan-doctrine": "^1.3",
6363
"phpstan/phpstan-phpunit": "^1.3",
6464
"phpstan/phpstan-symfony": "^1.3",

config/router.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313

1414
// Workaround https://bugs.php.net/64566
1515
$autoPrependFile = \ini_get('auto_prepend_file');
16-
// @phpstan-ignore-next-line https://github.com/phpstan/phpstan/issues/7685
1716
if (false !== (bool) $autoPrependFile && !\in_array(\realpath($autoPrependFile), \get_included_files(), true)) {
1817
require \ini_get('auto_prepend_file');
1918
}

rector.php

Lines changed: 14 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -3,59 +3,35 @@
33
declare(strict_types=1);
44

55
use Rector\Config\RectorConfig;
6-
use Rector\Doctrine\Set\DoctrineSetList;
7-
use Rector\PHPUnit\Set\PHPUnitLevelSetList;
8-
use Rector\PHPUnit\Set\PHPUnitSetList;
9-
use Rector\Set\ValueObject\LevelSetList;
10-
use Rector\Set\ValueObject\SetList;
11-
use Rector\Symfony\Set\SymfonyLevelSetList;
126
use Rector\Symfony\Set\SymfonySetList;
13-
use Sulu\Rector\Set\SuluLevelSetList;
147

15-
return static function (RectorConfig $rectorConfig): void {
16-
$rectorConfig->paths([__DIR__ . '/src', __DIR__ . '/tests']);
17-
18-
$rectorConfig->phpstanConfigs([
8+
return RectorConfig::configure()
9+
->withPaths([
10+
__DIR__ . '/src',
11+
__DIR__ . '/tests',
12+
])
13+
->withRootFiles()
14+
->withPHPStanConfigs([
1915
__DIR__ . '/phpstan.dist.neon',
2016
// rector does not load phpstan extension automatically so require them manually here:
2117
__DIR__ . '/vendor/phpstan/phpstan-doctrine/extension.neon',
2218
__DIR__ . '/vendor/phpstan/phpstan-symfony/extension.neon',
23-
]);
24-
25-
// basic rules
26-
$rectorConfig->importNames();
27-
$rectorConfig->importShortClasses(false);
28-
29-
$rectorConfig->sets([
30-
SetList::CODE_QUALITY,
31-
LevelSetList::UP_TO_PHP_81,
32-
]);
19+
])
20+
->withImportNames(importShortClasses: false)
21+
->withPreparedSets(codeQuality: true, doctrineCodeQuality: true)
22+
->withPhpSets()
3323

3424
// symfony rules
35-
$rectorConfig->symfonyContainerPhp(__DIR__ . '/var/cache/website/dev/App_KernelDevDebugContainer.xml');
36-
37-
$rectorConfig->sets([
25+
->withSymfonyContainerPhp(__DIR__ . '/var/cache/website/dev/App_KernelDevDebugContainer.xml')
26+
->withSets([
3827
SymfonySetList::SYMFONY_CODE_QUALITY,
3928
SymfonySetList::SYMFONY_CONSTRUCTOR_INJECTION,
4029
// activate when doing updates:
4130
// SymfonyLevelSetList::UP_TO_SYMFONY_63,
42-
]);
43-
44-
// doctrine rules
45-
$rectorConfig->sets([
46-
DoctrineSetList::DOCTRINE_CODE_QUALITY,
47-
]);
48-
49-
// phpunit rules
50-
$rectorConfig->sets([
5131
// activate when doing updates:
5232
// PHPUnitLevelSetList::UP_TO_PHPUNIT_90,
5333
// PHPUnitSetList::PHPUNIT_91,
54-
]);
55-
56-
// sulu rules
57-
$rectorConfig->sets([
34+
// sulu rules
5835
// activate for updates when doing updates:
5936
// SuluLevelSetList::UP_TO_SULU_25,
6037
]);
61-
};

0 commit comments

Comments
 (0)