Skip to content

Commit 65a4e69

Browse files
Merge branch '6.4' into 7.0
* 6.4: Partially revert "DX: PHP CS Fixer - update excluded paths and apply some minor CS" [AssetMapper] Allowing for files to be written to some non-local location [HttpKernel] Resolve EBADP error on flock with LOCK_SH with NFS [AssetMapper] Fixing bug of bad parsing of imports when an import then export are adjacent add missing basque translations [FrameworkBundle][Validator] Allow implementing validation groups provider outside DTOs [Notifier][Novu] Implement overrides [Validator] Handle `null` case [Workflow] List place or transition listeners in profiler [Intl] Add support for emoji 15.1 Replace Tickets by Issues [Validator] Add missing arabic translations [Validator] Added missing translations for Romanian language for Validator component [Messenger] Fix graceful exit with ids [HttpKernel] Add parameters `kernel.runtime_mode` and `kernel.runtime_mode.*`, all set from env var `APP_RUNTIME_MODE`
2 parents 096c0a2 + 8653923 commit 65a4e69

File tree

2 files changed

+18
-2
lines changed

2 files changed

+18
-2
lines changed

Internal/BasicErrorHandler.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ public static function register(bool $debug): void
2222
{
2323
error_reporting(-1);
2424

25-
if (!\in_array(\PHP_SAPI, ['cli', 'phpdbg'], true)) {
25+
if (!\in_array(\PHP_SAPI, ['cli', 'phpdbg', 'embed'], true)) {
2626
ini_set('display_errors', $debug);
2727
} elseif (!filter_var(\ini_get('log_errors'), \FILTER_VALIDATE_BOOL) || \ini_get('error_log')) {
2828
// CLI - display errors only if they're not already logged to STDERR

Runner/Symfony/HttpKernelRunner.php

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@
1212
namespace Symfony\Component\Runtime\Runner\Symfony;
1313

1414
use Symfony\Component\HttpFoundation\Request;
15+
use Symfony\Component\HttpFoundation\Response;
1516
use Symfony\Component\HttpKernel\HttpKernelInterface;
17+
use Symfony\Component\HttpKernel\Kernel;
1618
use Symfony\Component\HttpKernel\TerminableInterface;
1719
use Symfony\Component\Runtime\RunnerInterface;
1820

@@ -31,7 +33,21 @@ public function __construct(
3133
public function run(): int
3234
{
3335
$response = $this->kernel->handle($this->request);
34-
$response->send(!$this->debug);
36+
37+
if (Kernel::VERSION_ID >= 60400) {
38+
$response->send(false);
39+
40+
if (\function_exists('fastcgi_finish_request') && !$this->debug) {
41+
fastcgi_finish_request();
42+
} elseif (\function_exists('litespeed_finish_request') && !$this->debug) {
43+
litespeed_finish_request();
44+
} else {
45+
Response::closeOutputBuffers(0, true);
46+
flush();
47+
}
48+
} else {
49+
$response->send();
50+
}
3551

3652
if ($this->kernel instanceof TerminableInterface) {
3753
$this->kernel->terminate($this->request, $response);

0 commit comments

Comments
 (0)