overtrue / phplint

:bug: A tool that can speed up linting of php files by running several lint processes at once.
MIT License
988 stars 88 forks source link

About current unstable versions and future #171

Closed llaville closed 1 year ago

llaville commented 1 year ago

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 :

Hope @overtrue you're agree with my roadmap !

What does it means :

overtrue commented 1 year ago

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

llaville commented 1 year ago

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

overtrue commented 1 year ago

Ok

llaville commented 1 year ago

Ok

Cool

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

llaville commented 1 year ago

Revert changes on 7.4 branch is over (commits f544718b674809bd47929eb19c51c6dc1f892c1f, 74a47d77f9452acfc54f91b8a8c692a082b6b2fe, d38276ec128237ab1efab9ed0f635c020c7321d4, 1cf71bf8abd5f41308fcf5f375e22bdd778df833) 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

llaville commented 1 year ago

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

overtrue commented 1 year ago

It's OK

llaville commented 1 year ago

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

llaville commented 1 year ago

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 commented 1 year ago

@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 ?

overtrue commented 1 year ago

I think it's good @llaville

llaville commented 1 year ago

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.

llaville commented 1 year ago

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)

llaville commented 1 year ago

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

@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.

llaville commented 1 year ago

Forgot to said :

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

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

llaville commented 1 year ago

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 https://github.com/overtrue/phplint/commit/d0cc4d541215d2431e8ba5d765ea73b8467768de

llaville commented 1 year ago

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

@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

llaville commented 1 year ago

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

overtrue commented 1 year ago

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

llaville commented 1 year ago

@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

overtrue commented 1 year ago

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 (https://github.com/overtrue/phplint/commit/4761f236425f922ed27c34913141d5c696f741a0#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.

llaville commented 1 year ago

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

llaville commented 1 year ago

Name suggestions about options was applied with commit 5d60a7e76f63aca14835a66d3f9d31d29263c885

llaville commented 1 year ago

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