Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
namespace ApiPlatform\Core\Tests\Fixtures\TestBundle\DataTransformer;

use ApiPlatform\Core\DataTransformer\DataTransformerInterface;
use ApiPlatform\Core\Tests\Fixtures\TestBundle\Document\RPC as RPCDocument;
use ApiPlatform\Core\Tests\Fixtures\TestBundle\Dto\RPCOutput;
use ApiPlatform\Core\Tests\Fixtures\TestBundle\Entity\RPC;

Expand All @@ -32,6 +33,6 @@ public function transform($object, string $to, array $context = [])
*/
public function supportsTransformation($object, string $to, array $context = []): bool
{
return $object instanceof RPC && RPCOutput::class === $to;
return ($object instanceof RPC || $object instanceof RPCDocument) && RPCOutput::class === $to;
}
}