N°7059 - Symfony 6.4 - Application skeleton (#587)

Mise en place d'un squelette temporaire fonctionnel d'application Symfony.

- Ajout bundles debug & runtime pour une implémentation standard
- Configuration minimale
- .env file in specific directory
- Frontal application app.php
This commit is contained in:
Benjamin Dalsass
2023-12-12 16:40:04 +01:00
committed by GitHub
parent 62d7e10257
commit fb29ff29cf
66 changed files with 2694 additions and 8 deletions

31
lib/autoload_runtime.php Normal file
View File

@@ -0,0 +1,31 @@
<?php
// autoload_runtime.php @generated by Symfony Runtime
if (true === (require_once __DIR__.'/autoload.php') || empty($_SERVER['SCRIPT_FILENAME'])) {
return;
}
$app = require $_SERVER['SCRIPT_FILENAME'];
if (!is_object($app)) {
throw new TypeError(sprintf('Invalid return value: callable object expected, "%s" returned from "%s".', get_debug_type($app), $_SERVER['SCRIPT_FILENAME']));
}
$runtime = $_SERVER['APP_RUNTIME'] ?? $_ENV['APP_RUNTIME'] ?? 'Symfony\\Component\\Runtime\\SymfonyRuntime';
$runtime = new $runtime(($_SERVER['APP_RUNTIME_OPTIONS'] ?? $_ENV['APP_RUNTIME_OPTIONS'] ?? []) + [
'dotenv_path' => 'symfony/.env',
'project_dir' => dirname(__DIR__, 1),
]);
[$app, $args] = $runtime
->getResolver($app)
->resolve();
$app = $app(...$args);
exit(
$runtime
->getRunner($app)
->run()
);