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 Compatibility #192

Closed
srjlewis opened this issue Oct 26, 2021 · 8 comments
Closed

PHP 8.1 Compatibility #192

srjlewis opened this issue Oct 26, 2021 · 8 comments

Comments

@srjlewis
Copy link
Contributor

srjlewis commented Oct 26, 2021

Hi

I am looking to add php 8.1 compatibility, I am thinking of using 3.x-actions branch as it has most of the phpunit updates.

I am looking to add the required typing, there are mainly 2 php RFC's that are going to caused the main problems,but I suspect there will be a few more.

  1. https://wiki.php.net/rfc/deprecate_null_to_scalar_internal_arg
  2. https://wiki.php.net/rfc/internal_method_return_types

The first one is easy to fix.
The second has 2 approaches.

  1. add the #[ReturnTypeWillChange] attribute, and then sort the typing out by PHP 9, i.e. kick the problem down the road, but keep BC for now.
  2. add the required typing, but this will break compatibility with php version < 8.0, but will be ready for PHP 9 hopefully.

I would like to know how you would like this approaching as I am looking to do the changes?

Thanks
Steven

@kenjis
Copy link
Member

kenjis commented Oct 27, 2021

See auraphp/Aura.Cli_Kernel#12 (comment)

  • The Aura 3.x series was for PHP 5.6 and later.
  • The Aura 4.x series is for PHP 7.2 and later.
  • I imagine a 5.x series, if you want to start one, should be for 8.0 (or perhaps 8.1?) and later.

@kenjis
Copy link
Member

kenjis commented Oct 27, 2021

Personally, I think it would be good to set the Aura 5.x requirement to PHP 8.1 or later.

@srjlewis
Copy link
Contributor Author

Yes I agree, 5.x should start a 8.1, as current 3.* does work fine for PHP 8.0, as PHP 8.1 is now starting to enforce typing from the core of PHP the 5.x series can now be fully typed.

If you are happy with that, I will branch from 3.x-actions as it has updates to phpUnit.

As a side note I will be having a look at aura.sqlquery and aura.sqlschema, but for the meantime they seem to be working fine with PHP 8.1 so far but not heavily tested

@kenjis
Copy link
Member

kenjis commented Oct 28, 2021

@pmjones @harikt @koriym
Are you okay Aura 5.x requires PHP 8.1 or later?

@pmjones
Copy link
Member

pmjones commented Oct 28, 2021

@kenjis fine by me!

@srjlewis
Copy link
Contributor Author

Ok I have done all the changes, everything is typed, tests have been fixed, github actions has been updated.

All test are passing local and on github actions.

I will wait for you to branch it, then make a PR to the new branch.

@kenjis
Copy link
Member

kenjis commented Oct 28, 2021

I created 5.x branch from 3.x-actions.
https://github.com/auraphp/Aura.Sql/tree/5.x

It seems #191 is missing in 5.x.

@srjlewis
Copy link
Contributor Author

I have created pull request #193 to 5.x branch

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

No branches or pull requests

3 participants