The phpstan job reports three nullCoalesce.unnecessary errors on 4.x. The rule fires where the left operand of ?? can never be undefined, which makes coalescing it to a literal NULL a no-op:
domain/src/Form/DomainForm.php:111:$id = $domain->id() ?? NULL;domain/src/Hook/DomainThemeHooks.php:50:$string = $config->get('css_classes') ?? NULL;domain_config_ui/tests/src/Kernel/DomainConfigEditContextTest.php:157:$override_factory->getStorage('example_com')->read('system.site')['slogan'] ?? NULL
No module change caused this. The previous 4.x pipeline passed phpstan on the same code, and the job installs the latest phpstan, so the finding comes from a phpstan release. The job is allow_failure, so the pipeline as a whole stays green.
Proposed resolution
Delete the ?? NULL on those three lines. Note that the rule is about undefined-ness, not nullability: a method call is always set, whereas a possibly undefined array offset is not. The module has eight other ?? NULL occurrences, all of them guarding possibly undefined offsets, and none of those are flagged, so this should not be applied mechanically.
The 3.x branch carries the same three expressions, so it needs the same fix.
Issue fork domain-3613847
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 #6
mably commentedComment #11
mably commented