We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
when I make FooNormalizer with make:serializer:normalizer, I got this output:
FooNormalizer
make:serializer:normalizer
<?php namespace App\Serializer\Normalizer; use Symfony\Component\Serializer\Normalizer\CacheableSupportsMethodInterface; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; use Symfony\Component\Serializer\Normalizer\ObjectNormalizer; class FooNormalizer implements NormalizerInterface, CacheableSupportsMethodInterface { // ... public function supportsNormalization($data, string $format = null, array $context = []): bool { return $data instanceof \App\Entity\ Deprecated: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in vendor/symfony/maker-bundle/src/Resources/skeleton/serializer/Normalizer.tpl.php on line 24 Foo; } }
PHP version: 8.1 Maker v1.45.0
8.1
v1.45.0
Replace null with '' ?
null
''
return $data instanceof \App\Entity\<?= str_replace('Normalizer', '', $class_name) ?>;
The text was updated successfully, but these errors were encountered:
Thanks for giving us a heads up @bechir
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
when I make
FooNormalizer
withmake:serializer:normalizer
, I got this output:PHP version:
8.1
Maker
v1.45.0
Solution
Replace
null
with''
?The text was updated successfully, but these errors were encountered: