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.
Follow up from #2090353: Don't require to put the use statement into plugin classes
Plugins now need to put the full namespace in their annotation properties, which is a mini-regression
@timplunkett had a nice idea to expose the annotation reader to the discovery, so one can do in his plugin manager
$this->discovery->addAnnotationNamespace($any_arbitary_namespace);
Comment | File | Size | Author |
---|---|---|---|
#6 | 2097585-6.patch | 1.49 KB | rpayanm |
#3 | plugin-2097585-3.patch | 1.46 KB | dawehner |
#3 | interdiff.txt | 1.3 KB | dawehner |
#1 | plugin-2097585-1.patch | 929 bytes | tim.plunkett |
Comments
Comment #1
tim.plunkettSee the interdiff in #1862202-172: Objectify the language system for why we want this.
Comment #2
ParisLiakos CreditAttribution: ParisLiakos commentedah i guess the method name should be plural
i will write a unit test and update it if none beats me to it
Comment #3
dawehnerSadly we are currently typehinting with the reader interface, which is better as it removes coupling, so we can't
directly call addNamespace. Additional let's add Drupal\Component\Annotation\Plugin all the time.
Comment #4
Berdir#3: plugin-2097585-3.patch queued for re-testing.
Comment #4.0
BerdirUpdated issue summary.
Comment #5
jhedstromComment #6
rpayanmComment #7
dawehner... it would be also kinda cool if we would have a congrete usecase already.
Comment #21
quietone CreditAttribution: quietone at PreviousNext commentedThis is now outdated as Drupal is using PHP Attributes for plugins, #3252386: Use PHP attributes instead of doctrine annotations.