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
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
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
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
f8cd1c258d
Extract Http\Factory\UriFactory from ServerRequestFactory
...
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2023-07-18 20:11:22 -03:00
Maurício Meneghini Fauth
2640d7b50d
Refactor the Http\Factory\ResponseFactory class
...
- Implements PSR-17 ResponseFactoryInterface
- Adds a static factory method
- Adds support for the httpsoft/http-message package
- Adds unit tests
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2023-07-18 17:37:29 -03:00
Maurício Meneghini Fauth
cef49dc8c3
Create the Http\Response class
...
Implements the Psr\Http\Message\ResponseInterface PSR-7 interface.
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2023-07-15 17:25:04 -03:00
Kamil Tekiela
3774c29604
Fix implicit nulls
...
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
2023-03-17 12:45:18 +00:00
Kamil Tekiela
555c6798eb
Add native param types
...
Includes TypeHints.UnionTypeHintFormat
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
2023-03-17 12:45:18 +00:00
Maurício Meneghini Fauth
556594b4cd
Fix coding standard spacing issues
...
- Fixes one line doc comments
- Fixes parent call spacing
- Fixes constant spacing
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2023-02-24 21:06:17 -03:00
Maurício Meneghini Fauth
77957a69a5
Add trailing comma for multi-line functions
...
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2023-02-24 20:48:46 -03:00
Kamil Tekiela
902d1a1e77
Add native return type hints ( #18126 )
...
* Add remaining native return type hints to flush out bugs
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
* Cast the mixed value to int
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
* Fix tests
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
* getAutoIncrement() is supposed to return string
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
* Cast values to string in DummyResult
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
* Make getCollation() return non-nullable string
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
* Cast seqInIndex to int
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
* Cast $cardinality to int
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
* createFile may return false
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
* Remove redundant cast
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
* Update baselines
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
---------
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
2023-02-23 15:43:36 -03:00
Maurício Meneghini Fauth
4ff3724c3f
Use union with null instead of short nullable type
...
Since union type are now possible, using union with null makes more
clear that it is a union type.
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2023-02-20 21:48:19 -03:00
Maurício Meneghini Fauth
785f8c1c00
Use constructor property promotion where possible
...
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2023-02-20 19:39:02 -03:00
Kamil Tekiela
8a1d6f1eaa
Convert var annotations to typed properties
...
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
2023-02-12 21:31:04 +00:00
Maurício Meneghini Fauth
93c77c3784
Merge branch 'QA_5_2'
...
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2023-01-24 11:23:53 -03:00
William Desportes
89adbcfe9b
Fix PSR-7 implementation for GET and test implementation for POST
...
Signed-off-by: William Desportes <williamdes@wdes.fr>
2023-01-20 13:17:12 +04:00
Maurício Meneghini Fauth
5708596146
Merge branch 'QA_5_2'
...
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2022-12-24 13:52:00 -03:00
Maurício Meneghini Fauth
4e49c7760a
Add support for more PSR-7 packages
...
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2022-12-19 01:40:05 -03:00
Kamil Tekiela
959849f446
Introduce ServerRequest::hasBodyParam() ( #17870 )
...
* Drop Sql::setUiProp()
* Remove ternary operator
* Improve array guard
* Remove redundant isset
* Implement hasBodyParam()
* Add has() and hasQueryParam()
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
2022-11-05 13:04:45 -03:00
Maurício Meneghini Fauth
4cd6b23007
Add Http\ServerRequest::getQueryParam method
...
Similar to the Http\ServerRequest::getParsedBodyParam method, this
method retrives a single parameter from the request query, or the
default value if not available.
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2022-10-10 23:00:33 -03:00
Maurício Meneghini Fauth
eb3703882b
Move Routing::getCurrentRoute to ServerRequest
...
The route is retrieved from the request, so it makes sense to move the
method to the Http\ServerRequest class.
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2022-06-06 23:36:57 -03:00
Maurício Meneghini Fauth
1a2d7804d2
Add ServerRequest::getParsedBodyParam method
...
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-07-06 12:24:02 -03:00
Maurício Meneghini Fauth
d2eeebef34
Add getParam and isPost methods to ServerRequest
...
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-07-05 13:38:17 -03:00
Maurício Meneghini Fauth
27a5792976
Add PhpMyAdmin\Http\ServerRequest class
...
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-07-04 15:48:23 -03:00
Maurício Meneghini Fauth
6f894e7ea7
Add support for PSR-7 request objects in controllers
...
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-07-03 18:54:42 -03:00