Skip to content

README: "AST doesn't know about spaces"Β #8537

@mindplay-dk

Description

@mindplay-dk

is this still pertinent?

* Rector uses [nikic/php-parser](https://github.com/nikic/PHP-Parser/), built on technology called an *abstract syntax tree* (AST). An AST doesn't know about spaces and when written to a file it produces poorly formatted code in both PHP and docblock annotations.

according to this issue, most issues with spacing were long since resolved?

in my preliminary testing with Rector, I have not seen it mangle any spaces - and that's in a codebase with no code standard πŸ™‚

I understand there may still be some issues with spacing, but I almost skipped Rector (and would have done all of my rename operations by hand in PHP Storm instead) because of this warning - and clearly, it goes have some level of awareness of spacing, or this project would most likely have been totally mangled. πŸ˜…

(glad I chose Rector, as this will save me a lot of time! thank you for this incredible tool!)

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