Closed Asenar closed 4 months ago
@Asenar Thank you for your interest in contributing to PHP_CodeSniffer.
This feature will allow several company project to use a common base, either from their private repository, or from a public project
I'm not sure I understand the need for this feature. After all, projects can already use a common base.
Typically, this is done by having a separate repo which is set up as an external coding standard for PHP CodeSniffer, which handles the dependencies and the ruleset.
The projects then add this external coding standard as a dependency and references the standard by name in their own ruleset.
A setup like that, also allows for versioning the ruleset instead of it being a moving target (like it would be with a URL).
An example of such a setup can be seen in this organisation.
PHPCSDevCS
repo which manages the dependencies and holds the ruleset.There are plenty of other examples of such a setup around too.
Allowing for a URL also feels like it could open projects up to security risks if they would point to a URL for a standard which is not under their control.
You right, this can be achieved by different ways too.
I was thinking to a particular case where I didn't wanted to add a new dependency via composer (it's a documentation repository that hadn't any other purpose than to be read, but we can do differently).
@Asenar Glad to hear you've found another working solution. In that case, can we close this ticket ?
It's not ideal for me but yes I will find other way, we can close it :).
Thanks for that so quick answer !
This feature will allow to include in our
phpcs.xml.dist
file remote ruleset, for example by adding the following in configuration:This feature will allow serveral company project to use a common base, either from their private repository, or from a public project