Skip to content

Commit

Permalink
Fix "Using ArrayAccess is deprecated"
Browse files Browse the repository at this point in the history
  • Loading branch information
Seb33300 committed Aug 27, 2024
1 parent ade7387 commit b8dd86e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/Mapping/Driver/AbstractAnnotationDriver.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

use Doctrine\Common\Annotations\Reader;
use Doctrine\Deprecations\Deprecation;
use Doctrine\ORM\Mapping\FieldMapping;
use Doctrine\Persistence\Mapping\ClassMetadata;
use Doctrine\Persistence\Mapping\Driver\MappingDriver;

Expand Down Expand Up @@ -131,7 +132,9 @@ protected function isValidField($meta, $field)
{
$mapping = $meta->getFieldMapping($field);

return $mapping && in_array($mapping['type'], $this->validTypes, true);
$type = $mapping instanceof FieldMapping ? $mapping->type : $mapping['type'];

return $mapping && in_array($type, $this->validTypes, true);
}

/**
Expand Down

0 comments on commit b8dd86e

Please sign in to comment.