From 6f334463b6842f32f361d775c247504b879687c3 Mon Sep 17 00:00:00 2001 From: Abdul Malik Ikhsan Date: Fri, 30 Nov 2018 17:26:58 +0700 Subject: [PATCH 1/4] autoload clean up: remove Psr\Log autoload from composer.json --- composer.json | 3 +-- system/Config/AutoloadConfig.php | 4 ++++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index 7a05572a100b..3bb2fffd5c88 100644 --- a/composer.json +++ b/composer.json @@ -20,8 +20,7 @@ }, "autoload": { "psr-4": { - "CodeIgniter\\": "system/", - "Psr\\Log\\": "system/ThirdParty/PSR/Log/" + "CodeIgniter\\": "system/" } }, "scripts": { diff --git a/system/Config/AutoloadConfig.php b/system/Config/AutoloadConfig.php index 1ec59d0aeabc..d7d3f060baf4 100644 --- a/system/Config/AutoloadConfig.php +++ b/system/Config/AutoloadConfig.php @@ -157,10 +157,14 @@ public function __construct() 'CodeIgniter\HTTP\ResponseInterface' => BASEPATH . 'HTTP/ResponseInterface.php', 'CodeIgniter\HTTP\URI' => BASEPATH . 'HTTP/URI.php', 'CodeIgniter\Log\Logger' => BASEPATH . 'Log/Logger.php', + 'Psr\Log\AbstractLogger' => BASEPATH . 'ThirdParty/PSR/Log/AbstractLogger.php', + 'Psr\Log\InvalidArgumentException' => BASEPATH . 'ThirdParty/PSR/Log/InvalidArgumentException.php', 'Psr\Log\LoggerAwareInterface' => BASEPATH . 'ThirdParty/PSR/Log/LoggerAwareInterface.php', 'Psr\Log\LoggerAwareTrait' => BASEPATH . 'ThirdParty/PSR/Log/LoggerAwareTrait.php', 'Psr\Log\LoggerInterface' => BASEPATH . 'ThirdParty/PSR/Log/LoggerInterface.php', + 'Psr\Log\LoggerTrait' => BASEPATH . 'ThirdParty/PSR/Log/LoggerTrait.php', 'Psr\Log\LogLevel' => BASEPATH . 'ThirdParty/PSR/Log/LogLevel.php', + 'Psr\Log\NullLogger' => BASEPATH . 'ThirdParty/PSR/Log/NullLogger.php', 'CodeIgniter\Log\Handlers\BaseHandler' => BASEPATH . 'Log/Handlers/BaseHandler.php', 'CodeIgniter\Log\Handlers\ChromeLoggerHandler' => BASEPATH . 'Log/Handlers/ChromeLoggerHandler.php', 'CodeIgniter\Log\Handlers\FileHandler' => BASEPATH . 'Log/Handlers/FileHandler.php', From 1e957931db9ac14ac11843bec9ba6501a690bff1 Mon Sep 17 00:00:00 2001 From: Abdul Malik Ikhsan Date: Fri, 30 Nov 2018 17:40:16 +0700 Subject: [PATCH 2/4] add "psr/log": "^1.1" to require --- composer.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 3bb2fffd5c88..84cb1e9eb325 100644 --- a/composer.json +++ b/composer.json @@ -10,7 +10,8 @@ "ext-intl": "*", "ext-json": "*", "kint-php/kint": "^2.1", - "zendframework/zend-escaper": "^2.5" + "zendframework/zend-escaper": "^2.5", + "psr/log": "^1.1" }, "require-dev": { "codeigniter4/codeigniter4-standard": "^1.0", From 8b2a0807bb0f0d7419a23614fad14760fc5dc823 Mon Sep 17 00:00:00 2001 From: Abdul Malik Ikhsan Date: Fri, 30 Nov 2018 17:43:07 +0700 Subject: [PATCH 3/4] sort composer.json --- composer.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index 84cb1e9eb325..4a75cdcc5e7b 100644 --- a/composer.json +++ b/composer.json @@ -10,8 +10,8 @@ "ext-intl": "*", "ext-json": "*", "kint-php/kint": "^2.1", - "zendframework/zend-escaper": "^2.5", - "psr/log": "^1.1" + "psr/log": "^1.1", + "zendframework/zend-escaper": "^2.5" }, "require-dev": { "codeigniter4/codeigniter4-standard": "^1.0", From 8659cbf055e19c36f5b82a63d8bb792e7c5859ef Mon Sep 17 00:00:00 2001 From: Abdul Malik Ikhsan Date: Sat, 1 Dec 2018 08:39:46 +0700 Subject: [PATCH 4/4] update admin/framework/composer.json to register psr/log to require and remove Psr\Log namespace from autoload --- admin/framework/composer.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/admin/framework/composer.json b/admin/framework/composer.json index d51327b88d76..a81510a5a0c0 100644 --- a/admin/framework/composer.json +++ b/admin/framework/composer.json @@ -9,6 +9,7 @@ "ext-curl": "*", "ext-intl": "*", "kint-php/kint": "^2.1", + "psr/log": "^1.1", "zendframework/zend-escaper": "^2.5" }, "require-dev": { @@ -19,8 +20,7 @@ }, "autoload": { "psr-4": { - "CodeIgniter\\": "system/", - "Psr\\Log\\": "system/ThirdParty/PSR/Log/" + "CodeIgniter\\": "system/" } }, "scripts": {