Skip to content

Commit

Permalink
remove doctrine/orm version check
Browse files Browse the repository at this point in the history
  • Loading branch information
AlboCode committed Aug 23, 2024
1 parent 3d54a2a commit 0787dca
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions src/SoftDeleteable/Mapping/Validator.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@

namespace Gedmo\SoftDeleteable\Mapping;

use Composer\InstalledVersions;
use Composer\Semver\VersionParser;
use Doctrine\ORM\Mapping\FieldMapping;
use Doctrine\Persistence\Mapping\ClassMetadata;
use Gedmo\Exception\InvalidMappingException;
Expand Down Expand Up @@ -55,10 +53,7 @@ public static function validateField(ClassMetadata $meta, $field): void

$fieldMapping = $meta->getFieldMapping($field);

if((InstalledVersions::satisfies(new VersionParser, 'doctrine/orm', '^3.0') ||
InstalledVersions::satisfies(new VersionParser, 'doctrine/orm', '^4.0')) &&
$fieldMapping instanceof FieldMapping
) {
if($fieldMapping instanceof FieldMapping) {
$type = $fieldMapping->type;
} else {
$type = $fieldMapping['type'];
Expand Down

0 comments on commit 0787dca

Please sign in to comment.