Skip to content

fix: configure PHPStan --memory-limit=512M (#56) - #63

Merged
s2x merged 1 commit into
masterfrom
fix/issue-56-phpstan-memory-limit
Jul 3, 2026
Merged

fix: configure PHPStan --memory-limit=512M (#56)#63
s2x merged 1 commit into
masterfrom
fix/issue-56-phpstan-memory-limit

Conversation

@s2x

@s2x s2x commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Problem

PHPStan crashes under the default 128M memory limit when analysing the codebase, causing
[OK] No errors (and CI) to fail silently or incompletely.

The4 argument.type errors mentioned in #56 were already fixed in PR #62 ( bitmask on lines 215, 244, 313, 759 of ). This PR addresses the remaining memory limit issue.

Changes

Verification

  • ............................................................ 60 / 73 (82%)
    ............. 73 / 73 (100%)

Time: 468ms; Memory: 20MB

[OK] Rector is done!

[OK] No errors passes (PHPCS + Rector + PHPStan level 9, 0 errors)

  • PHPUnit 11.5.55 by Sebastian Bergmann and contributors.

Runtime: PHP 8.5.7
Configuration: /Users/piotr.halas/work/fdb-php/phpunit.xml

............................................................... 63 / 326 ( 19%)
............................................................... 126 / 326 ( 38%)
............................................................... 189 / 326 ( 57%)
............................................................... 252 / 326 ( 77%)
............................................................... 315 / 326 ( 96%)
........... 326 / 326 (100%)

Time: 00:00.064, Memory: 10.00 MB

OK (326 tests, 593 assertions) passes (326 tests, 593 assertions)

Closes #56

PHPStan can crash under the default 128M memory limit when analysing
larger codebases. Add explicit --memory-limit=512M to the phpstan
composer script so both local runs and CI (which calls composer phpstan)
complete deterministically.

Closes #56
@s2x
s2x merged commit ba367f7 into master Jul 3, 2026
6 checks passed
@s2x
s2x deleted the fix/issue-56-phpstan-memory-limit branch July 3, 2026 22:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Build] PHPStan level 9 fails (4 chr() argument.type errors in Tuple.php) and crashes under default memory limit

1 participant