Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit bffd7b8

Browse filesBrowse files
Merge branch '7.1' into 7.2
* 7.1: [HttpClient] Close gracefull when the server closes the connection abruptly ensure that tests are run with lowest supported Serializer versions read runtime config from composer.json in debug dotenv command
2 parents 00a6a2d + 5a5fa68 commit bffd7b8
Copy full SHA for bffd7b8

File tree

Expand file treeCollapse file tree

2 files changed

+14
-2
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+14
-2
lines changed

‎src/Symfony/Component/Dotenv/Command/DebugCommand.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Dotenv/Command/DebugCommand.php
+13-1Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,19 @@ protected function execute(InputInterface $input, OutputInterface $output): int
7777
return 1;
7878
}
7979

80-
$filePath = $_SERVER['SYMFONY_DOTENV_PATH'] ?? $this->projectDirectory.\DIRECTORY_SEPARATOR.'.env';
80+
if (!$filePath = $_SERVER['SYMFONY_DOTENV_PATH'] ?? null) {
81+
$dotenvPath = $this->projectDirectory;
82+
83+
if (is_file($composerFile = $this->projectDirectory.'/composer.json')) {
84+
$runtimeConfig = (json_decode(file_get_contents($composerFile), true))['extra']['runtime'] ?? [];
85+
86+
if (isset($runtimeConfig['dotenv_path'])) {
87+
$dotenvPath = $this->projectDirectory.'/'.$runtimeConfig['dotenv_path'];
88+
}
89+
}
90+
91+
$filePath = $dotenvPath.'/.env';
92+
}
8193

8294
$envFiles = $this->getEnvFiles($filePath);
8395
$availableFiles = array_filter($envFiles, 'is_file');

‎src/Symfony/Component/HttpClient/Response/CurlResponse.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/HttpClient/Response/CurlResponse.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,7 @@ private static function perform(ClientState $multi, ?array &$responses = null):
323323
}
324324

325325
$multi->handlesActivity[$id][] = null;
326-
$multi->handlesActivity[$id][] = \in_array($result, [\CURLE_OK, \CURLE_TOO_MANY_REDIRECTS], true) || '_0' === $waitFor || curl_getinfo($ch, \CURLINFO_SIZE_DOWNLOAD) === curl_getinfo($ch, \CURLINFO_CONTENT_LENGTH_DOWNLOAD) ? null : new TransportException(ucfirst(curl_error($ch) ?: curl_strerror($result)).\sprintf(' for "%s".', curl_getinfo($ch, \CURLINFO_EFFECTIVE_URL)));
326+
$multi->handlesActivity[$id][] = \in_array($result, [\CURLE_OK, \CURLE_TOO_MANY_REDIRECTS], true) || '_0' === $waitFor || curl_getinfo($ch, \CURLINFO_SIZE_DOWNLOAD) === curl_getinfo($ch, \CURLINFO_CONTENT_LENGTH_DOWNLOAD) || (curl_error($ch) === 'OpenSSL SSL_read: SSL_ERROR_SYSCALL, errno 0' && -1.0 === curl_getinfo($ch, \CURLINFO_CONTENT_LENGTH_DOWNLOAD) && \in_array('close', array_map('strtolower', $responses[$id]->headers['connection']), true)) ? null : new TransportException(ucfirst(curl_error($ch) ?: curl_strerror($result)).\sprintf(' for "%s".', curl_getinfo($ch, \CURLINFO_EFFECTIVE_URL)));
327327
}
328328
} finally {
329329
$multi->performing = false;

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.