From 50ba1aec397e0607eeca7eb6dd0bcd1e37294fd2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dani=C3=ABl=20Smink?= Date: Wed, 20 Sep 2017 09:36:45 +0200 Subject: [PATCH 1/7] Fix path to log file --- src/Joomlatools/Joomla/Application.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Joomlatools/Joomla/Application.php b/src/Joomlatools/Joomla/Application.php index 40ccb5b..844edc0 100644 --- a/src/Joomlatools/Joomla/Application.php +++ b/src/Joomlatools/Joomla/Application.php @@ -454,7 +454,7 @@ public static function getRouter($name = 'administrator', array $options = array */ protected function _setupLogging($loglevel) { - require_once JPATH_LIBRARIES . '/joomla/log/log.php'; + require_once JPATH_LIBRARIES . '/src/Log/Log.php'; if ($loglevel == OutputInterface::VERBOSITY_NORMAL) { return; From ed886c10250cc29b070dfdfec76223fd6a321a5c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dani=C3=ABl=20Smink?= Date: Wed, 20 Sep 2017 10:03:37 +0200 Subject: [PATCH 2/7] Just include import --- src/Joomlatools/Joomla/Bootstrapper.php | 1 - 1 file changed, 1 deletion(-) diff --git a/src/Joomlatools/Joomla/Bootstrapper.php b/src/Joomlatools/Joomla/Bootstrapper.php index ebf12a2..ee35328 100644 --- a/src/Joomlatools/Joomla/Bootstrapper.php +++ b/src/Joomlatools/Joomla/Bootstrapper.php @@ -188,7 +188,6 @@ protected function _bootstrap() define('JPATH_BASE', $base); require_once JPATH_BASE . '/includes/defines.php'; - require_once JPATH_BASE . '/includes/framework.php'; } require_once JPATH_LIBRARIES . '/import.php'; From 51247cb0ecdbcfe28866a2f0b9c343f9427e6b83 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dani=C3=ABl=20Smink?= Date: Wed, 20 Sep 2017 10:10:43 +0200 Subject: [PATCH 3/7] Define JDEBUG --- src/Joomlatools/Joomla/Bootstrapper.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Joomlatools/Joomla/Bootstrapper.php b/src/Joomlatools/Joomla/Bootstrapper.php index ee35328..44d968d 100644 --- a/src/Joomlatools/Joomla/Bootstrapper.php +++ b/src/Joomlatools/Joomla/Bootstrapper.php @@ -157,6 +157,7 @@ protected function _bootstrap() $_SERVER['HTTP_USER_AGENT'] = 'Composer'; define('DS', DIRECTORY_SEPARATOR); + define('JDEBUG', $this->_application->getCfg('debug')); $base = realpath('.'); From dd34cd3ac58f3df63eb8817e748403dbfef65520 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dani=C3=ABl=20Smink?= Date: Wed, 20 Sep 2017 10:16:55 +0200 Subject: [PATCH 4/7] Set JDEBUG --- src/Joomlatools/Joomla/Bootstrapper.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Joomlatools/Joomla/Bootstrapper.php b/src/Joomlatools/Joomla/Bootstrapper.php index 44d968d..f138946 100644 --- a/src/Joomlatools/Joomla/Bootstrapper.php +++ b/src/Joomlatools/Joomla/Bootstrapper.php @@ -157,7 +157,7 @@ protected function _bootstrap() $_SERVER['HTTP_USER_AGENT'] = 'Composer'; define('DS', DIRECTORY_SEPARATOR); - define('JDEBUG', $this->_application->getCfg('debug')); + define('JDEBUG', '0'); $base = realpath('.'); From 246f8011a858f3cb9d0c480ea27c900a7d6a0ce5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dani=C3=ABl=20Smink?= Date: Wed, 20 Sep 2017 11:18:19 +0200 Subject: [PATCH 5/7] Check if new Log class exsists (J3.8) else load the old one --- src/Joomlatools/Joomla/Application.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/Joomlatools/Joomla/Application.php b/src/Joomlatools/Joomla/Application.php index 844edc0..c385282 100644 --- a/src/Joomlatools/Joomla/Application.php +++ b/src/Joomlatools/Joomla/Application.php @@ -454,7 +454,12 @@ public static function getRouter($name = 'administrator', array $options = array */ protected function _setupLogging($loglevel) { - require_once JPATH_LIBRARIES . '/src/Log/Log.php'; + // Backwards compatibility + if (file_exists(JPATH_LIBRARIES . '/src/Log/Log.php')) { + require_once JPATH_LIBRARIES . '/src/Log/Log.php'; + } else { + require_once JPATH_LIBRARIES . '/joomla/log/log.php'; + } if ($loglevel == OutputInterface::VERBOSITY_NORMAL) { return; From 75db6c5f00fc232c31a0d0dd85fd2e83cfe3efbe Mon Sep 17 00:00:00 2001 From: Steven Rombauts Date: Sun, 24 Sep 2017 20:29:23 +0100 Subject: [PATCH 6/7] #34: Make sure to include includes/framework.php --- src/Joomlatools/Joomla/Bootstrapper.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Joomlatools/Joomla/Bootstrapper.php b/src/Joomlatools/Joomla/Bootstrapper.php index f138946..3806ea7 100644 --- a/src/Joomlatools/Joomla/Bootstrapper.php +++ b/src/Joomlatools/Joomla/Bootstrapper.php @@ -182,6 +182,8 @@ protected function _bootstrap() require_once JPATH_ROOT . '/app/defines.php'; require_once JPATH_ROOT . '/app/bootstrap.php'; + + require_once JPATH_LIBRARIES . '/import.php'; } else { @@ -189,9 +191,9 @@ protected function _bootstrap() define('JPATH_BASE', $base); require_once JPATH_BASE . '/includes/defines.php'; + require_once JPATH_BASE . '/includes/framework.php'; } - require_once JPATH_LIBRARIES . '/import.php'; require_once JPATH_LIBRARIES . '/cms.php'; $this->_bootstrapped = true; From b38bd937ebe9a36489b56553b84b4d7b74e66def Mon Sep 17 00:00:00 2001 From: Steven Rombauts Date: Sun, 24 Sep 2017 20:31:52 +0100 Subject: [PATCH 7/7] #34: Don't define JDEBUG --- src/Joomlatools/Joomla/Bootstrapper.php | 1 - 1 file changed, 1 deletion(-) diff --git a/src/Joomlatools/Joomla/Bootstrapper.php b/src/Joomlatools/Joomla/Bootstrapper.php index 3806ea7..4de0d0b 100644 --- a/src/Joomlatools/Joomla/Bootstrapper.php +++ b/src/Joomlatools/Joomla/Bootstrapper.php @@ -157,7 +157,6 @@ protected function _bootstrap() $_SERVER['HTTP_USER_AGENT'] = 'Composer'; define('DS', DIRECTORY_SEPARATOR); - define('JDEBUG', '0'); $base = realpath('.');