fix: raise memory_limit in composer test scripts#107
Merged
Conversation
The default PHP CLI memory_limit (128M) is insufficient for Pest's parallel test discovery across all 90+ Marko packages, causing `composer test` to die with "Allowed memory size of 134217728 bytes exhausted" before any test runs. Wrap the test/test:all scripts with `php -d memory_limit=2G` so they work out of the box on default PHP installs. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This was referenced Jun 3, 2026
michalbiarda
pushed a commit
to michalbiarda/marko
that referenced
this pull request
Jun 4, 2026
bin/release.sh runs pest directly (not via `composer test`) to include the integration-destructive group, so it didn't pick up the memory_limit bump from marko-php#107. Default PHP CLI memory_limit (128M) is exhausted during paratest's parallel suite loader, aborting the release before any test runs. Mirror the composer-script fix by passing `-d memory_limit=2G` to the pest invocation here as well. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
michalbiarda
pushed a commit
to michalbiarda/marko
that referenced
this pull request
Jun 4, 2026
IntegrationVerificationTest spawns pest as a subprocess (via exec) to verify the suite still runs after a destructive composer reinstall and to assert no fatal PHP errors surface in the output. Those subprocesses inherit the default CLI memory_limit (128M), so paratest's parallel suite loader exhausts memory mid-run — which the assertion at tests/IntegrationVerificationTest.php:171 then catches as a "PHP Fatal error" in the captured output, failing the release. Pass `-d memory_limit=2G` to both pest invocations (lines 109 and 162), mirroring the fix in marko-php#107 / marko-php#108. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.
Summary
composer testandcomposer test:allwere dying withAllowed memory size of 134217728 bytes exhaustedon default PHP installs (CLImemory_limit=128M) before any test could run — Pest's parallel discovery across 90+ Marko packages exceeds that limit during paratest'sSuiteLoaderphase.php -d memory_limit=2G vendor/bin/pest …so they work out of the box without requiring users to bump their globalphp.ini.Test plan
composer testruns to completion: 6138 passed, 36 risky, 145 notices, 22 skipped (18913 assertions, ~5s parallel).🤖 Generated with Claude Code