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

PHP 8.1/8.2 and PHPUnit 8.0 compatibility fixes #88

Merged
merged 6 commits into from
Aug 9, 2022
Merged

Conversation

derickr
Copy link
Member

@derickr derickr commented Aug 6, 2021

No description provided.

@sapphirecat
Copy link

I couldn't see the CI logs, but running the test in my own environment (linux x86-64, Ubuntu 20.04, Ondřej Surý's PPA), PHP 8.1.2 mbstring seems to be removing all bytes >=128 from the outputs.

1) ezcMailParserTest::testMbstringCharsetConverter1
Failed asserting that 459 matches expected 468.

/home/ubuntu/Mail/tests/parser/parser_test.php:1447

2) ezcMailParserTest::testMbstringCharsetConverter2
Failed asserting that 98 matches expected 99.

/home/ubuntu/Mail/tests/parser/parser_test.php:1466

The first test data has 3x EF BF BD (U+FFFD replacement character, UTF-8 encoded) sequences with no charset defined, and the second has an =F6 quoted-printable byte with us-ascii charset selected. The difference between actual and expected numbers suggest these octets are being deleted.

I wanted to propose a solution, but I'm not sure what to do. I haven't found any evidence that this was an intentional change of behavior in PHP 8.1, nor how to select previous behavior.

@derickr
Copy link
Member Author

derickr commented Jul 20, 2022

@sapphirecat Sorry that I'm only just getting to this, I hadn't realised there was a new comment here.

@seamuslee001
Copy link
Contributor

@derickr @sapphirecat I am wondering if it is this https://kinsta.com/blog/php-8-1/#explicit-octal-numeral-notation that seems to be only thing I have found relating to Octets

@sapphirecat
Copy link

I just want to say, I won't be of much help with this going forward. We switched over to nette/mail a few months back.

@derickr derickr changed the title PHP 8.1 and PHPUnit 8.0 compatibility fixes PHP 8.1/8.2 and PHPUnit 8.0 compatibility fixes Aug 9, 2022
@derickr derickr merged commit f91fc02 into master Aug 9, 2022
@derickr derickr deleted the php-8.1-fixes branch August 9, 2022 09:43
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.

None yet

3 participants