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
PHP 8.2 support #12469
PHP 8.2 support #12469
Conversation
Any update about this? |
Not on the top of my list at the moment. Feel free to take over. |
7902f0f
to
9b68e0b
Compare
Test failures on PHP 8.2 reduced from |
This pull request has been mentioned on Mautic Forums. There might be relevant details there: |
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## 5.x #12469 +/- ##
============================================
- Coverage 59.30% 59.27% -0.04%
+ Complexity 33387 33386 -1
============================================
Files 2210 2210
Lines 99789 99782 -7
============================================
- Hits 59182 59147 -35
- Misses 40607 40635 +28
|
Could you update the DDEV configuration so folks will be testing it on 8.2 as well? |
10defe8
to
bdd5310
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me.
I did basic tests
Nice job 👍
Tested on ddev
A followup PR: #12469 |
I'm interesting in PHP 8.2 support because Debian GNU/Linux bookworm (the current stable) uses PHP 8.2. @mollux It seems that your review is a blocker of this PR. Could you take a look at this? |
This PR needs a rebase but I'm not going to do that until I someone will ensure that they will make the second test/review because I don't want to keep this PR up to date and wait for someone who will actually approve the PR for the second time. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me!
…octrineStep::$host_ro is deprecated
…ed; use htmlspecialchars, htmlentities, or mb_encode_numericentity/mb_decode_numericentity instead
…lTest::$leadDeviceRepository is deprecated
… and it was a pain to debug it
…eLookup::$region_code is deprecated"
…dId is deprecated
…thod signature which is a BC break and the class is deprecated so it will go away in M6 anyway
Thanks for the approval! Rebased. Will merge once the CI is green. |
Ok, there is some new issue. I'll have to look at that later. |
How about this like 33e4863 ? diff --git a/app/bundles/ReportBundle/Tests/Controller/ReportControllerFunctionalTest.php b/app/bundles/ReportBundle/Tests/Controller/ReportControllerFunctionalTest.php
index 171b071f8a..1f0b54fa2d 100644
--- a/app/bundles/ReportBundle/Tests/Controller/ReportControllerFunctionalTest.php
+++ b/app/bundles/ReportBundle/Tests/Controller/ReportControllerFunctionalTest.php
@@ -225,7 +225,7 @@ class ReportControllerFunctionalTest extends MauticMysqlTestCase
$dom = new \DOMDocument('1.0', 'utf-8');
- $dom->loadHTML(mb_convert_encoding($content, 'HTML-ENTITIES', 'UTF-8'), LIBXML_NOERROR);
+ $dom->loadHTML(mb_encode_numericentity($content, [0x80, 0x10FFFF, 0, 0xFFFFF], 'UTF-8'), LIBXML_NOERROR);
$tbody = $dom->getElementById('reportTable')->getElementsByTagName('tbody')[0];
$rows = $tbody->getElementsByTagName('tr');
|
@kou would you be able to push such fix as a PR against this branch on my fork? I'm swamped and cannot get to this any time soon. |
Use mb_encode_numericentity instead.
Sure! |
mb_convert_encoding(): Handling HTML entities via mbstring is deprecated
Description:
This PR contains the minimal changes to get Mautic working on PHP 8.2 and get the CI green.
The UTF8 conversions aren't necessary since Mautic 3 when we started using UTF8MB4 encoding. I think it's safe to get rid of it. The methods used for it were removed in PHP 8.2.
The
ext-iconv
should be required as we use it in the code without any checks if it is installed or not.Old description:
This PR is just to test if there is some BC break required to support PHP 8.2. Based on the PHPUNIT output there doesn't seem to be. Many deprecations and failed tests are due to Swiftmaier which is going to be removed in #11613. So we can do this any time after that is merged. Even after M5.0.0 release.Steps to test this PR: