Skip to content

JMSHandlerRegistry must implements HandlerRegistryInterface correctly #1955

Closed
@timotheemoulin

Description

@timotheemoulin

Hello all,

In the latest version of JMS\Serializer the class JMS\Serializer\Handler\HandlerRegistryInterface defines registerSubscribingHandler and registerHandler as void functions thus JMSHandlerRegistry implementation must follow the same definition and not return anything.

public function registerSubscribingHandler(SubscribingHandlerInterface $handler): void;
public function registerHandler(int $direction, string $typeName, string $format, $handler): void;

versus

 /**
 * {@inheritdoc}
 */
public function registerSubscribingHandler(SubscribingHandlerInterface $handler)
{
    return $this->registry->registerSubscribingHandler($handler);
}

/**
 * {@inheritdoc}
 */
public function registerHandler($direction, $typeName, $format, $handler)
{
    return $this->registry->registerHandler($direction, $typeName, $format, $handler);
}

Can anyone fix this?

Thanks for the help.
Timothée

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions