From c0e725633978ae3026fb59eeb282600e9039aebb Mon Sep 17 00:00:00 2001 From: Alejandro Gallardo Escobar Date: Mon, 18 Mar 2019 12:46:20 +0100 Subject: [PATCH] Visual Console Refactor: added autoload paths Former-commit-id: 3f6cc155b1bba8435583327c1125b166684dfe6f --- pandora_console/composer.json | 10 ++++++++++ pandora_console/vendor/composer/ClassLoader.php | 2 +- pandora_console/vendor/composer/autoload_psr4.php | 2 ++ pandora_console/vendor/composer/autoload_static.php | 13 +++++++++++++ 4 files changed, 26 insertions(+), 1 deletion(-) diff --git a/pandora_console/composer.json b/pandora_console/composer.json index acc6a3e352..c9b8a792a0 100644 --- a/pandora_console/composer.json +++ b/pandora_console/composer.json @@ -10,5 +10,15 @@ "require": { "mpdf/mpdf": "^7.1", "swiftmailer/swiftmailer": "^6.0" + }, + "autoload": { + "psr-4": { + "Models\\": "include/rest-api/models" + } + }, + "autoload-dev": { + "psr-4": { + "Tests\\": "tests/" + } } } diff --git a/pandora_console/vendor/composer/ClassLoader.php b/pandora_console/vendor/composer/ClassLoader.php index 95f7e0978b..fce8549f07 100644 --- a/pandora_console/vendor/composer/ClassLoader.php +++ b/pandora_console/vendor/composer/ClassLoader.php @@ -279,7 +279,7 @@ class ClassLoader */ public function setApcuPrefix($apcuPrefix) { - $this->apcuPrefix = function_exists('apcu_fetch') && ini_get('apc.enabled') ? $apcuPrefix : null; + $this->apcuPrefix = function_exists('apcu_fetch') && filter_var(ini_get('apc.enabled'), FILTER_VALIDATE_BOOLEAN) ? $apcuPrefix : null; } /** diff --git a/pandora_console/vendor/composer/autoload_psr4.php b/pandora_console/vendor/composer/autoload_psr4.php index cd3de7c147..0b722b4f5b 100644 --- a/pandora_console/vendor/composer/autoload_psr4.php +++ b/pandora_console/vendor/composer/autoload_psr4.php @@ -6,8 +6,10 @@ $vendorDir = dirname(dirname(__FILE__)); $baseDir = dirname($vendorDir); return array( + 'Tests\\' => array($baseDir . '/tests'), 'Psr\\Log\\' => array($vendorDir . '/psr/log/Psr/Log'), 'Mpdf\\' => array($vendorDir . '/mpdf/mpdf/src'), + 'Models\\' => array($baseDir . '/include/rest-api/models'), 'Egulias\\EmailValidator\\' => array($vendorDir . '/egulias/email-validator/EmailValidator'), 'DeepCopy\\' => array($vendorDir . '/myclabs/deep-copy/src/DeepCopy'), ); diff --git a/pandora_console/vendor/composer/autoload_static.php b/pandora_console/vendor/composer/autoload_static.php index 2e8ac5a72e..04decc8765 100644 --- a/pandora_console/vendor/composer/autoload_static.php +++ b/pandora_console/vendor/composer/autoload_static.php @@ -12,6 +12,10 @@ class ComposerStaticInitfdecadadce22e6dde51e9535fe4ad7aa ); public static $prefixLengthsPsr4 = array ( + 'T' => + array ( + 'Tests\\' => 6, + ), 'P' => array ( 'Psr\\Log\\' => 8, @@ -19,6 +23,7 @@ class ComposerStaticInitfdecadadce22e6dde51e9535fe4ad7aa 'M' => array ( 'Mpdf\\' => 5, + 'Models\\' => 7, ), 'E' => array ( @@ -31,6 +36,10 @@ class ComposerStaticInitfdecadadce22e6dde51e9535fe4ad7aa ); public static $prefixDirsPsr4 = array ( + 'Tests\\' => + array ( + 0 => __DIR__ . '/../..' . '/tests', + ), 'Psr\\Log\\' => array ( 0 => __DIR__ . '/..' . '/psr/log/Psr/Log', @@ -39,6 +48,10 @@ class ComposerStaticInitfdecadadce22e6dde51e9535fe4ad7aa array ( 0 => __DIR__ . '/..' . '/mpdf/mpdf/src', ), + 'Models\\' => + array ( + 0 => __DIR__ . '/../..' . '/include/rest-api/models', + ), 'Egulias\\EmailValidator\\' => array ( 0 => __DIR__ . '/..' . '/egulias/email-validator/EmailValidator',