From 016dc2b30fa7651bdc3795d073c5fbcb17437368 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20Ha=C5=82as?= Date: Sat, 4 Jul 2026 00:10:15 +0200 Subject: [PATCH] fix: configure PHPStan --memory-limit=512M to prevent CI crashes 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 --- CHANGELOG.md | 2 ++ composer.json | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2195d19..da151f0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,8 @@ ## [Unreleased] ### Fixed +- [#56] PHPStan: configure `--memory-limit=512M` in the `phpstan` composer script to prevent + analysis from crashing under the default 128M limit on large codebases. - [#36] FutureStringArray: `await()` now copies `char*` elements into owned PHP strings via `FFI::string()` before releasing the future's memory. Previously, the method returned raw `FFI\CData` pointers that became dangling after `releaseMemory()`, causing use-after-free in diff --git a/composer.json b/composer.json index e42fce8..23bf2f5 100644 --- a/composer.json +++ b/composer.json @@ -36,7 +36,7 @@ "scripts": { "lint": ["phpcs --standard=phpcs.xml.dist", "@rector", "@phpstan"], "lint:fix": ["@rector:fix", "phpcbf --standard=phpcs.xml.dist"], - "phpstan": "phpstan analyse", + "phpstan": "phpstan analyse --memory-limit=512M", "cs": "phpcs --standard=phpcs.xml.dist", "cs-fix": "phpcbf --standard=phpcs.xml.dist", "test": "phpunit",