- Issue created by @paul121
- πΊπΈUnited States m.stenta
What is required to support both, technically speaking?
- πΊπΈUnited States m.stenta
Here is the Drupal core meta issue that shows the progress for all core annotation types, and their conversion status: π [meta] Convert all core plugin types to attribute discovery Postponed
- πΊπΈUnited States m.stenta
This Drupal Answers thread provides some good guidance on how to convert annotations to attributes using Rector: https://drupal.stackexchange.com/questions/321008/how-to-use-drupal-rect...
I've started some of this process for core annotations locally. I will push a branch up soon and lay out next steps...
- πΊπΈUnited States m.stenta
Talked through strategy with @paul121 today, and this is the tentative plan:
- Merge
3.x-rector
branch (PR: https://github.com/farmOS/farmOS/pull/901) -
3.x-attributes
branch- Convert all annotations to attributes that can be in Drupal 10
- Add support for attributes in farmOS plugin types in 3.x
- Add rector config to enforce attributes in new PRs
-
4.x-attributes
branch- Convert all annotations to attributes that can be in Drupal 11 (with rector config to enforce)
- Deprecate farmOS plugin annotations in 4.x (for removal in 5.x)
- Merge
- πΊπΈUnited States m.stenta
Merge
3.x-rector
branch (PR: https://github.com/farmOS/farmOS/pull/901)Done!
- Convert all annotations to attributes that can be in Drupal 10
- Add rector config to enforce attributes in new PRs
Opened a PR for these two pieces: https://github.com/farmOS/farmOS/pull/908
Add support for attributes in farmOS plugin types in 3.x
Started a
3.x-farm-attributes
branch for this: https://github.com/mstenta/farmOS/tree/3.x-farm-attributesIt only adds the enforcement logic to
rector.php
. We still need to add support for attributes to all of our custom plugin types.Convert all annotations to attributes that can be in Drupal 11 (with rector config to enforce)
Started a
4.x-attributes
branch for this: https://github.com/mstenta/farmOS/tree/4.x-attributesThis includes
ConfigEntityType
,ContentEntityType
, andMigrateSource
, which did not have attributes support in Drupal 10.Deprecate farmOS plugin annotations in 4.x (for removal in 5.x)
This can be added to the
4.x-attributes
branch once we add support for attributes to farmOS plugin types in 3.x. - Assigned to m.stenta
- Status changed to Needs work
6 months ago 5:00pm 10 April 2025 - πΊπΈUnited States m.stenta
Discussed this on the farmOS dev call today. We will probably just make the changes to the farmOS (and Log module) plugins in the
4.x-attributes
branch, rather than trying to get it into3.x
. - πΊπΈUnited States paul121 Spokane, WA
Add support for attributes in farmOS plugin types in 3.x
Started a 3.x-farm-attributes branch for this: https://github.com/mstenta/farmOS/tree/3.x-farm-attributes
It only adds the enforcement logic to rector.php. We still need to add support for attributes to all of our custom plugin types.
I've opened a PR that adds support for attributes to farmOS core plugins and includes these rector changes. I believe all of these changes can be merged separate of remaining steps! https://github.com/farmOS/farmOS/pull/963
- πΊπΈUnited States m.stenta
@paul121's PR for farmOS plugin attribute support has been merged into 4.x.
Change record published: https://www.drupal.org/node/3523485 β
Started a
4.x-attributes
branch for this: https://github.com/mstenta/farmOS/tree/4.x-attributesThis includes
ConfigEntityType
,ContentEntityType
, andMigrateSource
, which did not have attributes support in Drupal 10.I've rebased these commits so they are now part of my
4.x-d11
branch, since they are dependent on Drupal 11. So once that's merged, we will be using attributes everywhere instead of annotations.Changing this back to Needs Work. We can close this once that's merged. Then the only remaining task will be to remove the annotation support in farmOS 5.x, which @paul121 drafted here: https://github.com/paul121/farmOS/commits/4.x-attributes-remove-farm-cor...