8000 Add missing autoload calls · symfony/symfony@0fa652f · GitHub
[go: up one dir, main page]

Skip to content

Commit 0fa652f

Browse files
greg0ireBenjamin
authored and
Benjamin
committed
Add missing autoload calls
Until either php 7.4 or doctrine/persistence 2 is required, these will be needed to make sure php recognises signatures using the old names as compatible with signatures using the new names. This is necessary for types defined outside Symfony that extend types from Symfony and still use the old names in signatures of methods they override. More details at https://dev.to/greg0ire/how-to-deprecate-a-type-in-php-48cf Fixes doctrine/DoctrineMongoDBBundle#616 Fix retour pr
1 parent a60e92a commit 0fa652f

File tree

5 files changed

+9
-5
lines changed

5 files changed

+9
-5
lines changed

src/Symfony/Bridge/Doctrine/Form/Type/DoctrineType.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -282,3 +282,5 @@ public function reset()
282282
$this->choiceLoaders = [];
283283
}
284284
}
285+
286+
interface_exists(ObjectManager::class);

src/Symfony/Bridge/Doctrine/Form/Type/EntityType.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,3 +97,5 @@ private function parameterToArray(Parameter $parameter): array
9797
return [$parameter->getName(), $parameter->getType(), $parameter->getValue()];
9898
}
9999
}
100+
101+
interface_exists(ObjectManager::class);

src/Symfony/Bridge/Doctrine/Security/User/EntityUserProvider.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,3 +153,6 @@ private function getClassMetadata(): ClassMetadata
153153
return $this->getObjectManager()->getClassMetadata($this->classOrAlias);
154154
}
155155
}
156+
157+
interface_exists(ObjectManager::class);
158+
interface_exists(ObjectRepository::class);

src/Symfony/Bridge/PhpUnit/TextUI/Command.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
if (version_compare(\PHPUnit\Runner\Version::id(), '6.0.0', '<')) {
1515
class_alias('Symfony\Bridge\PhpUnit\Legacy\CommandForV5', 'Symfony\Bridge\PhpUnit\TextUI\Command');
16-
} elseif (version_compare(\PHPUnit\Runner\Version::id(), '6.0.0', '>=') && version_compare(\PHPUnit\Runner\Version::id(), '9.0.0', '<')) {
16+
} elseif (version_compare(\PHPUnit\Runner\Version::id(), '9.0.0', '<')) {
1717
class_alias('Symfony\Bridge\PhpUnit\Legacy\CommandForV6', 'Symfony\Bridge\PhpUnit\TextUI\Command');
1818
} else {
1919
class_alias('Symfony\Bridge\PhpUnit\Legacy\CommandForV9', 'Symfony\Bridge\PhpUnit\TextUI\Command');

src/Symfony/Bridge/PhpUnit/bin/simple-phpunit.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -93,10 +93,7 @@
9393
}
9494
};
9595

96-
if (PHP_VERSION_ID >= 70300) {
97-
// PHPUnit 9 requires PHP 7.3+
98-
$PHPUNIT_VERSION = $getEnvVar('SYMFONY_PHPUNIT_VERSION', '9.0');
99-
} elseif (PHP_VERSION_ID >= 70200) {
96+
if (PHP_VERSION_ID >= 70200) {
10097
// PHPUnit 8 requires PHP 7.2+
10198
$PHPUNIT_VERSION = $getEnvVar('SYMFONY_PHPUNIT_VERSION', '8.3');
10299
} elseif (PHP_VERSION_ID >= 70100) {

0 commit comments

Comments
 (0)
0