In a rector rule's refactor function, how to print the current node as code?

77 Views Asked by At

Having a Node in the refactor function of a rule, how can I print the full node as php code?

1

There are 1 best solutions below

0
On BEST ANSWER

Found !

Install, using composer, the package rector/rector-debugging

Then there is available some helpers.

The one I needed was print_node.