Skip to content

Commit b4d1ec1

Browse files
committed
Merge branch '5.4' into 6.0
* 5.4: (33 commits) do not pass a boolean to the constructor of the Dotenv class [Notifier] Fix low-deps tests Deprecate Composer 1 [Filesystem] Add third argument `$lockFile` to `Filesystem::appendToFile()` [TwigBundle] fix auto-enabling assets/expression/routing/yaml/workflow extensions [PhpUnitBridge] fix symlink to bridge in docker by making its path relative [Dotenv] Duplicate $_SERVER values in $_ENV if they don't exist Fix markup [Notifier] Add Expo bridge Add polish translations (#43725) Rename translation:update to translation:extract [String] Add PLURAL_MAP "zombies" -- fix #43789 Added support for `statusCode` default parameter when loading a template directly from route using the `Symfony\Bundle\FrameworkBundle\Controller\TemplateController` controller. [Validator] Update validators.bs.xlf Cache voters that will always abstain [Messenger] Fix `TraceableMessageBus` implementation so it can compute caller even when used within a callback [Validator] Add the missing translations for Russian (ru) [Validator] Added missing translations for Latvian (lv) [Validator] Added missing translations [Validator] Add missing translations for Vietnamese (VI) ...
2 parents a3e1077 + 9b54d75 commit b4d1ec1

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

ContainerBuilder.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1412,11 +1412,18 @@ public function log(CompilerPassInterface $pass, string $message)
14121412
*/
14131413
final public static function willBeAvailable(string $package, string $class, array $parentPackages): bool
14141414
{
1415+
$skipDeprecation = 3 < \func_num_args() && func_get_arg(3);
1416+
$hasRuntimeApi = class_exists(InstalledVersions::class);
1417+
1418+
if (!$hasRuntimeApi && !$skipDeprecation) {
1419+
trigger_deprecation('symfony/dependency-injection', '5.4', 'Calling "%s" when dependencies have been installed with Composer 1 is deprecated. Consider upgrading to Composer 2.', __METHOD__);
1420+
}
1421+
14151422
if (!class_exists($class) && !interface_exists($class, false) && !trait_exists($class, false)) {
14161423
return false;
14171424
}
14181425

1419-
if (!class_exists(InstalledVersions::class) || !InstalledVersions::isInstalled($package) || InstalledVersions::isInstalled($package, false)) {
1426+
if (!$hasRuntimeApi || !InstalledVersions::isInstalled($package) || InstalledVersions::isInstalled($package, false)) {
14201427
return true;
14211428
}
14221429

0 commit comments

Comments
 (0)