Closed andybroomfield closed 2 weeks ago
There are a couple of things at play here, firstly PHPStan doesn't have the concept of notice
or warning
types everything is an error
type, secondly, GitHub does a very poor UX job if you make a step warning/continue-on-error (it will still mark it as a success even if it errors) unlike GitLab which will visually show the difference with a yellow warning.
Given it's deprecated in 10.3 we can use the DeprecationHelper in Drupal which we did similar in localgov_base https://github.com/localgovdrupal/localgov_base/pull/567/files#diff-f9772c1a7f4e40b1fa6f9272c087adbfef38038d1d182a377d91d6993ac01255 for the same error or we could use a phpstan ignore line similar to this with a FIXME
note to fix in future as we have done in the past e.g. https://github.com/localgovdrupal/localgov_guides/blob/b63fa1db95c02d3dec6e677a7ea03bee991ee3c1/tests/src/Kernel/OverviewPageIntegrity.php#L21.
As a personal preference now that the functionality is available we should use the DeprecationHelper.
Closing this as the PR https://github.com/localgovdrupal/localgov_project/pull/153 adds ignores for Drupal 12 deprecations
Noting that this test run flags up a deprecation error (actually fixed in https://github.com/localgovdrupal/localgov_alert_banner/pull/333).
It would be good to be able to have these flagged as warnings, as the impact won't be till Drupal 12 in 2026.