Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[WIP] Bump the requirements to PHP 8.1 #2935

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

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mbabker
Copy link
Contributor

@mbabker mbabker commented Mar 19, 2025

According to the Packagist stats there was a large fall off PHP 7 users after the 3.14 release, which is when the requirement was bumped up to PHP 7.4. Since then, PHP 7.4 and 8.0 combined have had pretty small numbers on newer release branches and is generally now under 5% of the install base. So this PR bumps the requirement to PHP 8.1.

The overwhelming majority of the code changes are from adjusting the Rector and PHP-CS-Fixer configs to apply PHP 8.1 rulesets, with a second pass specifically on the tests to add type declarations there, then only minor corrections or tweaks by my own review along the way.

@mbabker mbabker force-pushed the php-81 branch 3 times, most recently from d7efb79 to 58661be Compare March 19, 2025 04:02
Copy link

codecov bot commented Mar 19, 2025

Codecov Report

Attention: Patch coverage is 89.34010% with 21 lines in your changes missing coverage. Please review.

Project coverage is 78.34%. Comparing base (8264aad) to head (fec37f2).
Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
src/DoctrineExtensions.php 0.00% 4 Missing ⚠️
src/Translatable/TranslatableListener.php 78.57% 3 Missing ⚠️
src/Mapping/Event/Adapter/ORM.php 0.00% 2 Missing ⚠️
src/References/Mapping/Event/Adapter/ORM.php 50.00% 2 Missing ⚠️
src/Uploadable/Event/UploadableBaseEventArgs.php 0.00% 2 Missing ⚠️
src/Loggable/LoggableListener.php 66.66% 1 Missing ⚠️
src/Sluggable/Mapping/Event/Adapter/ODM.php 66.66% 1 Missing ⚠️
src/Tool/ClassUtils.php 0.00% 1 Missing ⚠️
src/Tool/Wrapper/MongoDocumentWrapper.php 50.00% 1 Missing ⚠️
src/Translator/TranslationProxy.php 66.66% 1 Missing ⚠️
... and 3 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2935      +/-   ##
==========================================
- Coverage   78.51%   78.34%   -0.17%     
==========================================
  Files         168      167       -1     
  Lines        8782     8678     -104     
==========================================
- Hits         6895     6799      -96     
+ Misses       1887     1879       -8     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Comment on lines +44 to +45
"behat/transliterator": "^1.3",
"doctrine/collections": "^1.6.5 || ^2.0",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just for reference, all the changes to the minimum versions are either to get to a functional set of dependencies on PHP 8.1 (the transliterator package has errors on older versions, doctrine/common doesn't support some PHP 8.1 reflection changes until 3.1) or change to match the versions currently being installed on the prefer-lowest build. Considering how old some of these releases are it shouldn't be a big deal, I hope.

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

Successfully merging this pull request may close these issues.

1 participant