Skip to content

Commit c90601a

Browse files
author
symfony-flex-server[bot]
authored
Merge pull request #634
2 parents 8e46860 + 1d04804 commit c90601a

File tree

8 files changed

+75
-0
lines changed

8 files changed

+75
-0
lines changed

symfony/console/4.4/bin/console

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
#!/usr/bin/env php
2+
<?php
3+
4+
use App\Kernel;
5+
use Symfony\Bundle\FrameworkBundle\Console\Application;
6+
use Symfony\Component\Console\Input\ArgvInput;
7+
use Symfony\Component\ErrorHandler\Debug;
8+
9+
if (false === in_array(\PHP_SAPI, ['cli', 'phpdbg', 'embed'], true)) {
10+
echo 'Warning: The console should be invoked via the CLI version of PHP, not the '.\PHP_SAPI.' SAPI'.\PHP_EOL;
11+
}
12+
13+
set_time_limit(0);
14+
15+
require dirname(__DIR__).'/vendor/autoload.php';
16+
17+
if (!class_exists(Application::class)) {
18+
throw new RuntimeException('You need to add "symfony/framework-bundle" as a Composer dependency.');
19+
}
20+
21+
$input = new ArgvInput();
22+
if (null !== $env = $input->getParameterOption(['--env', '-e'], null, true)) {
23+
putenv('APP_ENV='.$_SERVER['APP_ENV'] = $_ENV['APP_ENV'] = $env);
24+
}
25+
26+
if ($input->hasParameterOption('--no-debug', true)) {
27+
putenv('APP_DEBUG='.$_SERVER['APP_DEBUG'] = $_ENV['APP_DEBUG'] = '0');
28+
}
29+
30+
require dirname(__DIR__).'/config/bootstrap.php';
31+
32+
if ($_SERVER['APP_DEBUG']) {
33+
umask(0000);
34+
35+
if (class_exists(Debug::class)) {
36+
Debug::enable();
37+
}
38+
}
39+
40+
$kernel = new Kernel($_SERVER['APP_ENV'], (bool) $_SERVER['APP_DEBUG']);
41+
$application = new Application($kernel);
42+
$application->run($input);

symfony/console/4.4/config

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../3.3/config/

symfony/console/4.4/manifest.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../3.3/manifest.json

symfony/framework-bundle/4.4/config

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../4.2/config/
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../4.2/manifest.json
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../4.2/post-install.txt
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
<?php
2+
3+
use App\Kernel;
4+
use Symfony\Component\ErrorHandler\Debug;
5+
use Symfony\Component\HttpFoundation\Request;
6+
7+
require dirname(__DIR__).'/config/bootstrap.php';
8+
9+
if ($_SERVER['APP_DEBUG']) {
10+
umask(0000);
11+
12+
Debug::enable();
13+
}
14+
15+
if ($trustedProxies = $_SERVER['TRUSTED_PROXIES'] ?? $_ENV['TRUSTED_PROXIES'] ?? false) {
16+
Request::setTrustedProxies(explode(',', $trustedProxies), Request::HEADER_X_FORWARDED_ALL ^ Request::HEADER_X_FORWARDED_HOST);
17+
}
18+
19+
if ($trustedHosts = $_SERVER['TRUSTED_HOSTS'] ?? $_ENV['TRUSTED_HOSTS'] ?? false) {
20+
Request::setTrustedHosts([$trustedHosts]);
21+
}
22+
23+
$kernel = new Kernel($_SERVER['APP_ENV'], (bool) $_SERVER['APP_DEBUG']);
24+
$request = Request::createFromGlobals();
25+
$response = $kernel->handle($request);
26+
$response->send();
27+
$kernel->terminate($request, $response);

symfony/framework-bundle/4.4/src

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../4.2/src/

0 commit comments

Comments
 (0)