Skip to content

Commit 63426b6

Browse files
olsavmicJanTvrdik
andcommitted
Update src/Compiler/Exception/CannotCompileMapperException.php
Co-authored-by: Jan Tvrdík <[email protected]>
1 parent b255adf commit 63426b6

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/Compiler/Exception/CannotCompileMapperException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public static function withIncompatibleSubtypeMapper(
3939
$subtypeMapperCompilerClass = $subtypeMapperCompiler::class;
4040
$subtypeMapperOutputType = $subtypeMapperCompiler->getOutputType();
4141

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

tests/Compiler/Mapper/Object/MapDiscriminatedObjectTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ public function testCompileWithSubtypesFromDifferentHierarchies(): void
187187

188188
self::assertException(
189189
CannotCompileMapperException::class,
190-
'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\'',
190+
'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\'',
191191
fn(): Mapper => $this->compileMapper('InvalidHierarchyMapper', $mapperCompiler),
192192
);
193193
}

0 commit comments

Comments
 (0)