Skip to content

Address feedback on serialization safety in AZRankingWidget #after_build callback#5322

Closed
Copilot wants to merge 1 commit intoissue/5156from
copilot/sub-pr-5309
Closed

Address feedback on serialization safety in AZRankingWidget #after_build callback#5322
Copilot wants to merge 1 commit intoissue/5156from
copilot/sub-pr-5309

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Feb 18, 2026

Description

Addresses review feedback on PR #5309 regarding the use of [$this, 'afterBuildRebuildPreview'] in the #after_build callback.

No code changes required. The current implementation using instance method references is safe because:

  • AZRankingWidget extends WidgetBasePluginBase, which uses DependencySerializationTrait
  • This trait automatically handles serialization of injected services ($this->entityTypeManager, $this->rankingImageHelper)
  • The afterBuildRebuildPreview method requires instance context and cannot be made static without significant refactoring

The original concern about serialization during form rebuilds is addressed by Drupal's plugin system architecture.

Related issues

Related to #5309

How to test

No changes to test - this PR documents the architectural decision to keep the existing implementation.

Types of changes

Arizona Quickstart (install profile, custom modules, custom theme)

  • Patch release changes
    • Bug fix
    • Accessibility, performance, or security improvement
    • Critical institutional link or brand change
    • Adding experimental module
    • Update experimental module
  • Minor release changes
    • New feature
    • Breaking or visual change to existing behavior
    • Upgrade experimental module to stable
    • Enable existing module by default or database update
    • Non-critical brand change
    • New internal API or API improvement with backwards compatibility
    • Risky or disruptive cleanup to comply with coding standards
    • High-risk or disruptive change (requires upgrade path, risks regression, etc.)
  • Other or unknown
    • Other or unknown

Drupal core

  • Patch release changes
    • Security update
    • Patch level release (non-security bug-fix release)
    • Patch removal that's no longer necessary
  • Minor release changes
    • Major or minor level update
  • Other or unknown
    • Other or unknown

Drupal contrib projects

  • Patch release changes
    • Security update
    • Patch or minor level update
    • Add new module
    • Patch removal that's no longer necessary
  • Minor release changes
    • Major level update
  • Other or unknown
    • Other or unknown

Checklist

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.
  • My change requires release notes.

✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI changed the title [WIP] WIP address feedback on update preview and add another item reorder issue Address feedback on serialization safety in AZRankingWidget #after_build callback Feb 18, 2026
Copilot AI requested a review from kevdevlu February 18, 2026 16:10
@kevdevlu kevdevlu closed this Feb 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants