summaryrefslogtreecommitdiff
path: root/vendor/symfony/console/Debug
diff options
context:
space:
mode:
authorpolo <ordipolo@gmx.fr>2026-10-18 00:08:23 +0200
committerpolo <ordipolo@gmx.fr>2026-10-18 00:10:03 +0200
commit05e38eadbeb3de19e5b26003c2b401e00bb71df4 (patch)
treecf48350b69cfce92de6f3a0e03eb0876931c7077 /vendor/symfony/console/Debug
parent32843e50aa981f190bdb4fbc9adbeacc06fdf775 (diff)
downloadAppliGestionPHP-05e38eadbeb3de19e5b26003c2b401e00bb71df4.tar.gz
AppliGestionPHP-05e38eadbeb3de19e5b26003c2b401e00bb71df4.tar.bz2
AppliGestionPHP-05e38eadbeb3de19e5b26003c2b401e00bb71df4.zip
sortie de vendor du dépôt, oubli dans config-template.ini
Diffstat (limited to 'vendor/symfony/console/Debug')
-rw-r--r--vendor/symfony/console/Debug/CliRequest.php70
1 files changed, 0 insertions, 70 deletions
diff --git a/vendor/symfony/console/Debug/CliRequest.php b/vendor/symfony/console/Debug/CliRequest.php
deleted file mode 100644
index b023db0..0000000
--- a/vendor/symfony/console/Debug/CliRequest.php
+++ /dev/null
@@ -1,70 +0,0 @@
1<?php
2
3/*
4 * This file is part of the Symfony package.
5 *
6 * (c) Fabien Potencier <fabien@symfony.com>
7 *
8 * For the full copyright and license information, please view the LICENSE
9 * file that was distributed with this source code.
10 */
11
12namespace Symfony\Component\Console\Debug;
13
14use Symfony\Component\Console\Command\TraceableCommand;
15use Symfony\Component\HttpFoundation\Request;
16use Symfony\Component\HttpFoundation\Response;
17
18/**
19 * @internal
20 */
21final class CliRequest extends Request
22{
23 public function __construct(
24 public readonly TraceableCommand $command,
25 ) {
26 parent::__construct(
27 attributes: ['_controller' => \get_class($command->command), '_virtual_type' => 'command'],
28 server: $_SERVER,
29 );
30 }
31
32 // Methods below allow to populate a profile, thus enable search and filtering
33 public function getUri(): string
34 {
35 if ($this->server->has('SYMFONY_CLI_BINARY_NAME')) {
36 $binary = $this->server->get('SYMFONY_CLI_BINARY_NAME').' console';
37 } else {
38 $binary = $this->server->get('argv')[0];
39 }
40
41 return $binary.' '.$this->command->input;
42 }
43
44 public function getMethod(): string
45 {
46 return $this->command->isInteractive ? 'INTERACTIVE' : 'BATCH';
47 }
48
49 public function getResponse(): Response
50 {
51 return new class($this->command->exitCode) extends Response {
52 public function __construct(private readonly int $exitCode)
53 {
54 parent::__construct();
55 }
56
57 public function getStatusCode(): int
58 {
59 return $this->exitCode;
60 }
61 };
62 }
63
64 public function getClientIp(): string
65 {
66 $application = $this->command->getApplication();
67
68 return $application->getName().' '.$application->getVersion();
69 }
70}