fix: configure PHPStan --memory-limit=512M (#56) - #63
Merged
Conversation
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
6 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
............. 73 / 73 (100%)
Time: 468ms; Memory: 20MB
[OK] Rector is done!
[OK] No errors passes (PHPCS + Rector + PHPStan level 9, 0 errors)
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