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.
The dynamic $contexts property of \Drupal\Component\Plugin\ContextAwarePluginBase was deprecated in #3080631: Context values passed in configuration to ContextAwarePluginBase are disregarded. This issue is the one in which we will remove it.
Comment | File | Size | Author |
---|---|---|---|
#23 | 3081145-23-interdiff.txt | 939 bytes | Berdir |
#23 | 3081145-23.patch | 43.01 KB | Berdir |
#22 | 3081145-22.patch | 42.65 KB | andypost |
#22 | interdiff.txt | 1.01 KB | andypost |
#16 | plugin-bc-removal-3081145-15-interdiff.txt | 1.4 KB | Berdir |
Comments
Comment #3
BerdirExpanding the scope a bit, removing all plugin system BC layers.
Comment #4
BerdirComment #5
Berdir@todo: Also remove the context/context_definitions thing: \Drupal\Core\Plugin\DefaultPluginManager::fixContextAwareDefinitions.
Comment #7
BerdirComment #9
BerdirRemoved that failing BC test.
Comment #10
andypostLooks great to go, does it need subsystem maintainer to approve?
Comment #11
BerdirThe docblock of this class says that we could deprecate it in D9, maybe we could do that later as this helpful for modules to be compatible with d8 modules that haven't been updated yet. And adding a deprecation now might confuse some of our tools?
(I'm also not quite sure what the difference of this and $plugin->isConfigurable() is, to be honest)
Comment #12
catchLet's remove the PluginHelper hunk and properly deprecate it in a follow-up issue prior to removal.
Comment #13
BerdirI do need to remove that part, that interface is being removed here, but it still works as an API, it just only checks the one interface that is still in D9.
I created a follow-up #3105685: Deprecate PluginHelper::isConfigurable()
Comment #14
BerdirOne more thing, I'm not sure what will happen with this removed and people still trying to do this. We could keep this as an assert() or exception?
Comment #15
tim.plunkettI think an assert, similar to the one in #3097879: Remove all @deprecated code in \Drupal\Core\Database, is a great idea.
NW for that
Comment #16
BerdirAdded that, with a test.
Comment #17
andypostnit, extra line, otherwise needs RTBC
Comment #18
kim.pepperAll feedback has been addressed so RTBC
Comment #19
larowlanApplied patch locally and searched for deprecated|trigger_error in core/lib/Drupal/Component/Plugin
There's still some reference to the old configurable interfaces etc in the docblock of PluginHelper
We should clean those up here too
Comment #20
BerdirSee #11-13, I created a follow-up for that. This API is not deprecated, so we could only add a new D10 deprecation here and I kind of like the helper, that does make it useful to keep code compatible with modules that still use the old interface and D9. Deprecating it now for D10 would make it harder for modules to update now as tools would report that as a problem.
Comment #21
BerdirDiscussed with @larowlan, we agreed on just replacing that docblock with a @todo Consider deprecating in issue-url?` or so.
Will do that tomorrow unless someone gets to it first..
Comment #22
andypostFixed #17 and #21
Comment #23
BerdirThe idea was to replace that existing block completely with the todo, as we don't need the D8 explanation anymore.
Comment #24
longwaveWould this be better as an exception so we could give the caller a reason, and also we can test for this?
Comment #25
Berdirassert() throws an AssertError when it is enabled in php.ini and we are testing it.
Comment #26
longwaveAh, didn't see that. Is it still worth leaving a comment above with a link to the change record in case anyone triggers this assertion? Or adding an assertion description?
Comment #27
longwave#26 is just nitpicking so otherwise this is ready to go.
Comment #28
alexpottCommitted 267ccab and pushed to 9.0.x. Thanks!
Fixed the coding standards errors on commit.
Comment #31
sylus CreditAttribution: sylus commentedI was wrong as my if conditions were reversed, going to look at this further but please disregard :D