Skip to content

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

❌ Patch coverage is 89.79592% with 20 lines in your changes missing coverage. Please review.
✅ Project coverage is 78.36%. Comparing base (264c25a) to head (f9228c0).

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/Translator/TranslationProxy.php 66.66% 1 Missing ⚠️
...rc/Tree/Entity/Repository/NestedTreeRepository.php 75.00% 1 Missing ⚠️
... and 2 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2935      +/-   ##
==========================================
- Coverage   78.55%   78.36%   -0.20%     
==========================================
  Files         169      168       -1     
  Lines        8823     8711     -112     
==========================================
- Hits         6931     6826     -105     
+ Misses       1892     1885       -7     

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

composer.json Outdated
"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