Skip to content

6.x - EventManagerOnRector flips already changed signature calls #376

@LordSimal

Description

@LordSimal

While preparing more underscore clean ups I realized, that https://github.com/cakephp/upgrade/blob/6.x/src/Rector/Cake6/EventManagerOnRector.php changes the signature of already "fixed" ->on() calls on the code if the rector is called more than once on a given folder.

It appears that custom rector needs to be extended to check, if the 2nd param is already a callable (which technically can also be an array) or not.

@dereuromark could you take a look at that with your almighty AI 😜?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions