This is a fresh feature in Drupal 10, which sounds like something that we should integrate without our GHA: https://www.drupal.org/node/3258232
Description:
The static analyzer tool PHPStan has been added to Drupal Core. We are running the tool with level 0 (the lowest level). The power of static analyzer is that it can find bugs in your code without having to write tests. PHPStan has been added to the script
core/scripts/dev/commit-code-check.shwhich is part of the testbot.The PHPStan configuration file is located at:
core/phpstan.neon.distThe PHPStan file with the skipped exceptions is located at:
core/phpstan-baseline.neonCLI Commands
Running PHPStan on drupal core:
vendor/bin/phpstan analyze --configuration=core/phpstan.neon.distRegenerating the baseline:vendor/bin/phpstan analyze --configuration=core/phpstan.neon.dist --generate-baseline ./core/phpstan-baseline.neon
Recent comments
I agree with @yorkshirepudding for new sites. Existing sites that use this "long text with summary" functionality already... not sure. There is an old core issue around this, too, it looks...
Use text editors in Summary Field
I always do a separate summary field for these reasons: Avoids the UI cludge of having either a summary or a trimmed value of body Allows summary to be mandatory...
Use text editors in Summary Field
It seems that while the summary field does not have a WYSIWYG editor. It does have the same text format as the main body field. Cutting and pasting content from the body field does not...
Use text editors in Summary Field