Closed (fixed)
Project:
Migrate Plus
Version:
6.0.x-dev
Component:
API
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
13 Aug 2025 at 19:58 UTC
Updated:
23 Jan 2026 at 15:43 UTC
Jump to comment: Most recent
Multiple things are moving to PHP Attributes. Plugins, Entities, REST resources, PHPUnit. Maybe a few more things. Let's convert to PHP Attributes in a BC manner so we still support Drupal 10.3, but also set ourselves up well for Drupal 12 or 13 when Attributes are the only supported mechanism.
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
heddnThanks to Tag1 for providing a small budget to explore AI. I used Claude mainly. Initially I asked it to convert all the things. That seemed too much in one pass. So then I asked it to suggest a Rector configuration that would help here. It did a decent job, but then I was still left with fully importing class names manually. Of note, rector didn't seem to want to update/convert all of the PHPUnit attributes. I tried to convince it, even pulled out xdebug to see why it was ignoring some of the conversions for the
@covers*cases. But to keep thing moving (and so I didn't fall prey to the issue where AI actually _slows_ things down) I opted use PHPStorm's automation to quickly and manually convert the few remaining phpunit annotations.Comment #5
heddnLets land this. Its very disruptive. But it will always be disruptive. And much of the RTBC queue is cleaned out right now, so this is about as good as it gets.
Comment #8
heddnI read in https://www.undpaul.de/en/blog/2026/01/20/converting-php-class-annotatio... this is very disruptive and:
Is this truly the case? I thought that with listing Drupal 10.5 as minimum drupal core version and core's ability to support both annotation and attributes at the same time, that other custom or contrib modules could still maintain annotations without any more effort. Can anyone report to the contrary with steps to reproduce?
Comment #9
prudloff commentedI also saw this article and was surprised to see such a breaking change in a patch release.
I tested quickly and AFAICT
\Drupal::service('plugin.manager.migrate_plus.data_fetcher')->getDefinitions()still returns plugins defined with an annotation.Comment #10
steffenrWhich Drupal version are you running?
We discovered the problem with our Drupal 10.6 installations.
I'll recheck with the latest 10.5.8 release later and update the blog post accordingly, if this was the "real" cause of the problem.
Comment #11
steffenrJust a quick udpate on the issue with steps to reproduce:
drush mswill result in errorCould not retrieve source count from my_custom_migration: The "my_custom_json_path" plugin does not exist. Valid plugin IDs for Drupal\migrate_plus\DataParserPluginManager are: json, json_subitem, simple_xml, soap, xmldrush msworks as expected and won't throw an errorComment #12
heddnThere was a quick followup in #3565462: Syntax error in DataParserPluginManager. Its landed for a while. I just noticed I hadn't tagged a new release though, so I've release it now with https://www.drupal.org/project/migrate_plus/releases/6.0.10
If you can still reproduce the issue after updating, let's open a new issue and link it back here so we can further investigate.
Comment #13
steffenr@heddn Thanks for your quick response. Updating to version 6.0.10 of the module solves the issue and the error i described cannot be reproduced anymore.
I'll update the blog post accordingly.
Comment #14
heddnI'm relieved. Thank you for your blog post too. It will help others who are also facing this situation. Plus its a great walk through how to upgrade from annotations to attributes. I also found that using PHP Rector was very useful in this space too.