localgovdrupal / localgov_alert_banner

Alert banner module for LocalGovDrupal
GNU General Public License v2.0
4 stars 8 forks source link

deprecate block contructor old signiture (current user and entity repository) #369

Closed andybroomfield closed 1 month ago

andybroomfield commented 1 month ago

What does this change?

Might not be neseccary, but if custom modules are extending the alert banner block, this will mark the old class signiture as deprecated. See https://github.com/localgovdrupal/localgov_alert_banner/wiki/Change-to-alert-banner-block-signature

How to test

Extend the block with the old signature and deprecation messages show up.

How can we measure success?

Any custom modules get updated to the new signature

Have we considered potential risks?

This might not be the right way of handling this, some people may not update to the new signature.

Images

Screenshot 2024-08-29 at 11 14 11 pm

Accessibility

n/a

millnut commented 1 month ago

This looks good to me @andybroomfield my only concern is that paratest hides deprecations but this will be visible elsewhere to the user so it should be ok.

On paratest specific I wonder in this issue https://github.com/localgovdrupal/localgov_shared_workflows/issues/9 we go with Option 1 and switch shared workflows to use phpunit for modules only that way we have better visibility of deprecations.

andybroomfield commented 1 month ago

Thanks @millnut. This isn't really intended to flag to ourselves as I don't think we extend the block, but I do know several councils / agencies have made custom alter banner blocks where they add some persistent alerts and extra information, so it's intended to indicate the new __construct signature and provide a graceful way of informing them and adding the alert banner manager, hopefully this is the right way to do that.

andybroomfield commented 1 month ago

This is the guide I'm reading https://www.drupal.org/about/core/policies/core-change-policies/how-to-deprecate