-
Notifications
You must be signed in to change notification settings - Fork 448
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add PHP error page and application env config value #10027
Comments
@asmecher, before moving forward with PRs, what are your thought son how to determine if something is "in production" or not? |
In my local environment, I'd rather use Then, it might be interesting to allow an administrator to enable this debugger through the administrative page, probably assign the access to an auto-expiring token (maybe using a cookie name/value or session ID as "password" to avoid data leakage). |
I also support adding a config variable However for debugging purpose, laravel use mainly |
For discussion during the next hackfest: I'd like to move 404 handling over to Symfony exceptions (which Laravel also uses for the purpose). Some experimentation to accomplish this:
Of course, something will have to catch these exceptions, which is the work in question over here! |
@touhidurabir, @ewhanson, tagging you because we talked about this a long time ago -- I've replaced the old I didn't want to make this elaborate because we'll be switching this over to Laravel's toolset at some point, but I did add a new hook -- |
New Laravel projects include an excellent error page, Spatie's Ignition package, to render out PHP errors in local development. This would be a great addition to OJS/OMP/OPS for local development.
This would require adding the concept of an application enviornment to OJS, similar to the
APP_ENV
context in Laravel. I propose adding a new item under the[general]
section in the config file for anapp_env
key that can either beproduction
ordevelopment
. Theconfig.TEMPLATE.inc.php
should default to production and any checks within the application should default to this as well, i.e.Config::getVar('general', 'app_env', 'production')
.This will allow us to make use of the error page in local development while ignore it in production.
Example screenshot from OJS.
The text was updated successfully, but these errors were encountered: