Skip to content

Replace deprecated NamedArgumentConstructorAnnotation with @NamedArgumentConstructor + Address one PHP 8.1 deprecation #941

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

Merged
merged 2 commits into from
Dec 6, 2021

Conversation

ruudk
Copy link
Contributor

@ruudk ruudk commented Dec 6, 2021

Also fixed a problem that will pop-up in PHP 8.1 with the TypeInterface:

In PHP 8.1 optional parameters cannot be defined before required parameters.

Because string name = null is optional, we also have to make string $resolveType optional. This way it works on PHP 8.1 without breaking BC.

In 1.0, we should change the order.

ruudk added 2 commits December 6, 2021 20:33
Should be replaced with `@NamedArgumentConstructor`.
In PHP 8.1 optional parameters cannot be defined before required parameters.

Because `string name = null` is optional, we also have to make `string $resolveType`optional. This way it works on PHP 8.1 without breaking BC.

In 1.0, we should change the order.
@ruudk ruudk requested a review from mcg-web December 6, 2021 19:41
@ruudk
Copy link
Contributor Author

ruudk commented Dec 6, 2021

@mcg-web Please have a look.

If you merge this, please also update master so that I can immediately address the deprecation there.

@ruudk ruudk mentioned this pull request Dec 6, 2021
@mcg-web mcg-web merged commit b9bf7d6 into overblog:0.14 Dec 6, 2021
@mcg-web
Copy link
Contributor

mcg-web commented Dec 6, 2021

done @ruudk !

@ruudk ruudk deleted the deprecated-annotation branch December 7, 2021 06:17
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.

2 participants