Simon
ed1ed43484
- Fixed domains not being prepending properly to urls.
...
- Won't prepend subdomain to urls if subdomain is equal to current host.
- Url: implemented parse function.
- Router: getUrl now parses url to properly parse the subdomain.
2023-11-27 05:52:10 +01: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
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
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
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
Stefan Warnat
06a63eb0e7
Fix Typo
2021-10-04 02:02:45 +02:00
Stefan Warnat
5268a998ff
Extend domain filter to support fixed subdomain and domain parameter
2021-10-04 01:49:42 +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ø
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ø
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ø
f863f931d8
Fixed php8 php-unit tests compatibility.
2021-05-18 18:08:41 +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ø
ca8fbf2b27
Merge pull request #531 from skipperbent/v4-feature-ip
...
[FEATURE] IP restrict access
2021-04-01 02:35:40 +02:00
Simon Sessingø
8b11377fe8
Fixed typo
2021-03-31 03:25:35 +02:00
Simon Sessingø
eccda10169
Added prependPrefix to Group class & updated documentation.
2021-03-31 03:23:04 +02:00
Simon Sessingø
dca0389115
Merge branch 'v4-development' into v4-feature-ip
2021-03-31 03:00:16 +02:00
Simon Sessingø
b0e4becbba
Merge branch 'v4-development' of github.com:skipperbent/simple-php-router into v4-development
2021-03-31 02:36:48 +02:00
Simon Sessingø
0e393fdc5f
Minor changes
...
- Added better description of partialGroups in the documentation.
- Added custom base path example in documentation.
- Added isSubRoute event parameter for EVENT_ADD_ROUTE.
- Removed deprecation phpDoc from partialGroup.
- Added unit-test for adding custom base path.
2021-03-31 02:31:56 +02:00
Simon Sessingø
50b7129cab
Changed name of IpBlockAccess to IpRestrictAccess & updated documentation.
2021-03-30 20:44:40 +02:00
Simon Sessingø
57047d23ea
[FEATURE] Ip access block
2021-03-30 20:38:18 +02:00
Simon Sessingø
a98b5ba842
Fixed unit-tests for CsrfVerifierTest
2021-03-30 18:54:45 +02:00
Simon Sessingø
b3d28e9432
[FEATURE] Added include åproperty to BaseCsrfVerifier + unit tests.
2021-03-30 18:49:37 +02:00
Simon Sessingø
dd9a6eab7d
[FEATURE] Added class + method loading to IClassLoader.
2021-03-29 22:15:55 +02:00
Simon Sessingø
adc879bb13
[BUGFIX] Fixed InputHandler::find and InputHandler::value failing when using array methods.
2021-03-29 18:45:49 +02:00
Simon Sessingø
c423172c23
Added deep parameters pass unit-test
2021-03-29 17:10:12 +02:00
Simon Sessingø
d6d83ac5bd
Parameters are now correctly passed on to sub-routes
2021-03-29 17:05:45 +02:00
Simon Sessingø
b05bbccc28
[FEATURE] Added support for parameters in group prefix.
2021-03-29 16:56:37 +02:00
Simon Sessingø
8eba5ab3d5
[FEATURE] php8 compatibility.
...
- Fixed possible error causing parameters not to be set properly when using partialGroup.
- Removed unused import reference.
- Added unit-tests.
2021-03-29 15:11:58 +02:00
Simon Sessingø
073479f9dd
[BUGFIX] Fixed group not matching domain with no parameters (issue: #468 ).
...
- Added unit-tests
2021-03-26 01:32:01 +01:00
Simon Sessingø
d9cfa71534
Fixed naming in unit-tests.
2021-03-25 14:21:30 +01:00
Simon Sessingø
cf6750aaf3
[FEATURE] Optimised Request::getIp method
...
- Added unit-tests for Request::getIp
- Optimised existing RequestTest unit-tests.
2021-03-25 14:18:56 +01:00
Simon Sessingø
8835aca02e
[FEATURE] Added Request::getContentType for content-type header-parsing
...
- Added unit-tests for Request::getContentType parsing.
2021-03-25 13:09:23 +01:00
Simon Sessingø
86bb88a41f
[FEATURE] Added better support for nested file/arrays in InputHandler.
...
- Added unit tests for file arrays
- Removed legacy .yml configs
2021-03-25 05:58:49 +01:00
Simon Sessingø
fdf11bbc9c
Merge pull request #517 from DeveloperMarius/file-tests
...
PHPUnit file tests
2021-03-25 04:34:29 +01:00
Simon Sessingø
2b9403db28
Features & bugfixes
...
- Feature: added new getFirstHeader to Request object that will return the first header found from array list- used to simplify the code.
- Feature: added new InputHandler::getValueFromArray method that loops through input-items to ensure that value is always returned.
- Fixed calling getUrl with array as parameters option throws error.
- Fixed `SimpleRouter::getUrl` having wrong nullable return type.
2021-03-25 03:41:11 +01:00
DeveloperMarius
3e1333ccd4
Defined variables for the file data
2021-03-24 13:32:15 +01:00
DeveloperMarius
fef65313e5
Added file content test for all platforms
2021-03-24 13:20:41 +01:00
DeveloperMarius
5624c4b2bb
testFiles and test file content on server
2021-03-24 13:11:07 +01:00
Simon Sessingø
db63aff668
Updated php-unit to version 9
2021-03-23 15:20:05 +01:00
Simon Sessingø
a33f2f7e7a
Merge branch 'v4-development' into v4-disable-multi-routing
2021-03-23 15:00:01 +01:00
Simon Sessingø
2689486e64
Merge pull request #509 from skipperbent/v4-request-same-routes
...
[BUGFIX] Issue #439 : Fixed multiple request-type on same routes.
2021-03-23 14:57:17 +01:00
Simon Sessingø
dfc12d07b0
Merge pull request #508 from skipperbent/v4-bootmanager-fix
...
[BUGFIX] BootManager findRoute not working.
2021-03-23 14:56:16 +01:00
Simon Sessingø
680e0256c3
Merge branch 'v4-development' into feature-default-namespace
2021-03-23 14:52:39 +01:00
Simon Sessingø
a44a93d705
[!!!][FEATURE] Removed php-di as suggested by #477
...
NOTE: Custom class-loader should be used to create custom integrations with frameworks like php-di. See documentation for more information.
- Removed all references to php-cli from composer + code.
- Added ClassLoader php-unit tests.
2021-03-23 00:46:17 +01:00
Simon Sessingø
1d2e5f47d9
[FEATURE] Option to disable multi-route rendering
...
- Added option to disable multi-route rendering by calling `Router::setRenderMultipleRoutes($bool)`.
- Added alias for easier access `SimpleRouter::enableMultiRouteRendering($bool)`.
- Added php-unit tests for multi-routing enabled and disabled.
2021-03-22 19:34:55 +01:00
Simon Sessingø
f74252e8cc
Removed newline
2021-03-22 18:34:14 +01:00