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

Drop PHP 7.4 support #3713

Merged
merged 1 commit into from
Sep 6, 2023
Merged

Drop PHP 7.4 support #3713

merged 1 commit into from
Sep 6, 2023

Conversation

PowerKiKi
Copy link
Member

@PowerKiKi PowerKiKi commented Sep 6, 2023

This is:

  • a bugfix
  • a new feature
  • refactoring
  • additional unit tests

Checklist:

  • Changes are covered by unit tests
    • Changes are covered by existing unit tests
    • New unit tests have been added
  • Code style is respected
  • Commit message explains why the change is made (see https://github.com/erlang/otp/wiki/Writing-good-commit-messages)
  • CHANGELOG.md contains a short summary of the change and a link to the pull request if applicable
  • Documentation is updated as necessary

Why this change is needed?

This is according to our formal, published, policy to only support EOL PHP after 6 months.

See https://phpspreadsheet.readthedocs.io/en/latest/#php-version-support

Also share the exact same dev deps across all PHP version for GitHub Actions so runs are faster, much most importantly they are stable and predictable. And we decide manually when we want to migrate to PHPUnit 10.

Supersedes #3710

@PowerKiKi PowerKiKi force-pushed the powerkiki branch 2 times, most recently from 4b54ab3 to 972a1cd Compare September 6, 2023 14:17
@PowerKiKi
Copy link
Member Author

@oleibman, ever slightly out of topic, but I strongly suggest to not try supporting multiple PHPUnit versions in the same codebase. Because of PHP 7.4 we had no choice to use PHPUnit 8 and 9. But before this PR we supported PHPUnit 8, 9 and 10. This is a lot of work and juggling, as you saw yourself. And unfortunately it brings no value to us. It is much easier to keep our dev dependencies as stable and predictable as possible.

So now that PHP 7.4 is out the picture, all PHP versions can share the exact same version of PHPUnit 9 (not 10). I did that by replacing composer update by composer install in GitHub Actions (amongst a few other things). I strongly encourage you to keep this way of working, shared dev-deps, as long as possible. And whenever we feel confident all PHP versions can move to PHPUnit 10, then we can migrate once and for all.

This is according to our formal, published, policy to only support
EOL PHP after 6 months.

See https://phpspreadsheet.readthedocs.io/en/latest/#php-version-support

Also share the exact same dev deps across all PHP version for GitHub
Actions so runs are faster, much most importantly they are stable and
predictable. And we decide manually when we want to migrate to PHPUnit
10.

Fixes #3634
Closes #3710
@PowerKiKi PowerKiKi merged commit f131ca3 into master Sep 6, 2023
20 checks passed
@oleibman
Copy link
Collaborator

oleibman commented Sep 6, 2023

@PowerKiKi Noted, thanks. It was an intellectually satisfying task to get Phpunit10 working and continuously tested (practical because coverage test used locked version 9 while 8.1 test used latest version 10 so that both were exercised), but, obviously, no problem with reverting to the single version. (I've also gone through the same exercise with PhpWord, though not installed of course.) I'll keep my notes handy for when Php8.0 is dropped next year, allowing use of Phpunit10 throughout.

Your change was a lot bigger than I'd envisioned. Nice work finding all those opportunities to simplify code right away!

@PowerKiKi
Copy link
Member Author

I'd like to follow up with a few PR adding types, since we can leverage union types since PHP 8.0 and thus get rid of some PHPdocs. So all-in-all dropping PHP 7.4 is even bigger than that :P

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants