You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I recently upgraded to Symfony 5.4 and now I am receiving a deprecration warning about JMSHandlerRegistryV2:
[2021-12-09T11:52:40.460108+01:00] php.INFO: User Deprecated: Method "JMS\Serializer\Handler\HandlerRegistryInterface::getHandler()" might add "callable|object" as a native return type declaration in the future. Do the same in implementation "FOS\RestBundle\Serializer\JMSHandlerRegistryV2" now to avoid errors or add an explicit @return annotation to suppress this message. {"exception":"[object] (ErrorException(code: 0): User Deprecated: Method \"JMS\\Serializer\\Handler\\HandlerRegistryInterface::getHandler()\" might add \"callable|object\" as a native return type declaration in the future. Do the same in implementation \"FOS\\RestBundle\\Serializer\\JMSHandlerRegistryV2\" now to avoid errors or add an explicit @return annotation to suppress this message. at /app/vendor/symfony/error-handler/DebugClassLoader.php:325)"} []
I can't seem to fix this deprecration in my project, so I think it can only be fixed in here instead.
If wanted, I can create a PR to fix this.
I fixed the deprecation in the vendor folder by adding @return to the getHandler method:
/**
* {@inheritdoc}
+ *+ * @return callable|object
*/
public function getHandler(int $direction, string $typeName, string $format)
Reproduction path:
Install Symfony 5.4
Install FOS RestBundle 3.1
Run bin/console
See deprecration warning
The text was updated successfully, but these errors were encountered:
Suppressing the deprecation messages here in this project is probably the wrong way as the "problem" is based on the external interface "HandlerRegistryInterface".
I recently upgraded to Symfony 5.4 and now I am receiving a deprecration warning about
JMSHandlerRegistryV2
:I can't seem to fix this deprecration in my project, so I think it can only be fixed in here instead.
If wanted, I can create a PR to fix this.
I fixed the deprecation in the vendor folder by adding
@return
to thegetHandler
method:Reproduction path:
bin/console
The text was updated successfully, but these errors were encountered: