-
Notifications
You must be signed in to change notification settings - Fork 144
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
Default for nullable_type_declaration_for_default_null_value #235
Comments
Because support for implicit support for implicit nullability exists only for backwards compatibility reasons and will be removed in the future. See laravel#235.
Thanks, seems you already sent in a PR for it 👍 |
👋 Just chiming in as the nullable types RFC author: yes, implicit nullability was required for backward compatibility with PHP 5. Remember, this landed in PHP 7.1, so this was important at the time. It is not important now. I also suggest using the explicit version for any code which doesn't need PHP 5 compatibility. I wish I had put that recommendation in the RFC. |
As per @morrisonlevi's suggestion. I think a lot of people would prefer the explicity? |
P.S.: I have already filed the implementation for deprecating the implicitly nullable parameter types: php/php-src#12959 the RFC is underway. |
After updating pint I noticed, that it changed a lot of method signatures like:
I later posted on Twitter, because I thought that's maybe not an ideal default. And I just got responses from @kocsismate and @Girgias (https://twitter.com/kocsismate90/status/1730711133042958637), saying that support for implicit nullability exists only for backwards compatibility reasons and that it will be deprecated and removed from PHP sooner or later. So, I would suggest changing the default in pint, introduced with #192.
The text was updated successfully, but these errors were encountered: