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

Question: new round of changing the "type" suggestion PRs ? #155

Open
jrfnl opened this issue Feb 6, 2022 · 9 comments
Open

Question: new round of changing the "type" suggestion PRs ? #155

jrfnl opened this issue Feb 6, 2022 · 9 comments
Assignees

Comments

@jrfnl
Copy link
Member

jrfnl commented Feb 6, 2022

At this moment, the plugin very deliberately only registers packages with the phpcodesniffer-standard type set in their composer.json file with PHP_CodeSniffer (providing a ruleset.xml file can be found in the package).

There are currently 307 packages registered in Packagist which use the phpcodesniffer-standard type.

When going through Packagist, however, there are a number of other "types" typically used for PHPCS standards:

  • coding-standard: 24 packages
  • phpcs-standard: 7 packages - most seem to be abandoned, but all seem to be expect to be used with the Goatherd PHPCS Installer (Composer plugin) which seems to have been abandoned 7 years ago
  • coding-standards: 1 package - is actually a CS-Fixer package
  • phpcs-coding-standard: 1 package - PHPCS 1.x package and looks abandoned
  • phpcs-coding-standards: . package - candidate to suggest changing the type
  • phpcs-ruleset: 1 package - candidate to suggest changing the type
  • codesniffer-standard: 1 package - candidate to suggest changing the type

If I remember correctly, a couple of years ago, a round of PRs was send in to repos for external PHPCS standards to update the Composer "type". Would it be an idea to selectively do so again ?

@Potherca
Copy link
Member

Potherca commented Feb 6, 2022

If I remember correctly, a couple of years ago, a round of PRs was send in to repos for external PHPCS standards to update the Composer "type".

That is correct several MRs, were opened using the template from our wiki.

The last time, there were 2 other packages that did the same as this one. Currently we seem to be the only one?

The wiki also has a page that lists Known-compatible-PHP_CodeSniffer-standards. We might want to change that to only list well-known packages and link to the packagist type for the rest.

Referring to well-known names in the template/MRs also probably won't hurt.

After we've updated the template, we could make a long-list and start opening MRs.

Although we might want to wait until after we move organisations 🤔

@Potherca
Copy link
Member

Although we might want to wait until after we move organisations

Note to self: Organisation move has been completed! Time to make that long list, yo.

@Potherca Potherca self-assigned this Apr 18, 2022
@jrfnl
Copy link
Member Author

jrfnl commented Apr 18, 2022

@Potherca I'd say: let's wait a little longer until a decision has been taken on #159 as otherwise, we'd have to send in a follow-up PR once that get actioned.

@Potherca
Copy link
Member

Making the long-list wouldn't have to wait, but I agree sending should be put on hold until we've got everything in order.

@Potherca
Copy link
Member

Potherca commented May 6, 2024

Follow-up question: Is this issue still relevant? Especially since this org is now the official home of PHPCS development.

If still relevant, I could have a stab at preparing the long list.

@jrfnl
Copy link
Member Author

jrfnl commented May 6, 2024

As this ticket is two years old, I can imagine that the first step should be to update the list in the original issue, i.e. see if and if so, which other type keywords are currently in use for PHPCS standards and of those, if there are still actively maintained projects in that list which would benefit from a ping.

Maybe @rodrigoprimo could help with that ?

@rodrigoprimo
Copy link

@jrfnl, I'd be happy to help, but I'm not sure I understand everything that needs to be done.

I can check the list you provided in the original issue and see if the number of packages for each of the types changed.

which other type keywords are currently in use for PHPCS standards

I'm not sure how I would figure out which other type keywords are being used besides the ones you already mentioned in the original issue. Is the idea to search Packagist for keywords like phpcs and so on to see if I find type keywords that are being used by custom code standards that are not included in the original list? Or did I misunderstand your comment, and this is not what you meant?

@jrfnl
Copy link
Member Author

jrfnl commented May 7, 2024

I'd be happy to help

@rodrigoprimo Thank you!

I'm not sure how I would figure out which other type keywords are being used besides the ones you already mentioned in the original issue. Is the idea to search Packagist for keywords like phpcs and so on to see if I find type keywords that are being used by custom code standards that are not included in the original list?

The goal of this exercise is to improve the PHPCS end-user experience by making sure that external PHPCS standards use the type which this plugin supports. This will allow end-users to use this plugin to register the external standard(s) automatically with PHPCS.
As an side-benefit, it will also allow end-users to more easily find other external PHPCS standards which may be interesting to them when searching on Packagist.

External standards do not have to require this plugin for this to work.

External standards which do require[-dev] this plugin must all have the correct type, otherwise things are broken for them already.

If I remember correctly, I did a variety of searches on Packagist to find type keywords being used for external PHPCS standards.

  • I used the list of packages using the supported type to find other coding standards related type keywords being used (using "show more" on the type list to see) and then did stand-alone searches with each of those types.
  • I also used the tags search to search for packages using keywords like phpcs, phpcbf, php_codesniffer etc. Then would examine the types being used by those packages ("show more") and then do more stand-alone searches with those type keywords.
  • I did some spot-checking of packages using the plugin as a non-dev dependency. Those should all have the correct type already.
  • I did some spot-checking of packages using the plugin as a dev dependency to see if any of those are external standards which are not using the correct type.
  • I did some spot-checking of packages using PHP_CodeSniffer as a non-dev dependency, as those are likely to all be external standards.
    When looking at those packages, I mostly looked for inspiration for other type keywords and other tag searches to use.

image

For the types I found which looked to contain external standards, I would open the page for each of those packages and also click-through to the actual repo to figure out the status, where "status" was a combination of:

  • Is the package really an external standard for PHPCS ?
  • Does it require another Composer plugin to register standards with PHPCS ? (all others appear to be abandoned by now)
  • Is the package still being maintained or has it been abandoned ? (based on repo status/last commit date, not last release date)
  • Is the package being used ? (does it have more than 0 downloads/dependents ?)

Does this help to get you started ?

Oh, and no need to let yourself be limited by what I did, feel free to get creative ;-)

@rodrigoprimo
Copy link

Does this help to get you started ?

Thanks a lot, @jrfnl. That is super helpful. I will look into this in the next few days.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants