Skip to content

Commit

Permalink
Update src/Compiler/Exception/CannotCompileMapperException.php
Browse files Browse the repository at this point in the history
Co-authored-by: Jan Tvrdík <[email protected]>
  • Loading branch information
olsavmic and JanTvrdik committed Sep 9, 2024
1 parent b255adf commit 63426b6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Compiler/Exception/CannotCompileMapperException.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public static function withIncompatibleSubtypeMapper(
$subtypeMapperCompilerClass = $subtypeMapperCompiler::class;
$subtypeMapperOutputType = $subtypeMapperCompiler->getOutputType();

$reason = "its output type '{$subtypeMapperOutputType}' is not super type of '{$mapperOutputType}'";
$reason = "its output type '{$subtypeMapperOutputType}' is not subtype of '{$mapperOutputType}'";
return new self("Cannot compile mapper {$subtypeMapperCompilerClass} as subtype (#[Discriminator]) mapper, because {$reason}", 0, $previous);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ public function testCompileWithSubtypesFromDifferentHierarchies(): void

self::assertException(
CannotCompileMapperException::class,
'Cannot compile mapper ShipMonk\InputMapper\Compiler\Mapper\Object\DelegateMapperCompiler as subtype (#[Discriminator]) mapper, because its output type \'ShipMonkTests\InputMapper\Compiler\Mapper\Object\Data\MovieInput\' is not super type of \'ShipMonkTests\InputMapper\Compiler\Mapper\Object\Data\HierarchicalParentInput\'',
'Cannot compile mapper ShipMonk\InputMapper\Compiler\Mapper\Object\DelegateMapperCompiler as subtype (#[Discriminator]) mapper, because its output type \'ShipMonkTests\InputMapper\Compiler\Mapper\Object\Data\MovieInput\' is not subtype of \'ShipMonkTests\InputMapper\Compiler\Mapper\Object\Data\HierarchicalParentInput\'',
fn(): Mapper => $this->compileMapper('InvalidHierarchyMapper', $mapperCompiler),
);
}
Expand Down

0 comments on commit 63426b6

Please sign in to comment.