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 documentation for ContextDefinition
mentions the following:
Remove spaces after @ in your actual plugin - these are put into this sample code so that it is not recognized as an annotation.
However there are no spaces after the @ symbol. I tracked this down and this remark was introduced in the original issue #2281635: \Drupal\Core\Plugin\Context\Context should use a ContextDefinition class instead of arrays in comment #31. The spaces after the @ symbol were removed again in comment #38 but this was not spotted in subsequent reviews.
Comment | File | Size | Author |
---|---|---|---|
#2 | 2877259-2.patch | 584 bytes | pfrenssen |
Comments
Comment #2
pfrenssenComment #3
bander2 CreditAttribution: bander2 as a volunteer commentedPatch applied cleanly.
Comment #4
alexpottCommitted and pushed 3f01062 to 8.4.x and 27a9589 to 8.3.x. Thanks!