-
Notifications
You must be signed in to change notification settings - Fork 86
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
Different types in NoopSerializer #193
Comments
How were you able to get this error? PHP version, laravel version? |
PHP v 8.0.1 |
Sorry, forgot to mention, what is the |
I caught the error in 3.3.0 version, where was added type hint for functions |
I tried using this code snippet:
But it did not break. |
This is my code, and the error exists where $anyUser has some null fields |
same problem, reverted back to v3.2.0 |
+1 |
Would be nice to have a fix for this.. this code is obviously not working: public function null(): array
{
return null; # Cannot return null if type must be array
} I guess the type definition for this method should be |
Flugg\Responder\Serializers\NoopSerializer::null(): Return value must be of type array, null returned at /var/www/html/vendor/flugger/laravel-responder/src/Serializers/NoopSerializer.php:51)
In NoopSerializer returned type of null() function is array, but function always returns null
The text was updated successfully, but these errors were encountered: