Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
PHPStan is run with memory limit of -1. This is expecially hurting the gitlab runners. When running the update bot there is only one mode that gets close to 1.5g memory usage, the cloud module. Webform is second with 1.1g.
In order to change the memory limit we need a new flag.
Steps to reproduce
n.a.
Proposed resolution
- Make memory limit 1.5g by default.
- Add an option to set it through commandline.
* @option phpstan-memory-limit Set memory limit for PHPStan (default: 1500M).
Output for new Drush command:
drush us-a --help
Analyze projects output as ASCII.
Arguments:
[projects]... List of projects to analyze.
Options:
--all Analyze all projects.
--skip-existing Return results from a previous scan of a project if available, otherwise start a new one.
--ignore-uninstalled Ignore uninstalled projects.
--ignore-contrib Ignore contributed projects.
--ignore-custom Ignore custom projects.
--phpstan-memory-limit[=PHPSTAN-MEMORY-LIMIT] Set memory limit for PHPStan. [default: 1500M]
Aliases: us-a
Remaining tasks
Add the flag
User interface changes
n.a.
API changes
No BC breaks.
Data model changes
n.a.
Issue fork upgrade_status-3306263
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
bbralaI will fix this, first few lines of code have been pushed to the MR.
Comment #4
bbralaComment #5
bbralaComment #6
bbralaComment #7
bbralaWorks as it should. Test still green, tested locally on jsonapi_extra's (and ran the tests). Also checked processes to see if the memory limit is set. Also tried setting it to 10MB, which made it fail, as expeceted.
Comment #8
Gábor HojtsySuperb, thanks!