driftingly / rector-laravel

Rector upgrades rules for Laravel
http://getrector.org
MIT License
513 stars 50 forks source link

Incompatible with Rector v0.17 #121

Closed freshleafmedia closed 1 year ago

freshleafmedia commented 1 year ago

Rector v0.17.0 and above aren't compatible. It appears to be due to things like the findParentType method and nodesToAddCollector property being removed.

I'm using rector-laravel v0.21.0

gisostallenberg commented 1 year ago

composer.json should contain the required rector version.

I run driftingly/rector-laravel v0.21.0 which works fine on rector 0.17.2 but not on 0.17.3, because in that version BetterNodeFinder::findParentType was removed, see https://github.com/rectorphp/rector/releases/tag/0.17.3

According to SemVer rector can do breaking changes, but I think it should have a new minor version (0.18.0).

driftingly commented 1 year ago

@gisostallenberg This package used to be part of Rector but was pulled out to allow them to stay focused. I think they are working on a 1.0 release soon so we should be able to stabilize this package soon.

driftingly commented 1 year ago

@gisostallenberg @freshleafmedia Just released the updates by @GeniJaho, which should resolve this issue. Let me know.

gisostallenberg commented 1 year ago

@driftingly you mean the changes in https://github.com/driftingly/rector-laravel/pull/117?

driftingly commented 1 year ago

Yeah. I tried on a fresh install and latest Rector and it ran. Noticed there are some failing test though with everything merged in.

driftingly commented 1 year ago

And it looks like we are green again 🙌