Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
vjik committed Jun 17, 2024
1 parent 52dd2eb commit 1656935
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/AttributeTypecastHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
use Cycle\ORM\Parser\CastableInterface;
use Cycle\ORM\Parser\UncastableInterface;
use Cycle\ORM\SchemaInterface;
use ReflectionAttribute;
use ReflectionClass;

final class AttributeTypecastHandler implements CastableInterface, UncastableInterface
Expand All @@ -23,7 +24,7 @@ public function __construct(SchemaInterface $schema, string $role)
$entityClass = $schema->define($role, SchemaInterface::ENTITY);
$reflection = new ReflectionClass($entityClass);
foreach ($reflection->getProperties() as $property) {
$attributes = $property->getAttributes(TypeInterface::class);
$attributes = $property->getAttributes(TypeInterface::class, ReflectionAttribute::IS_INSTANCEOF);
if (empty($attributes)) {
continue;
}
Expand Down

0 comments on commit 1656935

Please sign in to comment.