PHPCSStandards / composer-installer

Composer installer for PHP_CodeSniffer coding standards
https://packagist.org/packages/dealerdirect/phpcodesniffer-composer-installer
MIT License
554 stars 36 forks source link

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

Open jrfnl opened 2 years ago

jrfnl commented 2 years ago

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:

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 commented 2 years ago

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 :thinking:

Potherca commented 2 years ago

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.

jrfnl commented 2 years ago

@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 commented 2 years ago

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 commented 5 months ago

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 commented 5 months ago

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 commented 4 months ago

@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 commented 4 months ago

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.

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:

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 commented 4 months ago

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.

rodrigoprimo commented 4 months ago

I gave this task a first try. I created a spreadsheet in the link below, updating the information about the packages in the original list and including a few more packages for types that I found.

https://docs.google.com/spreadsheets/d/1Dz_pKLivmcD_pYmV1m4mHYD0MYu1vdYv4H4eN1HtqBA/edit?usp=sharing

To find the new types, I used Packagist API to get the types for all packages (https://packagist.org/packages/list.json?fields[]=type), and then parsed the results to get the unique types and searched that list for a few keywords that occurred to me.

Here are the new types that I found containing PHPCS custom standards:

It was nice to see that now there are 419 packages using the phpcodesniffer-standard type compared to 307 packages when this issue was opened.

Here is the full list of Packagist types if anyone wants to take a look as well: type-list.csv

Please let me know if there is anything else you would like me to do related to this issue.

Potherca commented 1 month ago

FYI: I've updated the MR text template to better reflect the current situation.

jrfnl commented 1 month ago

@Potherca Thanks for that. I saw a few more tweaks to make, but am running into a problem with checking out the wiki as a git repo on Windows as some of the file names used are incompatible with Windows.

Have you got any objection to me fixing those file names ?

Potherca commented 1 month ago

Go right ahead. 👍

jrfnl commented 1 month ago

@Potherca Take two: changing those file names means that the URLs to pages on the wiki will change (without redirect as GH doesn't do those for the wikis). Still okay ? (and yes, once updated, I would, of course, also update any links in the README or on other wiki pages to fix the links)

Potherca commented 1 month ago

Yeah, renaming is fine. I wouldn't worry too much about the URLs "breaking". They were mostly for "internal" use anyway.

Also, I think if anyone were to land on a dead link, they'd be intelligent enough to just click on the relevant page as a 404 redirect to the Wiki landing page. If nothing else, we could add a index/table-of-contents on the wiki homepage.

jrfnl commented 3 weeks ago

Yeah, renaming is fine. I wouldn't worry too much about the URLs "breaking". They were mostly for "internal" use anyway.

Done :white_check_mark:

I've gone through the wiki now with a fine tooth comb and made various other fixes. You can see my commits if you check out the wiki repo.

If nothing else, we could add a index/table-of-contents on the wiki homepage.

That's automatically there already (on the right hand side of the page).