diff --git a/composer.json b/composer.json
index a016c31fe7c7d3ee24fa4e579f812f7de23aea02..10b6b7b0873108ded5574a00aad5f6d75941f52e 100644
--- a/composer.json
+++ b/composer.json
@@ -108,7 +108,7 @@
         ],
         "tests": "php ./vendor/bin/phpunit",
         "phpcs": "php ./vendor/bin/phpcs src/ tests/",
-        "phpstan": "vendor/bin/phpstan analyse src/ tests/unit/ tests/functional/",
+        "phpstan": "php -d memory_limit=4G vendor/bin/phpstan analyse src/ tests/unit/ tests/functional/",
         "php-cs-fixer": "tools/php-cs-fixer/vendor/bin/php-cs-fixer fix src/ tests/unit/ tests/functional/"
     },
     "conflict": {