Skip to content

Commit f930e0b

Browse files
committed
Fix "Using ArrayAccess is deprecated"
1 parent ade7387 commit f930e0b

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/Mapping/Driver/AbstractAnnotationDriver.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111

1212
use Doctrine\Common\Annotations\Reader;
1313
use Doctrine\Deprecations\Deprecation;
14+
use Doctrine\ORM\Mapping\FieldMapping;
1415
use Doctrine\Persistence\Mapping\ClassMetadata;
1516
use Doctrine\Persistence\Mapping\Driver\MappingDriver;
1617

@@ -131,7 +132,9 @@ protected function isValidField($meta, $field)
131132
{
132133
$mapping = $meta->getFieldMapping($field);
133134

134-
return $mapping && in_array($mapping['type'], $this->validTypes, true);
135+
$type = $mapping instanceof FieldMapping ? $mapping->type : $mapping['type'];
136+
137+
return in_array($type, $this->validTypes, true);
135138
}
136139

137140
/**

0 commit comments

Comments
 (0)