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

About current unstable versions and future #171

Closed
3 of 4 tasks
llaville opened this issue Dec 28, 2022 · 24 comments
Closed
3 of 4 tasks

About current unstable versions and future #171

llaville opened this issue Dec 28, 2022 · 24 comments
Assignees

Comments

@llaville
Copy link
Collaborator

llaville commented Dec 28, 2022

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 :

@llaville llaville pinned this issue Dec 28, 2022
@overtrue
Copy link
Owner

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

@llaville
Copy link
Collaborator Author

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
Copy link
Owner

Ok

@llaville
Copy link
Collaborator Author

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

@llaville
Copy link
Collaborator Author

llaville commented Dec 28, 2022

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

@llaville
Copy link
Collaborator Author

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
Copy link
Owner

It's OK

@llaville
Copy link
Collaborator Author

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
Copy link
Collaborator Author

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 llaville self-assigned this Dec 28, 2022
@llaville
Copy link
Collaborator Author

@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
Copy link
Owner

I think it's good @llaville

@llaville
Copy link
Collaborator Author

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
Copy link
Collaborator Author

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
Copy link
Collaborator Author

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.

@llaville
Copy link
Collaborator Author

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)

@llaville
Copy link
Collaborator Author

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

@llaville
Copy link
Collaborator Author

llaville commented Feb 8, 2023

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

@llaville
Copy link
Collaborator Author

llaville commented Feb 8, 2023

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

@overtrue
Copy link
Owner

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

@llaville
Copy link
Collaborator Author

@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
Copy link
Owner

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.

@llaville
Copy link
Collaborator Author

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
Copy link
Collaborator Author

Name suggestions about options was applied with commit 5d60a7e

@llaville
Copy link
Collaborator Author

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

@llaville llaville unpinned this issue Feb 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants