Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
Given that \Drupal\Core\Plugin\DefaultSingleLazyPluginCollection
uses $this->instanceId
it should set it in \Drupal\Core\Plugin\DefaultSingleLazyPluginCollection::addInstanceId
Proposed resolution
Remaining tasks
User interface changes
API changes
Data model changes
Comment | File | Size | Author |
---|---|---|---|
#7 | 2726837-plugin-7-PASS.patch | 4.41 KB | tim.plunkett |
#7 | 2726837-plugin-7-FAIL.patch | 3.38 KB | tim.plunkett |
#5 | set_instance_id-2726837-5.patch | 672 bytes | dipakmdhrm |
Comments
Comment #2
tim.plunkettFixing capitalization
Comment #3
Vinay15Comment #4
Vinay15Comment #5
dipakmdhrm CreditAttribution: dipakmdhrm as a volunteer commentedMore context for this would be helpful.
$this->instanceId is already being set in the constructor and addInstanceId() adds an instanceId to list of available ids.
Without any context I am not sure how it would be helpful to set the instance id here.
Attaching a patch in any case.
Comment #6
tim.plunkettWorking on tests.
Comment #7
tim.plunkettOkay. There were actually two bugs here, since setConfiguration() was changing $this->configuration AFTER the get() call, and it needs to happen before.
Comment #9
dawehnerNice work!
Comment #10
alexpottCommitted 4e05f84 and pushed to 8.1.x and 8.2.x. Thanks!
I've committed to 8.1.x as this is a BC compatible bug fix.