Skip to content

Commit e8cc53b

Browse files
turegjorupclaude
andcommitted
Skip NullToStrictStringFuncCallArgRector on CalendarApiFeedType
987ae75 removed the (string) casts around preg_match / preg_replace / trim in applyModifiersToEvents because they silently turned a preg_replace null return (PCRE runtime error) into an empty title, letting an event through with no filter applied. Rector wants the casts back; applying them re-introduces the silent coercion the commit specifically set out to remove. Suppressing the rule on this file alone is the honest answer. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 10882d2 commit e8cc53b

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

rector.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
use Rector\CodeQuality\Rector\Class_\InlineConstructorDefaultToPropertyRector;
66
use Rector\Config\RectorConfig;
77
use Rector\Doctrine\Set\DoctrineSetList;
8+
use Rector\Php81\Rector\FuncCall\NullToStrictStringFuncCallArgRector;
89
use Rector\Set\ValueObject\LevelSetList;
910
use Rector\Symfony\Set\SymfonySetList;
1011

@@ -28,4 +29,13 @@
2829
SymfonySetList::SYMFONY_63,
2930
SymfonySetList::SYMFONY_CODE_QUALITY,
3031
SymfonySetList::SYMFONY_CONSTRUCTOR_INJECTION,
32+
])
33+
// The (string) casts Rector wants here would re-introduce the silent
34+
// null→"" coercion that 987ae75c removed: the title-modifier path is a
35+
// correctness boundary, and on PCRE error the event is omitted with a
36+
// log rather than passed through with an unfiltered title.
37+
->withSkip([
38+
NullToStrictStringFuncCallArgRector::class => [
39+
__DIR__.'/src/Feed/CalendarApiFeedType.php',
40+
],
3141
]);

0 commit comments

Comments
 (0)