From db090e5ae274a56ae115b21d95e6e62748aed933 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9o=20FIDRY?= Date: Fri, 25 Nov 2016 18:30:21 +0000 Subject: [PATCH] Fix Facade The facade must be initiated before launching the debug. --- composer.json | 5 ++++- src/PsyshFacade.php | 2 ++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 4619d3e..7453cfd 100644 --- a/composer.json +++ b/composer.json @@ -32,7 +32,10 @@ ] }, "autoload-dev": { - "psr-4": { "Fidry\\PsyshBundle\\": "tests" } + "psr-4": { "Fidry\\PsyshBundle\\": "tests" }, + "files": [ + "tests/Functional/AppKernel.php" + ] }, "config": { "bin-dir": "bin", diff --git a/src/PsyshFacade.php b/src/PsyshFacade.php index 5dbf08e..1fb70bc 100644 --- a/src/PsyshFacade.php +++ b/src/PsyshFacade.php @@ -45,6 +45,8 @@ public static function init() public static function debug(array $variables = [], $bind = null) { + self::init(); + $_variables = array_merge(self::$shell->getScopeVariables(), $variables); extract(