ATC-4K
adfe70f191
Added @return never to Response.php
...
In PHP8.1 instead of :void :never would be returned.
As this project is PHP7.4 compatible, we add it as a PHPDOC, so IDEs using this project will no longer complain and automatic checks will successfully detect dead code after calling a redirect()
2023-07-10 21:16:32 +02:00
sessingo
d3b1577095
RouteResource: simplified the findUrl method (issue: #666 )
2023-05-06 21:07:58 +02:00
Simon Sessingø
00d1c534de
Merge pull request #667 from skipperbent/fix-resource-parameters
...
Resource-type not respecting parameters when using getUrl (issue: #666 )
2023-05-06 17:33:53 +02:00
sessingo
f3c6015a59
Fixed Resource-type not respecting parameters when using getUrl (issue: #666 )
2023-05-06 17:29:33 +02:00
Pascal Pirschel
b2851e41f1
Fixed Route::setUrl() behavior
...
When there are no parameters in the url, correctly empty the routes parameter array
2023-05-05 13:48:26 +02:00
sessingo
e105f266e3
Fixed typo
2023-04-24 20:05:33 +02:00
sessingo
a49d7c13b6
Reverted exception handling to old behavior (issue: #660 )
2023-04-24 20:03:15 +02:00
sessingo
4778a8f29e
InputItem: php8.1 deprecated warning-Added returnTypeWillChange to offsetGet
2023-04-21 11:28:19 +02:00
sessingo
fa05d64a76
PHP8: better exception handling
...
Looks like PHP8 handles exceptions differently with Throwables used in cases where php-error occoured.
To fix this Throwable are now used to catch exception in routeRequest and any instance of Throwable will be converted to Exception.
2023-04-08 19:49:51 +02:00
sessingo
d6642a7f7b
Changed behavior of router to always exspect returned output to be string.
2023-04-07 15:30:24 +02:00
Simon Sessingø
ebf9224407
Merge pull request #649 from skipperbent/feature-csrfverifier
...
[!!!] CsrfVerifier changes
2023-04-07 14:36:13 +02:00
sessingo
aa654a3ac6
[BUGFIX] Fixed exception-handler rewrite not always triggered
2023-04-07 13:05:27 +02:00
sessingo
6c6d81d3c9
[!!!] CsrfVerifier changes
...
- [!!!] Made $except and $include array not nullable.
- Added more customizable BaseCsrfVerifier. Can now be used as ticket for no hotlinking etc.
2023-04-06 13:09:26 +02:00
sessingo
8c79b74e14
Bugfixes
2023-04-02 03:22:38 +02:00
sessingo
5946397c15
[!!!] Added type definitions to property types
...
- Request: optimized getIp method and reversed the order so proxy is always checked first.
2023-04-02 03:10:27 +02:00
sessingo
c622ef97b0
[BUGFIX] Fixed SESSION not shutdown correctly when using redirect.
...
- Disabled multiple route rendering by default.
2023-03-30 16:15:06 +02:00
sessingo
4a7360909c
Fixed for PHP7
2023-03-25 02:24:19 +01:00
sessingo
74c52931e9
Ending trail/slash feature
...
- Feature: added support for slash in parameters (see readme).
- Route: Fixed hardcoded param modifier.
- Route: optimisations.
- Updated Readme.
2023-03-25 02:20:06 +01:00
sessingo
5ab5087f8e
Fixed CSRF-token not triggering exception handlers.
2023-02-13 13:59:49 +01:00
sessingo
941149d8d7
Fixed deprication warnings
2023-02-11 17:31:00 +01:00
sessingo
20e00efbed
Php8 deprication warning
2023-02-11 17:16:40 +01:00
sessingo
7dd176a771
Fixed strtolower php8 deprication warning
2023-02-10 22:47:45 +01:00
sessingo
abda9d468b
Fixed deprication message when using response()->json
2023-02-10 08:48:58 +01:00
sessingo
23a29ce5d1
Fixed php strtolower deprication warning
2023-02-10 06:10:29 +01:00
sessingo
e34fe47a04
Fixed offsetGet return type deprication warning
2023-02-09 03:29:41 +01:00
Simon Sessingø
e38a406957
Merge pull request #594 from redoonetworks/dymanic-domain
...
Dynamic domain, fixed Subdomain
2023-02-09 02:32:18 +01:00
Simon Sessingø
b82e29c864
Merge pull request #614 from DeveloperMarius/non-ascii-chars-urlencoding
...
urlencoding issue with non-ASCII chars in request-uri header
2023-02-09 02:29:25 +01:00
DeveloperMarius
301c2cfe4a
fixed urldecode request-uri header
2022-03-01 15:39:31 +01:00
Hannes
01bad94af0
Update Router.php
2022-02-02 15:20:23 +01:00
Hannes
a1d5f38af7
Add function to fetch currect processing route
2022-01-02 21:59:39 +01:00
Hannes
b5e42dbdfb
Make current processing rule accessible
...
Adds an constant with the data from the current processing rule to make it globally accessible, f.e. in middleware objects
2022-01-02 14:42:43 +01:00
Stefan Warnat
5268a998ff
Extend domain filter to support fixed subdomain and domain parameter
2021-10-04 01:49:42 +02:00
Simon Sessingø
5dd0690009
Fixed issue causing group prefix to trigger on paths without "/" (issue #573 - thanks @Venloress).
2021-07-18 01:41:26 +02:00
Simon Sessingø
0d8915b206
Fixed return type.
2021-07-17 21:52:00 +02:00
Simon Sessingø
b54a25804a
Added group attribute to stop router from merging exception-handlers (issue: #573 )
...
- Added new mergeExceptionHandlers attribute to stop router from merging exception-handlers.
- RouteGroup: Added setMergeExceptionHandlers and getMergeExceptionHandlers methods.
- IRouteGroup: Added setMergeExceptionHandlers and getMergeExceptionHandlers method.
- Updated documentation to reflect changes.
- Added unit-tests.
2021-07-17 21:46:05 +02:00
Simon Sessingø
b3c135c723
Development
...
- Fixed DebugHandler::fireEvent not providing correct arguments when calling fireEvents.
- Fixed custom regex setMatch not setting parsed parameters correctly (issue: #566 ).
- Added unit-tests for catching issue in the future.
- Added php-stan typehints.
2021-06-15 10:11:09 +02:00
Simon Sessingø
22606dfc12
Updates
2021-06-09 09:13:11 +02:00
Simon Sessingø
5cd6cab801
Development
...
- Fixed issue causing default-namespace to add duplicate namespace when using type-hints (issue: #561 ).
- Fixed phpstan issues.
- Tests: Fixed TestRouter not resetting namespace upon reset.
- Tests: Added NSController (namespace controller) class.
- Tests: added test for class hint + default namespace case.
- Composer: added phpstan support + configuration.
- Composer: updated phpunit version.
2021-06-09 08:54:24 +02:00
Simon Sessingø
4dff4006bf
Merge pull request #558 from skipperbent/v4-exists-array
...
Added support for InputHandler::exists to check array of indexes.
2021-05-20 15:15:51 +02:00
Simon Sessingø
eea30d0f59
Simplified RouteController and RouteResource by moving common group-match code to parent method.
2021-05-20 15:15:26 +02:00
Simon Sessingø
ece9d30905
Added support for InputHandler::exists to check array of indexes.
...
- Updated documentation to reflect changes.
2021-05-20 15:03:56 +02:00
Simon Sessingø
4c5f825c97
Fixed issue with SimpleRouter::error not firing within group (issue: #551 ).
...
- Fixed variable incorrect variable reference in `InputItem` class.
- Added new `Router::addExceptionHandler` method.
- Added parameter types in `Url` class.
- Fixed phpdoc parameter-type for `Request::getHeader`.
2021-05-19 22:00:42 +02:00
Simon Sessingø
e057a76153
Removed unused variable.
2021-05-19 04:41:36 +02:00
Simon Sessingø
f7f1f1e3de
Fixed issue causing SimpleRouter::exception helper not to work when used within a group (issue: #551 )
2021-05-19 04:31:50 +02:00
Simon Sessingø
0d6326dfbb
InputHandler optimisations.
...
- InputItem can now be used like array (for example: input()->get('items')[0]) if value is array.
- Changed default-value parameter for get, post, file can now be mixed to allow object as return-type.
2021-05-18 18:00:18 +02:00
Simon Sessingø
d6bd9bbd72
Development
...
- [FEATURE] Namespace overwrite now works globally. 'Service¨' will append namespace whereas '\Service' will overwrite it.
- [FEATURE] Exceptionhandlers are now rendered in reverse order from newest to oldest. This allows for exceptions to be handled from parent exceptions which were otherwise ignored.
- Fixed incorrect return type for InputFile::getError to nullable int.
- Added return type to all, match, controller and resource in SimpleRouter class.
- Fixed incorrect usage of parse_str in Url::setQueryString method.
- Fixed incorrect expected value in array_flip in Url::removeParams method.
2021-05-02 13:48:13 +02:00
Simon Sessingø
c66d7f7df7
Fixed deprecated notice when using class type hinting (issue: #538 )
2021-04-28 09:57:47 +02:00
Simon Sessingø
718d60c53b
Removed return type from IResourceController as the return type can be mixed.
2021-04-04 11:21:26 +02:00
Simon Sessingø
ecbb0825e0
Added include param parameter to Url::getAbsoluteUrl method.
2021-04-01 03:14:22 +02:00
Simon Sessingø
b94dc4355f
Optimisations
2021-04-01 03:11:05 +02:00