Revision 4.1.10 is out!

Actually, it came out a few days ago, but I am late with the announcement. The main focus was, again, with the error handling system.

Previously, PHP7 users were getting a generic “Slim Application Error” for error Throwables. This is because Slim apparently has a separate handling system for these types of non-Exception Throwables which we had failed to override. We’ve changed this, so now all non-Exception Throwables are passed through to our error-handling system. Please note that this means that the ExceptionHandlerInterface has changed slightly, and we have removed the strict typing of method arguments that used to take an Exception. This is so that handlers can now accept either an Exception or a more generic Throwable (depending on whether you are using PHP 5.x or PHP 7.x).

In this vein, we’ve also implemented our own NotFoundException so that we don’t need to rely on Slim’s notFoundHandler. Slim’s notFoundHandler will now generate one of our own NotFoundExceptions and then pass it through to our error-handling system.

We’ve also deprecated the determineRedirectOnLogin service, replacing it with redirect.onLogin and adding redirect.onAlreadyLoggedIn to allow overriding of redirects when a user tries to visit certain pages while already logged in.