Skip to content

Commit

Permalink
Merge 3.x into 4.x
Browse files Browse the repository at this point in the history
  • Loading branch information
SonataCI authored Oct 15, 2023
2 parents 74986b4 + d25427e commit 29649ee
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 5 deletions.
2 changes: 2 additions & 0 deletions .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@
]],
'php_unit_strict' => true,
'php_unit_test_case_static_method_calls' => true,
'php_unit_data_provider_name' => true,
'php_unit_data_provider_return_type' => true,
'phpdoc_to_comment' => ['ignored_tags' => ['psalm-suppress', 'phpstan-var']],
'single_line_throw' => false,
'static_lambda' => true,
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
"phpstan/phpstan-symfony": "^1.0",
"phpunit/phpunit": "^9.5",
"psalm/plugin-phpunit": "^0.18",
"rector/rector": "^0.17",
"rector/rector": "^0.18",
"symfony/console": "^5.4 || ^6.2",
"symfony/filesystem": "^5.4 || ^6.2",
"symfony/finder": "^5.4 || ^6.2",
Expand Down
8 changes: 8 additions & 0 deletions rector.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@
use Rector\Config\RectorConfig;
use Rector\Php70\Rector\FunctionLike\ExceptionHandlerTypehintRector;
use Rector\Php71\Rector\FuncCall\CountOnNullRector;
use Rector\PHPUnit\CodeQuality\Rector\Class_\AddSeeTestAnnotationRector;
use Rector\PHPUnit\CodeQuality\Rector\Class_\PreferPHPUnitThisCallRector;
use Rector\PHPUnit\Set\PHPUnitLevelSetList;
use Rector\PHPUnit\Set\PHPUnitSetList;
use Rector\Set\ValueObject\LevelSetList;

return static function (RectorConfig $rectorConfig): void {
Expand All @@ -30,12 +34,16 @@

$rectorConfig->sets([
LevelSetList::UP_TO_PHP_80,
PHPUnitLevelSetList::UP_TO_PHPUNIT_90,
PHPUnitSetList::PHPUNIT_CODE_QUALITY,
]);

$rectorConfig->importNames();
$rectorConfig->importShortClasses(false);
$rectorConfig->skip([
CountOnNullRector::class,
ExceptionHandlerTypehintRector::class,
AddSeeTestAnnotationRector::class,
PreferPHPUnitThisCallRector::class,
]);
};
4 changes: 3 additions & 1 deletion src/Command/SitemapGeneratorCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ private function getContext(): RequestContext
/**
* Creates temporary directory if one does not exist.
*
* @return string|null Directory name or null if directory is already exist
* @return non-empty-string|null Directory name or null if directory is already exist
*/
private function createTempDir(OutputInterface $output): ?string
{
Expand All @@ -123,6 +123,8 @@ private function createTempDir(OutputInterface $output): ?string
}

/**
* @param non-empty-string $dir
*
* @throws \Exception
*/
private function generateSitemap(string $dir, string $scheme, string $host, string $appendPath): void
Expand Down
3 changes: 0 additions & 3 deletions tests/Block/Breadcrumb/BreadcrumbTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,6 @@ public function testBlockExectute(): void
$blockService->execute($blockContext, new Response());
}

/**
* @psalm-suppress DeprecatedClass
*/
public function testDefaultSettings(): void
{
$blockService = new BreadcrumbMenuBlockService_Test(
Expand Down

0 comments on commit 29649ee

Please sign in to comment.