Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[3.x] [RFC] Support for New Configuration Formats #1167

Open
ravage84 opened this issue May 24, 2024 · 0 comments
Open

[3.x] [RFC] Support for New Configuration Formats #1167

ravage84 opened this issue May 24, 2024 · 0 comments

Comments

@ravage84
Copy link
Member

ravage84 commented May 24, 2024

This issue is a work in progress by the project maintainer team. Please do not spam.

Since its inception, PHPMD could configured by XML, only.
That XML schema is/was based on PMD, the Java tool PHPMD was inspired from.

Now, support for one or more configuration formats could be implemented.
Either for the next minor version in addition to XML or for the next major version, 3.0, either in addition or as replacement to XML.

There are a few formats to choose from.

Beyond the mere format of the configuration, the schema and its rules must also be defined.

If the XML format should be replaced, it would be sensible to have some transition phase. Either through the next minor versions [TBD] or by deprecating the old XML format but retaining it in 3.x for backwards compatibility.


XML

Advantages:

  • XML validierbar
  • XML Tooling
  • Has been this way since the beginning

Disadvantages:

  • PHP developers are less used to XML, than to other formats
  • Hard to maintain the spec
  • Verbose/cluttered

Used by:

JSON

https://de.wikipedia.org/wiki/JavaScript_Object_Notation

Advantages:

Disadvantages:

Used by:

PHP

Advantages:

Disadvantages:

Used by:

  • Symfony-based tools
  • PHP CS Fixer, examples

YAML

https://de.wikipedia.org/wiki/YAML

Advantages:

Disadvantages:

Used by:

  • Symfony-based tools
  • GitHub

Neon

https://github.com/nette/neon

Advantages:

  • yml like
  • convertable to/from json
  • supports comments

Disadvantages:

  • not to common

Used by:

  • PHPStan

Others

Advantages:

Disadvantages:

Used by:

Additional info

Noteworthy open related to the current XML configuration issues and PRs:

#39 -> #664
#545 & #546 -> #1166
#670
#705 -> probably fixed by #1166 too
#895
#886

#1058

@ravage84 ravage84 added this to the 3.0.0 milestone May 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

1 participant