From 8ce3630714267cd2766783e258cf0f85fea31be3 Mon Sep 17 00:00:00 2001 From: Abel Hoogeveen Date: Wed, 24 Nov 2021 17:43:00 +0100 Subject: [PATCH] PHP 8.0 compatibility update --- composer.json | 12 ++++------- src/FuzeWorks/Configurator.php | 4 ++-- src/FuzeWorks/Factory.php | 5 ++++- test/phpunit.xml | 38 +++++++++++++--------------------- 4 files changed, 24 insertions(+), 35 deletions(-) diff --git a/composer.json b/composer.json index d2aa1b5..e8c9b82 100644 --- a/composer.json +++ b/composer.json @@ -1,20 +1,16 @@ { "name": "fuzeworks/core", "description": "FuzeWorks Framework Core", - "homepage": "https://techfuze.net/fuzeworks", + "homepage": "https://i15.nl/fuzeworks", "license": ["MIT"], "authors": [ { - "name": "TechFuze", - "homepage": "https://techfuze.net" - }, - { - "name": "FuzeWorks Community", - "homepage": "https://techfuze.net/fuzeworks/contributors" + "name": "Abel Hoogeveen", + "homepage": "https://i15.nl" } ], "require": { - "php": ">=7.2.0" + "php": ">=7.4.0" }, "require-dev": { "phpunit/phpunit": "^9", diff --git a/src/FuzeWorks/Configurator.php b/src/FuzeWorks/Configurator.php index 9e72214..90e6640 100644 --- a/src/FuzeWorks/Configurator.php +++ b/src/FuzeWorks/Configurator.php @@ -31,7 +31,7 @@ * @link http://techfuze.net/fuzeworks * @since Version 0.0.1 * - * @version Version 1.2.0 + * @version Version 1.3.0 */ namespace FuzeWorks; @@ -345,7 +345,7 @@ class Configurator Core::$logDir = $this->parameters['logDir']; // Then prepare the debugger - $debug = ($this->parameters['debugEnabled'] && $this->parameters['debugMatch'] ? true : false); + $debug = $this->parameters['debugEnabled'] && $this->parameters['debugMatch']; // Then load the framework $container = Core::init(); diff --git a/src/FuzeWorks/Factory.php b/src/FuzeWorks/Factory.php index 37e1892..25b6526 100644 --- a/src/FuzeWorks/Factory.php +++ b/src/FuzeWorks/Factory.php @@ -31,7 +31,7 @@ * @link http://techfuze.net/fuzeworks * @since Version 0.0.1 * - * @version Version 1.2.0 + * @version Version 1.3.0 */ namespace FuzeWorks; @@ -173,6 +173,9 @@ class Factory // Initialize all components foreach ($this as $component) { + if (!is_object($component)) + continue; + if (method_exists($component, 'init')) $component->init(); } diff --git a/test/phpunit.xml b/test/phpunit.xml index 5a152b6..d37cfe4 100644 --- a/test/phpunit.xml +++ b/test/phpunit.xml @@ -1,29 +1,19 @@ - - + + + + + ../ + + + ../vendor/ + ../test/ + ../src/Layout/ + ../src/Config/ + + - + ./ - - - - ../ - - ../vendor/ - ../test/ - ../src/Layout/ - ../src/Config/ - - - \ No newline at end of file