Skip to content

[TypeDeclarationDocblocks] Handle crash on big array on AddReturnDocblockDataProviderRector#7352

Closed
samsonasik wants to merge 1 commit intomainfrom
skip-big-array
Closed

[TypeDeclarationDocblocks] Handle crash on big array on AddReturnDocblockDataProviderRector#7352
samsonasik wants to merge 1 commit intomainfrom
skip-big-array

Conversation

@samsonasik
Copy link
Member

Reproduced at CodeIgniter4 project

https://github.com/codeigniter4/CodeIgniter4/blob/f16bf8763e4edcf77282cece9375bb7690da1825/tests/system/Validation/StrictRules/CreditCardRulesTest.php#L69

It got error:

1 test triggered 1 PHP warning:

1) /Users/samsonasik/www/rector-src/vendor/phpunit/phpunit/src/Framework/Constraint/String/StringMatchesFormatDescription.php:48
preg_match(): Compilation failed: regular expression is too large at offset 34583

Triggered by:

* Rector\Tests\TypeDeclarationDocblocks\Rector\Class_\AddReturnDocblockDataProviderRector\AddReturnDocblockDataProviderRectorTest::test#3
  /Users/samsonasik/www/rector-src/rules-tests/TypeDeclarationDocblocks/Rector/Class_/AddReturnDocblockDataProviderRector/AddReturnDocblockDataProviderRectorTest.php:14

@samsonasik
Copy link
Member Author

Closing for now, on unit test, this is due to phpunit, on rector side, it show

 [ERROR] Could not process                                                                                              
         "/Users/samsonasik/www/CodeIgniter4/tests/system/Validation/StrictRules/CreditCardRulesTest.php" file, due to: 
         "System error: "Undefined array key 0"                                                                         
         Run Rector with "--debug" option and post the report here: https://github.com/rectorphp/rector/issues/new". On line: 662

but can't reproduce yet on fixture.

@samsonasik samsonasik closed this Sep 27, 2025
@samsonasik samsonasik deleted the skip-big-array branch September 27, 2025 17:42
@github-actions
Copy link
Contributor

github-actions bot commented Mar 1, 2026

This pull request has been automatically locked because it has been closed for 150 days. Please open a new PR if you want to continue the work.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 1, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant