rector

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


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


Solution

  • Found !

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

    Then there is available some helpers.

    The one I needed was print_node.