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 for PHP 7.2 to 8.2 #305

Merged
merged 4 commits into from
May 1, 2024
Merged

Conversation

sosherof
Copy link
Contributor

This branch has updates to add support for PHP 8.2. Rector and testing were used to ensure backward compatibility down to PHP 7.2. The main issues were:

  1. Missing class properties - dynamic property creation is no longer supported.
  2. Return type hinting is required for implemented methods. In most cases, returns types were simply added. However, three methods in the Response\Headers class returned type mixed. The "mixed" type isn't supported in 7.2 so those 3 methods got the "#[\ReturnTypeWillChange]" flag, which causes PHP 8 to suppress the warning.
  3. Implemented some of the other suggestions Rector made, mostly around array declaration and comparison statements.

@JPaulMora
Copy link

I have tried your fork and it's working properly

@nategood nategood merged commit 2f478b5 into nategood:master May 1, 2024
This was referenced May 1, 2024
@sosherof sosherof deleted the PHP7.2_to_8.2 branch June 11, 2024 16:32
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.

3 participants