neos / rector

Neos Rector Recipes for code migrations
6 stars 4 forks source link

BUGFIX Rewrite of internal node properties in FlowQueries #64

Closed dlubitz closed 2 months ago

dlubitz commented 3 months ago

Also fixed existing and added missing tests.

kitsunet commented 3 months ago

Just wondering, this is obviously wrong but we need both, right? you could have q(node).property('_depth_) as well as node._depth or do we cover that elsewhere?

dlubitz commented 3 months ago

We have always two cases: node.depth and also q(node).property('depth')

The code was already trying to handle that, but unfortunatelly, the regex we used was missing the q(...) part, so we tried to replace all node.property(...) which is actally not valid.

dlubitz commented 2 months ago

Thanks for your input @kdambekalns. I've changed it.