(11-08-2019, 07:12 AM)MGatner Wrote: I was actually hoping for the `trace()` output - I'm curious how this is being called to being with, and why it is trying to load the tests registrar in a production instance.
Code:
CodeIgniter CLI Tool - Version 4.0.0-rc.3 - Server-Time: 2019-11-08 13:07:29pm
������������������������������������������������������������������������������Ŀ
� Kint::trace() �
��������������������������������������������������������������������������������
Debug Backtrace (14):
1: .../system/Config/BaseConfig.php:208
trace()
$registrarsFiles = $locator->search('Config/Registrar.php');
foreach ($registrarsFiles as $file)
{
$className = $locator->getClassname($file);
if ($className == 'Tests\Support\Config\Registrar')
{
trace(); dd($registrarsFiles);
}
static::$registrars[] = new $className();
}
static::$didDiscovery = true;
}
2: .../system/Config/BaseConfig.php:101
CodeIgniter\Config\BaseConfig->registerProperties()
$this->initEnvValue($this->$property, $property, $prefix, $shortPrefix);
}
if (defined('ENVIRONMENT') && ENVIRONMENT !== 'testing')
{
// well, this won't happen during unit testing
// @codeCoverageIgnoreStart
$this->registerProperties();
// @codeCoverageIgnoreEnd
}
}
//--------------------------------------------------------------------
/**
3: .../system/Config/Config.php:157
CodeIgniter\Config\BaseConfig->__construct()
$name = $locator->getClassname($file);
if (empty($name))
{
return null;
}
return new $name();
}
//--------------------------------------------------------------------
}
4: .../system/Config/Config.php:83
CodeIgniter\Config\Config::createClass(string $name)
if (! $getShared)
{
return self::createClass($name);
}
if (! isset( self::$instances[$class] ))
{
self::$instances[$class] = self::createClass($name);
}
return self::$instances[$class];
}
//--------------------------------------------------------------------
/**
5: .../system/Common.php:109
CodeIgniter\Config\Config::get(string $name, bool $getShared = true)
* @param string $name
* @param boolean $getShared
*
* @return mixed
*/
function config(string $name, bool $getShared = true)
{
return Config::get($name, $getShared);
}
}
//--------------------------------------------------------------------
if (! function_exists('db_connect'))
{
6: .../system/Config/Services.php:839
config(string $name, bool $getShared = true)
if ($getShared)
{
return static::getSharedInstance('toolbar', $config);
}
if (! is_object($config))
{
$config = config('Toolbar');
}
return new Toolbar($config);
}
//--------------------------------------------------------------------
7: .../system/Config/BaseService.php:120
CodeIgniter\Config\Services::toolbar(Config\Toolbar $config = null, bool $getShared = true)
}
if (! isset(static::$instances[$key]))
{
// Make sure $getShared is false
array_push($params, false);
static::$instances[$key] = static::$key(...$params);
}
return static::$instances[$key];
}
//--------------------------------------------------------------------
8: .../system/Config/Services.php:834
CodeIgniter\Config\BaseService::getSharedInstance(string $key, $params)
*
* @return \CodeIgniter\Debug\Toolbar
*/
public static function toolbar(\Config\Toolbar $config = null, bool $getShared = true)
{
if ($getShared)
{
return static::getSharedInstance('toolbar', $config);
}
if (! is_object($config))
{
$config = config('Toolbar');
}
9: .../app/Config/Events.php:41
CodeIgniter\Config\Services::toolbar(Config\Toolbar $config = null, bool $getShared = true)
* Debug Toolbar Listeners.
* --------------------------------------------------------------------
* If you delete, they will no longer be collected.
*/
if (ENVIRONMENT !== 'production')
{
Events::on('DBQuery', 'CodeIgniter\Debug\Toolbar\Collectors\Database::collect');
Services::toolbar()->respond();
}
});
10: PHP internal call
CodeIgniter\Events\Events::Config\{closure}(...)
11: .../system/Events/Events.php:188
call_user_func($function_name, $parameters)
$listeners = static::listeners($eventName);
foreach ($listeners as $listener)
{
$start = microtime(true);
$result = static::$simulate === false ? call_user_func($listener, ...$arguments) : true;
if (CI_DEBUG)
{
static::$performanceLog[] = [
'start' => $start,
'end' => microtime(true),
'event' => strtolower($eventName),
12: .../system/CodeIgniter.php:227
CodeIgniter\Events\Events::trigger($eventName, $arguments)
$this->getRequestObject();
$this->getResponseObject();
$this->forceSecureAccess();
$this->spoofRequestMethod();
Events::trigger('pre_system');
// Check for a cached page. Execution will stop
// if the page has been cached.
$cacheConfig = new Cache();
$response = $this->displayCache($cacheConfig);
if ($response instanceof ResponseInterface)
{
13: .../system/CLI/Console.php:86
CodeIgniter\CodeIgniter->run(CodeIgniter\Router\RouteCollectionInterface $routes = null, bool $returnResponse = false)
public function run(bool $useSafeOutput = false)
{
$path = CLI::getURI() ?: 'list';
// Set the path for the application to route to.
$this->app->setPath("ci{$path}");
return $this->app->useSafeOutput($useSafeOutput)->run();
}
//--------------------------------------------------------------------
/**
* Displays basic information about the Console.
*/
14: .../spark:57
CodeIgniter\CLI\Console->run(bool $useSafeOutput = false)
error_reporting(-1);
ini_set('display_errors', 1);
// Show basic information before we do anything else.
$console->showHeader();
// fire off the command in the main framework.
$response = $console->run();
if ($response->getStatusCode() >= 300)
{
exit($response->getStatusCode());
}
��������������������������������������������������������������������������������
Called from .../system/Config/BaseConfig.php:208 [CodeIgniter\Config\BaseConfig->registerProperties()]
������������������������������������������������������������������������������Ŀ
� $registrarsFiles �
��������������������������������������������������������������������������������
array (1) [
0 => string (95) "C:\Users\gabri\Documents\asist.com.br\vendor\composer/../../tests/_support\Config/Registrar.php"
]
��������������������������������������������������������������������������������
Called from .../system/Config/BaseConfig.php:208 [CodeIgniter\Config\BaseConfig->registerProperties()]
I hope it helps find the BUG...
I hope it helps find the BUG...
I hope it helps find the BUG...