- Issue created by @codebymikey
- Merge request !66Issue #3527489 by codebymikey: Add PHP attribute support for plugins. → (Open) created by codebymikey
- 🇮🇹Italy itamair
thanks @codebymikey for moving ahead on all this ... that looks definitely wise and opportune.
I opened a review to you MR and left some comments.A couple of other questions and considerations:
- did you QA & Test your new implementation? Does it work properly without introducing any regression to the 8.x-4.x-dev branch?
- do you really think we should introduce all these new Attributes pattern still keeping the Annotations classes and backword compatibility for Drupal Core versions < 10.2?
Wouldn't be better to spin a new major Geocoder release that supports only "^10 || ^11" and remove all the Annotations? (not to maintain parallels patterns)? did you QA & Test your new implementation? Does it work properly without introducing any regression to the 8.x-4.x-dev branch?
Yes, and that was why I introduced the tests for Drupal 9.5 so it was easier to confirm the behaviour.
do you really think we should introduce all these new Attributes pattern still keeping the Annotations classes and backword compatibility for Drupal Core versions < 10.2?
I did briefly consider this, but given that Drupal 9.5 was still supported even after the work with ✨ Drupal 10 compatibility: changing php-http/guzzle6-adapter dependency into php-http/guzzle7-adapter RTBC , I thought there might've been a reason (e.g an ideology on the project's side to support as many Drupal versions as necessary), and didn't think it necessitated releasing a major release just for a new plugin discovery method whilst it was still fairly trivial to keep backwards-compatibility.
I think it would be cleaner, but as per the Drupal change record, annotation support is still supported until D12, so it seemed easier to keep compatibility for now whilst giving other contrib/custom modules time to switch to the attribute-based definitions, then when support for
- 🇮🇹Italy itamair
Thanks for your last fixes and all the provided explanations.
I am still not convinced that we should introduce the Plugin Attributes and still keep BC with Annotations and Drupal Core < 10.2.
At least we still have time to implement this, as (ref: https://www.drupal.org/project/drupal_cms/issues/3501710 🌱 Drupal 12.0 compatibility planning Active )Drupal 12 will be released at the earliest in June 2026 which is in 15 months
and probably we would rather deploy a new release in some months that would drop support to Drupal Core < 10.2
(and be cleaned up with all the Annotations Plugins code).
Let me still think about all this for some days ... and let's see if you or another community member has stronger opinion on all this.
Let's still keep this in "Needs review" for other comments ...