Vous êtes connecté en tant que anonymous Se Deconnecter
Browse code

Ajout d'une autre application symfony 5.0.99 afin de tester le partage de la variable $_SESSION -->OK

TODO: ajouter un plug-in symfony permettant de charger un utilisateur dans les apps a partir de l'authentification multiple

TODO: lire les documentation officielles provenant des 4 plate-formes tranquillement afin de comprendre commet doit on tester ces type d'auth quitte a créé un sous domaine particulier directement hebergé sur gittea
-->Sécuriser le serveur de dev

Emmanuel ROY authored on 23/11/2019 03:00:32
Showing 1 changed files
1 1
new file mode 100755
... ...
@@ -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);