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

Support PHP 8, update to reactphp/socket v1.6 and adjust type checks for invalid chunk headers #391

Merged
merged 2 commits into from
Aug 31, 2020

Conversation

clue
Copy link
Member

@clue clue commented Aug 31, 2020

This changeset adds supports for PHP 8. 🎉

Update to reactphp/socket v1.6 (support PHP 8), specifically reactphp/socket#246. Additionally, dechex() throws a type error as of PHP 8 beta 2 (https://3v4l.org/RHg0i) that can be exhibited when trying to verify excessive chunk headers that exceed integer bounds. This is similar to #357 which adjusted this for PHP 7.4 recently.

This means this component now supports PHP 8 just fine 🎉

$ docker run -it --rm --net host -v `pwd`:/data --workdir /data php:8.0.0beta2-cli-alpine php vendor/bin/phpunit                                                                          
PHPUnit 9.3.8 by Sebastian Bergmann and contributors.                                                                                                                                                                         
                                                                                                                                                                                                                              
Warning:       Your XML configuration validates against a deprecated schema.                                                                                                                                                  
Suggestion:    Migrate your XML configuration using "--migrate-configuration"!                                                                                                                                                
                                                                                                                                                                                                                              
.............................................................W.  63 / 673 (  9%)                                                                                                                                              
.......WWWW.................................................... 126 / 673 ( 18%)                                                                                                                                              
.........SS...S...........W.W......WWWW.............W......W... 189 / 673 ( 28%)                                                                                                                                              
............................................................... 252 / 673 ( 37%)                                                                                                                                              
............................................................... 315 / 673 ( 46%)                                                                                                                                              
............................................................... 378 / 673 ( 56%)                                                                                                                                              
............................................................... 441 / 673 ( 65%)                                                                                                                                              
............................................................... 504 / 673 ( 74%)                                                                                                                                              
...................................................WWWWW..WW..W 567 / 673 ( 84%)                                                                                                                                              
............................................................... 630 / 673 ( 93%)                                                                                                                                              
...........................................                     673 / 673 (100%)                                                                                                                                              
                                                                                                                                                                                                                              
Time: 00:16.701, Memory: 20.00 MB                                                                                                                                                                                             
                                                                                                                                                                                                                              
There were 21 warnings:

…

WARNINGS!
Tests: 673, Assertions: 1591, Warnings: 21, Skipped: 3.

This currently reports a bunch of warnings due to some deprecations introduced in PHPUnit 9.3, but it works perfectly fine otherwise. In other words, you will currently see the same warning in the test output for PHP 7.4 and the test suite passes just fine on all supported PHP versions. I've discussed these deprecation warnings with @SimonFrings who will address this with a follow-up PR for #364.

@clue clue added this to the v1.1.0 milestone Aug 31, 2020
@clue clue requested review from WyriHaximus and jsor August 31, 2020 08:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants