Skip to content

Take advantage of format-preserving printer in phpstan/phpdoc-parser #7960

Description

@ondrejmirtes

Feature Request

Hello, I've added format-preserving pretty printer in phpdoc-parser 1.21.0. Details about how to use it are in the README: https://github.com/phpstan/phpdoc-parser#format-preserving-printer

I'm aware that you currently have your own solution, but maybe the built-in one will require less effort to make work, and you'll be able to delete a bunch of your own code.

Of course, it's not going to be have exactly 1:1 as your code does now, but we can work out the differences together for the best outcome 👍 I plan to support the format-preserving printer long into the future.

BTW: In the near future I want to add support for Doctrine annotations in phpdoc-parser and the printer. So you will need less hacks on your side to make them work too.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions