From 4a613b9fb24b99bfe0a09421a9f5fda84c0fbc61 Mon Sep 17 00:00:00 2001 From: Ryan Weaver Date: Mon, 9 Oct 2017 14:24:40 -0500 Subject: [PATCH 1/2] Always using umask(0000) in debug mode --- symfony/console/3.3/bin/console | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/symfony/console/3.3/bin/console b/symfony/console/3.3/bin/console index 15d8f095b..8ec3af44d 100755 --- a/symfony/console/3.3/bin/console +++ b/symfony/console/3.3/bin/console @@ -7,7 +7,6 @@ use Symfony\Component\Console\Input\ArgvInput; use Symfony\Component\Debug\Debug; use Symfony\Component\Dotenv\Dotenv; -umask(0000); set_time_limit(0); require __DIR__.'/../vendor/autoload.php'; @@ -24,8 +23,12 @@ $input = new ArgvInput(); $env = $input->getParameterOption(['--env', '-e'], $_SERVER['APP_ENV'] ?? 'dev'); $debug = ($_SERVER['APP_DEBUG'] ?? true) !== '0' && !$input->hasParameterOption(['--no-debug', '']); -if ($debug && class_exists(Debug::class)) { - Debug::enable(); +if ($debug) { + umask(0000); + + if (class_exists(Debug::class)) { + Debug::enable(); + } } $kernel = new Kernel($env, $debug); From 714d51b11782780ea2df984e50e1dc95e3d8cbb9 Mon Sep 17 00:00:00 2001 From: Ryan Weaver Date: Mon, 9 Oct 2017 15:27:12 -0400 Subject: [PATCH 2/2] Removing warning about cache permissions when you're in debug mode --- symfony/framework-bundle/3.3/public/index.php | 3 --- 1 file changed, 3 deletions(-) diff --git a/symfony/framework-bundle/3.3/public/index.php b/symfony/framework-bundle/3.3/public/index.php index e81da86b8..d2c826aff 100644 --- a/symfony/framework-bundle/3.3/public/index.php +++ b/symfony/framework-bundle/3.3/public/index.php @@ -13,9 +13,6 @@ } if ($_SERVER['APP_DEBUG'] ?? false) { - // WARNING: You should setup permissions the proper way! - // REMOVE the following PHP line and read - // https://symfony.com/doc/current/book/installation.html#checking-symfony-application-configuration-and-setup umask(0000); Debug::enable();