-
Notifications
You must be signed in to change notification settings - Fork 179
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
Use New Router #3584
Use New Router #3584
Conversation
The Get* files are handled by module prefix routers and no longer necessary
instanciation of Http\Error Exception catching for Notfound throw a NotFound exception for non existing class in module
The Get* files are handled by module prefix routers and no longer necessary
@PapillonMcGill I think I've addressed the issues with the data team helper module, but I'm not familiar enough with the module and the test plan doesn't have enough detail to know if it's working properly (but the links are definitely working better than before.) @xlecours @ridz1208 This is now passing Travis (Finally!), so it can be reviewed. |
@driusan Datahelper now report that "This page (pagename) is under construction" |
@PapillonMcGill Neither the test plan nor the code for the |
@PapillonMcGill I don't think it's worth spending a lot of time on reliability, because it's a one project module that just can't be removed from LORIS because it can't be fully converted to a standalone module (yet, due to dependencies on NDB_Caller), but I managed to get one reliability instrument to load with the latest commit, it just falls back on main.php (like instruments for now) until it's properly converted. |
return true; | ||
} else { | ||
$Factory = NDB_Factory::singleton(); | ||
$DB = $Factory->Database(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the database function is lowercase
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Feels like a leap of faith but I know it should work. And The Travis do not complain.
@xlecours Can you re-approve? No changes, but I merged aces/major to fix the conflicts.. |
@driusan, I will wait for the Travis fixes to get in. |
This updates LORIS to use the PSR15 RequestHandler/Middleware based router that was implemented in PRs #3477, #3480, and #3513.
Most of the mod_rewrite rules, main.php, and NDB_Caller are replaced by a new index.php, which generates a PSR7 ServerRequestInterface and delegates to the module's Module handler.
AjaxHelper.php remains, but is deprecated, as existing scripts will need to be updated to be proper endpoints in the module's router. (Once this is done, the separate router.php for PHP's built in web server can also be removed, and mod_rewrite dependency for LORIS can be removed.)
main.php and NDB_Caller also remain for now in order to load instruments. Once an instrument module is implemented to handle the instruments routers, they can be removed.
Note that instrument URLs also change from $LORIS/instrumentname to $LORIS/instruments/instrumentname as part of this PR.