Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-76452

Include phpstan configuration

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • None
    • 4.2
    • General
    • None

      Part of MDLSITE-2338.

      We can start to include a basic phpstan configuration for core to help track down coding issues.

      This will be particularly helpful in tracking down undefined dynamic properties, which were deprecated in PHP 8.2 and are tracked by MDL-76411

      From my testing I needed at least 5gb RAM allocated to run stan without running out of memory. On my laptop (Macbook Pro M1) it took 7-11 minutes approx.

      This is the command I used:

      php -dmemory_limit=6g vendor/bin/phpstan analyse --level 5 --configuration phpstan.neon  -vvv | tee phpstan_`date +%s`.out
      

      I've also generated a baseline per https://phpstan.org/user-guide/baseline

      Other useful reading:

            Unassigned Unassigned
            dobedobedoh Andrew Lyons
            Votes:
            7 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.