Problem/Motivation

The \Drupal\migrate_plus\DataParserPluginManager has a syntax error for the plugin definition annotation name, there is an extra "use " instead of just the class name.

Proposed resolution

Remove the prefix.

Command icon Show commands

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

jurgenhaas created an issue. See original summary.

jurgenhaas’s picture

Status: Active » Needs review

  • heddn committed b5318ae6 on 6.0.x authored by jurgenhaas
    bug: #3565462 Syntax error in DataParserPluginManager
    
    By: jurgenhaas
    By...
heddn’s picture

Status: Needs review » Fixed

Thanks for your kind fixes. Now, why didn't tests catch that?

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

jurgenhaas’s picture

I guess the tests didn't pick that up because all the plugins in the module itself are using attributes, so they never need to discover plugins based on annotations. We only found that issue because that plugin manager couldn't find our plugins any longer that have not yet been updated to use attributes. The argument is supposed to be a string, and that was valid before. There just isn't a class under that string.

heddn’s picture

That makes sense. I guess if we wanted to we could add a test module with the legacy annotation and test for that. But not its fixed, it isn't likely to happen again.

dpi’s picture

Updated to 6.0.9 today and found my @DataParser plugin stopped working, luckily thanks to test coverage.

It looks like the fix here should address my issue, can we put out a new stable 6.0.10 to ensure noone else gets caught?

Linking cause

dmundra’s picture

We also ran into the same issue and this change fixed it.

pookmish’s picture

Yes, the fix in this issue solved an error with BC on some plugin definitions still using the annotation. Can a new release be created please?

heddn’s picture

steffenr’s picture

Thanks for the quick release. I've updated our blog post accordingly.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.