Maurício Meneghini Fauth
c8c92467cb
Create the DatabaseServerVersionChecking middleware
...
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2023-08-16 20:51:26 -03:00
Maurício Meneghini Fauth
deb3214a55
Create the Authentication middleware
...
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2023-08-16 20:51:25 -03:00
Maurício Meneghini Fauth
73cb80c785
Create the LoginCookieValiditySetting middleware
...
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2023-08-16 20:51:25 -03:00
Maurício Meneghini Fauth
1be7f83e53
Create the DbiLoading middleware
...
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2023-08-16 20:51:25 -03:00
Maurício Meneghini Fauth
14ed470f7a
Create the LanguageAndThemeCookieSaving middleware
...
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2023-08-16 20:51:24 -03:00
Maurício Meneghini Fauth
5bee001cd5
Create the MinimumCommonRedirection middleware
...
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2023-08-16 20:51:24 -03:00
Maurício Meneghini Fauth
c827e2046b
Create the SetupPageRedirection middleware
...
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2023-08-16 20:51:24 -03:00
Maurício Meneghini Fauth
1710316b3a
Create the UrlRedirection middleware
...
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2023-08-16 20:51:23 -03:00
Maurício Meneghini Fauth
12c798e544
Create the ThemeInitialization middleware
...
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2023-08-16 20:51:23 -03:00
Maurício Meneghini Fauth
482b6cec5d
Create the GlobalConfigSetting middleware
...
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2023-08-16 20:51:23 -03:00
Maurício Meneghini Fauth
57abd78e67
Create the CurrentServerGlobalSetting middleware
...
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2023-08-16 20:51:22 -03:00
Maurício Meneghini Fauth
f267957000
Create the RequestProblemChecking middleware
...
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2023-08-16 20:51:22 -03:00
Maurício Meneghini Fauth
fe00ff509a
Create the ConfigErrorAndPermissionChecking middleware
...
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2023-08-16 20:51:22 -03:00
Maurício Meneghini Fauth
2436150610
Create the LanguageLoading middleware
...
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2023-08-16 20:51:21 -03:00
Maurício Meneghini Fauth
bef98ef679
Create the SqlQueryGlobalSetting middleware
...
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2023-08-16 20:51:21 -03:00
Maurício Meneghini Fauth
787b387901
Create the DatabaseAndTableSetting middleware
...
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2023-08-16 20:51:21 -03:00
Maurício Meneghini Fauth
d676267396
Create the TokenRequestParamChecking middleware
...
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2023-08-16 20:51:20 -03:00
Maurício Meneghini Fauth
7861ef389c
Create the UrlParamsSetting middleware
...
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2023-08-16 20:51:20 -03:00
Maurício Meneghini Fauth
7def2dffd1
Create the EncryptedQueryParamsHandling middleware
...
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2023-08-16 20:51:20 -03:00
Maurício Meneghini Fauth
1ee95d732d
Create the SessionHandling middleware
...
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2023-08-16 20:51:19 -03:00
Maurício Meneghini Fauth
4474cdb65c
Create the RouteParsing middleware
...
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2023-08-16 20:51:19 -03:00
Maurício Meneghini Fauth
6d8023afb1
Create the UriSchemeUpdating middleware
...
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2023-08-16 20:51:18 -03:00
Maurício Meneghini Fauth
a36c5ae3b7
Create the ConfigLoading middleware
...
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2023-08-16 20:51:18 -03:00
Maurício Meneghini Fauth
97aee0283e
Create the PhpSettingsConfiguration middleware
...
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2023-08-16 20:51:18 -03:00
Maurício Meneghini Fauth
eebbd6b3f1
Create the ServerConfigurationChecking middleware
...
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2023-08-16 20:51:14 -03:00
Maurício Meneghini Fauth
9e9611d162
Replace config global with Config singleton
...
This is as bad as the global variable, however at least will have better
static analysis of it.
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2023-08-15 01:11:54 -03:00
Maurício Meneghini Fauth
93fa48e286
Refactor the ServerRequest::getRoute() method
...
Extracts the redirection to database and table pages to the
HomeController for an actual redirection instead of an implicit one.
Removes the Application::getRequest() method as the ServerRequest object
should be an immutable object.
Adds a Routing::$route static variable to be used at the places that the
ServerRequest object is not available.
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2023-08-12 01:45:12 -03:00
Maurício Meneghini Fauth
a2b8c17c30
Pass a ServerRequest object to the 2FA plugin
...
Removes the Application::getRequest() call for the WebAuthn plugin.
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2023-08-11 11:50:17 -03:00
Maurício Meneghini Fauth
2ba2e80d39
Refactor ErrorHandler::dispFatalError() to use a Response object
...
Removes the dependency on ResponseRenderer for this method.
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2023-08-09 16:47:56 -03:00
Maurício Meneghini Fauth
54a080c15d
Create the OutputBuffering middleware
...
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2023-08-08 16:14:34 -03:00
Maurício Meneghini Fauth
5dc23aec19
Create the ErrorHandling middleware
...
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2023-08-08 16:14:34 -03:00
Maurício Meneghini Fauth
daad3ab13a
Add support for PSR-15 middleware
...
Creates the Http/Handler/QueueRequestHandler class to handle the
middleware queue.
Extracts the PHP extensions checking into a middleware.
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2023-08-08 16:14:34 -03:00
Maurício Meneghini Fauth
1f636fedbe
Create the Http\Handler\ApplicationHandler class
...
Uses the Laminas\HttpHandlerRunner\RequestHandlerRunner class to handle
the server request and the response emission.
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2023-08-08 16:14:33 -03:00
Maurício Meneghini Fauth
bfc3852e61
Create Http\Response::write() method to write to the body
...
This method helps when data is written to the body of the response and
the response object is returned immediately.
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2023-08-05 10:50:53 -03:00
Kamil Tekiela
e7ea833566
Move checkServerConfiguration before ini_set
...
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
2023-07-30 00:10:00 +01:00
Kamil Tekiela
68569a97c5
Remove func_overload check
...
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
2023-07-30 00:09:59 +01:00
Maurício Meneghini Fauth
6597dee724
Refactor the Routing::callSetupController() method
...
Changes the method so it return a Response object when possible.
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2023-07-26 21:33:43 -03:00
Maurício Meneghini Fauth
fb39be0a77
Refactor the Routing::callControllerForRoute() method
...
Changes the method to return a Response object when possible.
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2023-07-26 21:33:40 -03:00
Maurício Meneghini Fauth
ecf1c78ae8
Wrap the Application::run() code with a HTTP handler
...
- Uses laminas-httphandlerrunner to emit the Response object
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2023-07-26 21:31:49 -03:00
Maurício Meneghini Fauth
19dad3b153
Add a isAjax() method to ServerRequest class
...
This method belongs to the ServerRequest class instead of the
ResponseRenderer class, as it's a request property.
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2023-07-26 16:01:37 -03:00
Maurício Meneghini Fauth
239447fbc3
Refactor the Http\Factory\ServerRequestFactory class
...
- Implements Psr\Http\Message\ServerRequestFactoryInterface
- Add more unit tests
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2023-07-18 23:49:23 -03:00
Maurício Meneghini Fauth
50d97afd0e
Move Routing class to the Routing namespace
...
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2023-06-26 18:16:59 -03:00
Maurício Meneghini Fauth
f6e74de251
Extract some dependencies from the Application class
...
- Extracts the ErrorHandler, Config and Template dependencies from the
Application class.
- Loads HTTP ServerRequest object after loading the user config.
- Requires a Config object for the Template class.
- Disables Twig's cache if an exception is thrown before loading the
user config. This way a possible different cache directory will not be
used.
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2023-06-16 15:55:20 -03:00
Maurício Meneghini Fauth
951c965d6e
Change Application static methods to instance methods
...
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2023-06-13 16:36:31 -03:00
Maurício Meneghini Fauth
1aa8221276
Rename the Common class to Application
...
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2023-06-13 14:40:21 -03:00