overtrue / phplint

:bug: A tool that can speed up linting of php files by running several lint processes at once.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

About current unstable versions and future

llaville opened this issue · comments

I am aware that I have been too quickly released the new versions v6.0.x, v5.4.x, v4.4.x and v3.3.x
which reveal some regressions.
As it is not my habit to provide such results, I wished :

  • Return to the stable situation we had with v5.3, v4.3 and v3.2 by reverting the source code, and publish new releases quickly
  • Open a new main branch that will support the new, more stable and compliant development for future version 7.0
  • When code will be really stable, publish a major version 9.0 that will support PHP 8.0, 8.1 and 8.2, and remove other branches (except 7.4) to avoid dupplicated code (hard to maintain)
  • Add unit tests to avoid regressions again

Hope @overtrue you're agree with my roadmap !

What does it means :

  • for @vlakarados on issue #163 : Please do not use the cache option in YAML config file to disable cache subsystem, but rather the --no-cache option
  • Short option nf did not work, and will not be restored (see issue #167)

@llaville it looks excellent, and I think we can drop the old PHP version support(7.4).

and I think we can drop the old PHP version support(7.4).

I'm 👍 with you, but I'm not sure if all community has still migrated to PHP 8.

As I said with a unique branch and source code, it will be more easy to maintain and change it quickly

Ok

Cool

I'll begin shortly (next hours), to revert source code on current branches.

  • Revert to v6.0.0 with upcoming new 6.1.0
  • Revert to v5.3.0 with upcoming new 5.5.0
  • Revert to v4.3.0 with upcoming new 4.5.0
  • Revert to v3.2.0 with upcoming new 3.4.0

Revert changes on 7.4 branch is over (commits f544718, 74a47d7, d38276e, 1cf71bf) and ready for a new release 3.4.0

Release draft content is :

3.4.0

**CAUTION** This version is equivalent to v3.2.0 with following changes.

- Github Actions : Workflows changes from 3.3.0 until 3.3.2 were kept.
- Drop support to PHP 5 [#155](https://github.com/overtrue/phplint/issues/155), PHP 7.0, 7.1, 7.2, and 7.3
- Highlight PHP code in terminal package migration by @llaville : [#157](https://github.com/overtrue/phplint/issues/157)
- Short option `nf` did not work by @llaville : [#167](https://github.com/overtrue/phplint/issues/167)
- PHP-CS-Fixer migration to v3 by @llaville : [#156](https://github.com/overtrue/phplint/issues/156)
- Cosmetic fix with `php-parallel-lint/php-console-highlighter` dependency by @llaville : [#172](https://github.com/overtrue/phplint/issues/172)
- Add instructions for Gitlab CI usage by @matheusab : [#161](https://github.com/overtrue/phplint/pull/161)

PS: @overtrue if you have time to check/validate it before we push the new release 3.4.0

Revert changes on 8.0 branch is over and ready for a new release 4.5.0

Release draft content is :

4.5.0

**CAUTION** This version is equivalent to v4.3.0 with following changes.

- Github Actions : Workflows changes from 4.4.0 until 4.4.1 were kept.
- Highlight PHP code in terminal package migration by @llaville : [#157](https://github.com/overtrue/phplint/issues/157)
- Short option `nf` did not work by @llaville : [#167](https://github.com/overtrue/phplint/issues/167)
- Add instructions for Gitlab CI usage by @matheusab : [#160](https://github.com/overtrue/phplint/pull/160)
- Cosmetic fix with `php-parallel-lint/php-console-highlighter` dependency by @llaville : [#172](https://github.com/overtrue/phplint/issues/172)
- Raise symfony component constraints to latest LTS (5.4) by @llaville

PS: @overtrue if you have time to check/validate it before we push the new release 4.5.0

It's OK

Revert changes on 8.1 branch is over and ready for a new release 5.5.0

Release draft content is :

5.5.0

**CAUTION** This version is equivalent to v5.3.0 with following changes.

- Github Actions : Workflows changes from 5.3.0 until 5.4.2 were kept.
- Highlight PHP code in terminal package migration by @llaville : [#157](https://github.com/overtrue/phplint/issues/157)
- Short option `nf` did not work by @llaville : [#167](https://github.com/overtrue/phplint/issues/167)
- Add instructions for Gitlab CI usage by @matheusab : [#158](https://github.com/overtrue/phplint/pull/158)
- Cosmetic fix with `php-parallel-lint/php-console-highlighter` dependency by @llaville : [#172](https://github.com/overtrue/phplint/issues/172)
- Raise symfony component constraints to latest LTS (5.4) by @llaville

PS: @overtrue if you have time to check/validate it before we push the new release 5.5.0

Revert changes on 8.2 branch is over and ready for a new release 6.1.0

Release draft content is :

6.1.0

**CAUTION** This version is equivalent to v6.0.0 with following changes.

- Github Actions : Workflows changes from 6.0.0 until 6.0.4 were kept.
- Highlight PHP code in terminal package migration by @llaville : [#157](https://github.com/overtrue/phplint/issues/157)
- Short option `nf` did not work by @llaville : [#167](https://github.com/overtrue/phplint/issues/167)
- Add instructions for Gitlab CI usage by @matheusab : [#162](https://github.com/overtrue/phplint/pull/162)
- Cosmetic fix with `php-parallel-lint/php-console-highlighter` dependency by @llaville : [#172](https://github.com/overtrue/phplint/issues/172)
- Raise symfony component constraints to latest LTS (5.4) by @llaville

PS: @overtrue if you have time to check/validate it before we push the new release 6.1.0

@llaville it looks excellent, and I think we can drop the old PHP version support(7.4).

Finally, I'm agree with you @overtrue : upcoming version 7.0 will drop support to PHP 7
At least, if there are still users that don't have migrate yet to PHP 8, they will have ability to use PHPLint with version 3.

I've just finished to write the new base code, and will be available to push it to the new main branch in few hours this day.
It'll let you time to explore and review it before we create a new official release 7.0

As promised, tests (unit and e2e) are included. That will avoid regressions for future version !

I also want to create a dedicated documentation.
I'm confident to be able to produce a Material for MkDocs support quickly if you are agree ?

I think it's good @llaville

Sorry no code to push today.
I want to make it almost perfect, and I found a possible regression. Need to investigate more (but I've no more free time today). Delay to tomorrow.

Good new ! I've found regression detected yesterday. I'm now ready to push code to repository (main branch).

I'm prepraring a comparaison between versions (v4 or v5 or v6) and v7 (features changes or new, and minor issues fixed)

Finally upcoming major release will be 9.0 rather than 7.0 to follow composer branch aliases rules (https://packagist.org/packages/overtrue/phplint#dev-main)

All code are now pushed to the repository on main branch (https://github.com/overtrue/phplint/tree/main)
I've splitted code on many commits to easy follows what I've changed.

By introducing Changie, we are able to produce release body report easily :
Here is what we may obtains currently with following command : docker run --rm --user $(id -u):$(id -g) --mount type=bind,source=$PWD,target=/src -w /src ghcr.io/miniscruff/changie:v1.10.2 batch major -d -k

### Added

- introduces [Changie](https://github.com/miniscruff/changie) for changelog automation
- add declare strict_types directive on top of each php script
- introduces test automation with PHPUnit
- introduces Finder component to find source files to analyse
- introduces Logger component (basic PSR-3) for cache debugging purpose
- introduces Dispatcher component with events to allow extensible code more easy
- introduces extensions to display checking progress
- introduces ConfigResolver component to resolve configuration with options

### Changed

- raise minimum version constraint on Symfony Components to use the current LTS (5.4)
- update `jetbrains/phpstorm-stubs` requirement to accept v2022
- update `brainmaestro/composer-git-hooks` requirement to accept v3.0 alpha1 : that will allow to update psr/log to v3 and symfony/console to v6
- code-rewrites to use Symfony Cache Component
- Lint process class was renamed and some minor type declaration were fixed
- Remove [n98/junit-xml](https://packagist.org/packages/n98/junit-xml) dependency and replace it by new JunitXmlReporter extension (about 30 lines of code)
- JsonReporter extension is specialized to produce JSON output results (see `--json` option)
- ConsoleReporter extension is specialized to produce CLI output

### Removed

- remove platform emulation by Composer [config/platform directive](https://getcomposer.org/doc/06-config.md#platform)

What's Features Changed

  • Ability to display JSON and JUnitXml output format to the standard output (by default) when specify only --json or --xml options. It was not possible with previous versions.
  • Add declare(strict_types=1); on all PHP source files. Allows to fix some type declaration issues.
  • Display checking progress has format changed (--progress=printer by default without needed to invoke it)
  • Display a classic Symfony Progress bar is also possible (choose --progress=bar)
  • Other cosmetic changes (Thanks to Symfony Style output decorator helpers)
  • Introduces of course a tests folder for PHPUnit to avoid future regression.

@overtrue I know nothing is perfect, but I've work hard to have a major version more easy to maintain and be extensible.
Especially with Extension feature, and Event driven capability (thanks to Symfony EventDispatcher)

Documentation is still missing, but this new base code allow to anyone that want to try it, a chance to compare versions !

All feeback are welcome.

Forgot to said :

that the Cache component used now the Symfony Cache component with :

  • NullAdapter when you specify --no-cache option
  • FilesystemAdapter that writes results into .phplint.cache directory rather than single file .phplint-cache

Still need to fix the Docker version with latest tag (not yet functional)

Docker version is now fixed and we can get it with following command docker pull overtrue/phplint:latest.

Issue was related to dependency not explicitly defined, and fixed by commit d0cc4d5

With recent big commit 4761f23, PHPLint 9.0 reach a new more stable milestone.

  • All Unit tests PASSED
  • Documentation was updated with Architecture Guide for developers (with UML diagrams)

@overtrue I'm ready for a new release (perharps a pre-release 9.0.0-rc.1, before a stable). I'll let you review all code, doc, tests.
Your feedback are welcome

@overtrue 7 more commits since big commit, just to clean-up code.

@llaville Thank you for the heartfelt refactoring, I've looked at the code and it's really great 👍🏻 Thanks!

@overtrue I know the new version is a big refactoring : code, docs, tests
So keep me aware, when you think you 'll have finished your review, and tell me your strategy about pushing new release. Thanks

Hi, @llaville, I've looked at all the code for the main branch, I can't go through it line by line for time reasons, but I think it's pretty good, my only suggestion is the name suggestions I gave you yesterday (4761f23#r100238743). Everything else is pretty good.

Also regarding versions, I think we can consider deprecating PHP with 7.X support when we release 9.x. Or do we follow the official rhythm of PHP? When PHP officially stops maintaining a certain version, we also drop the corresponding maintenance.

As release 9.x support PHP 8.0 or greater and because PHP 7 was official unsupported anymore, I agree with you and we should drop PHP 7.4 branch.
But as I'm pretty sure not everybody has migrated to PHP 8, we could keep amount of time, time to get feedback for new major version 9.0

I'll apply your recommandation about option constants names in few minutes, and I'll be ready to publish 9.0

Name suggestions about options was applied with commit 5d60a7e

Closing this report as PHPLint 9.0.0 has just been released !
Even if PHAR distribution is not yet available : see issue #175