This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.
Not quite.
Just updated here in development environment, I'm having trouble to catch errors.
Its says: Symfony\Component\Debug\Exception\FatalErrorException: Uncaught TypeError: Argument 1 passed to October\Rain\Foundation\Exception\Handler::report() must be an instance of Exception, instance of Error given
This is because Laravel 5.0 does not expect something different of a Exception that just passes it to the ExceptionHandler: https://github.com/laravel/framework/blob/5.0/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php#L73
But Laravel 5.1 does "convert" (decorate) non-Exceptions to FatalThrowableError that extends FatalErrorException that extends ErrorException that at least extends a Exception https://github.com/laravel/framework/blob/5.1/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php#L75
But October does not support Laravel 5.1 yet
Here follows the workaround, so you can get this running:
// your/Plugin.php
public function register()
{
set_exception_handler([$this, 'handleException']);
}
public function handleException($e)
{
if (! $e instanceof Exception) {
$e = new \Symfony\Component\Debug\Exception\FatalThrowableError($e);
}
$handler = $this->app->make('Illuminate\Contracts\Debug\ExceptionHandler');
$handler->report($e);
if ($this->app->runningInConsole()) {
$handler->renderForConsole(new ConsoleOutput, $e);
} else {
$handler->render($this->app['request'], $e)->send();
}
}
gregorybleiker8797 said:
Worked for me @leocavalcante Thank you!
Good to know. Heads up: this will work only for website errors, doesn't work for artisan commands.
This issue has been fixed in the stable
branch - https://github.com/octobercms/october/tree/stable
Abbas said:
Any ideas how to make this work on for artisan commands?
@Abbas, as pointed out by @jung13798 there is already a fix for this on stable releases. That is basically, it's supporting Laravel 5.1. Have you tried upgrading you OctoberCMS project?
The question remains, is it worth it? Have you noticed any (significant) performance improvements on any of your projects?
Has anybody implemented OctoberCMS on PHP 7 in a production environment?
Regarding the last question, I can only say that running a simple Laravel Project on PHP 7 rather than on PHP 5.6 is a visible improvement in speed.
I have it running on php7 flawlessly on my development pc and my production site(http://the-usa-travelguide.com) and I have no problems with the latest installs or running the complex code. Im mainly still working on getting the backend up for the site before I work on the front end. so I can't comment on frontend issues(yet)
I have apache + php7 though, maybe that matters to know. I have no idea how it'll run under ngix.
Last updated
1-16 of 16