Skip to content

Commit 7018918

Browse files
Fix FLEX_SERVERLESS feature flag
1 parent 7f45cf7 commit 7018918

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/Downloader.php

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,13 @@ public function __construct(Composer $composer, IoInterface $io, $rfs)
5656
$this->caFile = getenv('SYMFONY_CAFILE');
5757
}
5858

59-
if (!filter_var(getenv('FLEX_SERVERLESS'), \FILTER_VALIDATE_BOOLEAN)) {
60-
$this->legacyEndpoint = 'https://flex.symfony.com';
61-
} elseif (null === $endpoint = $composer->getPackage()->getExtra()['symfony']['endpoint'] ?? null) {
59+
if (null === $endpoint = $composer->getPackage()->getExtra()['symfony']['endpoint'] ?? null) {
6260
$this->endpoints = self::DEFAULT_ENDPOINTS;
61+
62+
if (!filter_var(getenv('FLEX_SERVERLESS'), \FILTER_VALIDATE_BOOLEAN)) {
63+
$this->endpoints = null;
64+
$this->legacyEndpoint = 'https://flex.symfony.com';
65+
}
6366
} elseif (\is_array($endpoint) || false !== strpos($endpoint, '.json')) {
6467
$this->endpoints = array_fill_keys((array) $endpoint, []);
6568
} else {

0 commit comments

Comments
 (0)