From 95baead19b7fccdfa0672bee1f1572a1036e2a59 Mon Sep 17 00:00:00 2001 From: Piotr Bletek Date: Fri, 14 Jun 2019 08:28:55 +0200 Subject: [PATCH] bugfix(core) ERG-#2 add misssing files --- .gitignore | 2 -- README.md | 4 ++-- bin/.gitignore | 3 +++ bin/console | 43 +++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 48 insertions(+), 4 deletions(-) create mode 100644 bin/.gitignore create mode 100755 bin/console diff --git a/.gitignore b/.gitignore index e9cfb5e4b..c0e3b5359 100644 --- a/.gitignore +++ b/.gitignore @@ -2,8 +2,6 @@ /public/bundles/ /var/ /vendor/ -/bin/ -!/bin/console /import /tmp .history diff --git a/README.md b/README.md index 6aee2c6f0..a90c03177 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@

- Version + Version Code Version @@ -19,7 +19,7 @@ Docs - License + License


diff --git a/bin/.gitignore b/bin/.gitignore new file mode 100644 index 000000000..5b6a64b93 --- /dev/null +++ b/bin/.gitignore @@ -0,0 +1,3 @@ +/* +!.gitignore +!console diff --git a/bin/console b/bin/console new file mode 100755 index 000000000..8fe34709b --- /dev/null +++ b/bin/console @@ -0,0 +1,43 @@ +#!/usr/bin/env php +load(__DIR__.'/../.env'); +} + +$input = new ArgvInput(); +$env = $input->getParameterOption(['--env', '-e'], $_SERVER['APP_ENV'] ?? 'dev', true); +$debug = (bool) ($_SERVER['APP_DEBUG'] ?? ('prod' !== $env)) && !$input->hasParameterOption('--no-debug', true); + +if ($debug) { + umask(0000); + + if (class_exists(Debug::class)) { + Debug::enable(); + } +} + +$kernel = new Kernel($env, $debug); +$application = new Application($kernel); +$application->run($input);