Hi,
I've manage to installed Whoops in CI 3 using composer, with addition to index.php like so.
Code:
switch (ENVIRONMENT)
{
case 'development':
error_reporting(-1);
ini_set('display_errors', 1);
error_reporting(E_ALL & ~E_NOTICE & ~E_DEPRECATED & ~E_STRICT & ~E_USER_NOTICE & ~E_USER_DEPRECATED);
$whoops = new \Whoops\Run;
$whoops->pushHandler(new \Whoops\Handler\PrettyPageHandler());
$whoops->register();
throw new Exception('whoops handler test'); // For testing purpose
break;
case 'testing':
// Omitted
break;
case 'production':
// Omitted
break;
default:
// Omitted
exit(1);
}
It works when there is an error or exception in index.php, but when error occurred in Controller or Model. CI standard error handler is still used, anyone ever successfully installed Whoops?