PHPCompatibility / PHPCompatibility

PHP Compatibility check for PHP_CodeSniffer

Home Page:http://techblog.wimgodden.be/tag/codesniffer/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Please do a new Release

Flyingmana opened this issue · comments

Currently the latest release is from 2019. A lot of people who install via composer will decide to use a release instead of the latest branch state, which then leads them to run into errors, which are already fixed a long time ago.

Like it happened for me as I did run into this issue:
#961 (comment)

We're getting closer to the release of PHPCompatibility 10, but the project is basically relying on a single developer at this point ( @jrfnl ), who is doing a fantastic job of doing a massive overhaul of PHPCompatibility and all the libraries that it depends on.
If you want to use the latest version, you can use the develop branch, which should be stable enough for most people, but it's not feature complete for 8.1 and 8.2 yet.

@Flyingmana In addition to what @wimg said, the reason we have not yet released is not that we're not feature complete yet for PHP 8.1/8.2. I mean, new sniffs can be added at any time.

The problem we have been dealing with and which we haven't completely solved yet, is that existing sniffs are no longer reliable due to the sheer amount of new syntaxes added in PHP 7.4/8.0/8.1/8.2 and ALL sniffs needing updates for those syntaxes, as without those updates the sniffs would throw lots of false positives/false negatives.

Doing a release at this time, while we haven't finished the updates for the existing sniffs, would be irresponsible.

the current release is already not working reliable for php 8.0 which is the oldest currently supported version.
And you say the current state is even less stable for them?

No, the current state in develop is much more stable, but still incomplete.

With a release from 2019, it is obvious that recent PHP versions will not be supported, however, if we release now, we'd give the impression that the new release would support all recent PHP syntaxes, which is just not true (yet).

however, if we release now, we'd give the impression that the new release would support all recent PHP syntaxes, which is just not true (yet).

Thats not sure, there are enough projects who got away with not supporting any new php versions during releases. And thats something one can write into a release note.

Anyway.
So how can I help/support @jrfnl , to get the Milestone reached faster?
I can support with:

  • code contributions
  • testing
  • reviewing
  • writing Tests
  • sorting and filtering Tickets and PRs

I could even offer to start a separate branch from the last release, and backport only 8.0 issues (and the Tests covering them) , so we can do a bugfix release there. But I guess this will actually cause more work for the Maintainer.

@Flyingmana Help is always welcome and in short supply.

There's plenty of work to be done, but what you can do will largely depend on your skill level and your familiarity with how PHPCS and scanning code based on a token stream, works.

Have a look at the open issue list to see open tasks. Be aware that until the 10.0 release has been tagged, I will have little time to coach anyone, so please take on tasks which you feel confident about doing on your own.

The "make existing sniffs compatible" tasks don't have their own tickets at the moment (aside from #1239 and #1226), so it is hard to direct you on open tasks for that.

Some "low hanging fruit":

  • #1285
  • #1404 (note: the RemovedExtensions sniff will be removed, so the property name there won't need to be adjusted as it will be removed)
  • #1456

There are also plenty of tasks not yet claimed (without an owner attached to it) within these tickets:

Note: for the PHP version/RFC tickets, anything in the "To Do" list still needs to be reviewed whether it is something which is "sniffable" as well, as some things are just not feasible to detect using PHP_CodeSniffer.

Also take note of the links at the bottom of the "To Do" list which contain plenty of additional changes which need to be accounted for as not everything goes via RFCs.

I could even offer to start a separate branch from the last release, and backport only 8.0 issues (and the Tests covering them) , so we can do a bugfix release there. But I guess this will actually cause more work for the Maintainer.

There is no interest to continue support for the 9.x branch, so please don't spend your time on that.

I'm going to close this ticket now as we'll release when it's ready, but please have a look at the above as help is definitely appreciated.

P.S.: oh and before I forget re: "writing Tests" => all sniffs are covered by tests and code coverage is high, so, while more tests are always welcome, we should be pretty good on that front anyway.

@Flyingmana As a side-note: I noticed on your profile that you're involved with the Magento community.

I'm not sure if Magento currently contains/ships with polyfills for select PHP functionality, but interest was expressed previously by some people of the Magento community to have a PHPCompatibilityMagento ruleset which would take polyfills into account.

Unfortunately, we never received the community input to make that happen, though the repo has been set up and is open to receive PRs to add the ruleset.

See: #530 for more context.

If you are interested, it would be nice to get that repo in working order ;-)