Skip to content
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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ All notable changes to this project will be documented in this file.

## [Unreleased]

- Migrated `rector.php` to the `RectorConfig::configure()` builder.
- Gathered all repositories in one Symfony application.
- Changed to vite 7 and rolldown.
- Added ADRs 008 and 009.
Expand Down
27 changes: 17 additions & 10 deletions rector.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,21 @@
use Rector\CodeQuality\Rector\Class_\InlineConstructorDefaultToPropertyRector;
use Rector\Config\RectorConfig;
use Rector\Doctrine\Set\DoctrineSetList;
use Rector\Php81\Rector\FuncCall\NullToStrictStringFuncCallArgRector;
use Rector\Set\ValueObject\LevelSetList;
use Rector\Symfony\Set\SymfonySetList;

return static function (RectorConfig $rectorConfig): void {
$rectorConfig->paths([
return RectorConfig::configure()
->withPaths([
__DIR__.'/config',
__DIR__.'/public',
__DIR__.'/src',
__DIR__.'/tests',
]);

// register a single rule
$rectorConfig->rule(InlineConstructorDefaultToPropertyRector::class);

// define sets of rules
$rectorConfig->sets([
])
->withRules([
InlineConstructorDefaultToPropertyRector::class,
])
->withSets([
LevelSetList::UP_TO_PHP_82,
DoctrineSetList::ANNOTATIONS_TO_ATTRIBUTES,
DoctrineSetList::DOCTRINE_DBAL_30,
Expand All @@ -30,5 +29,13 @@
SymfonySetList::SYMFONY_63,
SymfonySetList::SYMFONY_CODE_QUALITY,
SymfonySetList::SYMFONY_CONSTRUCTOR_INJECTION,
])
// The (string) casts Rector wants here would re-introduce the silent
// null→"" coercion that 987ae75c removed: the title-modifier path is a
// correctness boundary, and on PCRE error the event is omitted with a
// log rather than passed through with an unfiltered title.
->withSkip([
NullToStrictStringFuncCallArgRector::class => [
__DIR__.'/src/Feed/CalendarApiFeedType.php',
],
]);
};
Loading