1137 Commits

Author SHA1 Message Date
Simon Sessingø
8923beeacf Merge pull request #700 from skipperbent/v5-development
Version 5.4.1.6
5.4.1.6
2023-12-09 18:42:00 +01:00
Simon
3534233a76 Fixed included triggering on other request-types than post 2023-12-09 18:39:33 +01:00
Simon Sessingø
2a2152432a Merge pull request #699 from skipperbent/v5-development
Version 5.4.1.5
5.4.1.5
2023-12-09 05:39:59 +01:00
Simon
0f55480156 Fixed rewrite-route not being executed in rare instances 2023-12-09 05:36:30 +01:00
Simon Sessingø
0b01aa9ba9 Merge pull request #698 from skipperbent/v5-development
Version 5.4.1.4
5.4.1.4
2023-11-29 01:22:27 +01:00
Simon
99ed44eb1e Fixed setHost nullable value 2023-11-29 01:20:00 +01:00
Simon Sessingø
14c21998e9 Merge pull request #695 from skipperbent/v5-development
Version 5.4.1.3
5.4.1.3
2023-11-27 08:08:55 +01:00
Simon
565a926bd3 Remove port from hostname 2023-11-27 08:06:35 +01:00
Simon Sessingø
d75af212e9 Merge pull request #693 from skipperbent/v5-development
Version 5.4.1.2
5.4.1.2
2023-11-27 08:00:51 +01:00
Simon
64483652ff Strip any potential port number from hostname 2023-11-27 07:58:49 +01:00
Simon Sessingø
3c03f08edf Merge pull request #692 from skipperbent/v5-development
Version 5.4.1.1
5.4.1.1
2023-11-27 06:55:31 +01:00
Simon
d17ee96221 Added better handling of domains on urls. 2023-11-27 06:53:33 +01:00
Simon Sessingø
ef4756c45b Merge pull request #690 from skipperbent/v5-development
Version 5.4.1.0
5.4.1.0
2023-11-27 05:58:01 +01:00
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
Simon Sessingø
36dda20bbe Merge pull request #688 from skipperbent/v5-development
Version 5.4.0.1
5.4.0.1
2023-11-21 22:27:45 +01:00
Simon
a275366a90 Fixed inputhandler overwriting post-values 2023-11-21 22:25:06 +01:00
Simon Sessingø
e22ea70047 Merge pull request #686 from skipperbent/v5-development
Version 5.4.0.0
5.4.0.0
2023-11-21 16:15:48 +01:00
Simon Sessingø
4d1caddce4 Merge pull request #683 from ms-afk/bugfix-rewrite-route-executed-twice
Fixed rare double execution of rewrite routes in exception handler
2023-11-21 16:11:56 +01:00
Simon Sessingø
0970bd00c6 Merge pull request #682 from ms-afk/fix-readme-php-di
Fixed the php-di integration example in the README
2023-11-21 16:11:06 +01:00
Simon Sessingø
49b132da93 Merge pull request #672 from ATC-4K/patch-1
Added @return never to Response.php
2023-11-21 16:10:16 +01:00
Simon
08d78c8f71 Added support for input stream when not json encoded 2023-11-21 16:08:22 +01:00
ms-afk
5986dc9a08 fixed rare double execution of rewrite routes in exception handler
If a rewrite route is present, Router's method handleException will, currently, be adding that route to the processedRoutes array without removing the hasPendingRewrite flag. This leads to the associated callback being executed twice if the callback itself returns NULL. This happens because the handleRouteRewrite method, finding that hasPendingRewrite is still set to true, adds the rewriteRoute to the processedRoutes for a second time, before finally setting that flag to false.
2023-10-03 12:26:41 +02:00
Marco Scagnol
cdf165d0f4 Fixed the php-di integration example
The previous version of the example in the README used exceptions that were not imported (NotFoundHttpException) to wrap existing exceptions. I've adapted the example to be similar to the current version of Pecee\SimpleRouter\ClassLoader\ClassLoader. That includes returning strings from loadClassMethod and loadClosure and not wrapping every exception, thrown by the called functions, into NotFoundHttpException exceptions, as well as using the exception ClassNotFoundHttpException when a class cannot be found, instead of the generic NotFoundHttpException. I also changed the way the ClassLoader checks if the container can resolve the class by using the container's method "has" instead of the php function class_exists.
2023-09-30 16:22:52 +02:00
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
Simon Sessingø
cd891d5334 Merge pull request #671 from skipperbent/v5-release
V5 release
2023-05-06 21:14:29 +02:00
Simon Sessingø
7feb464af1 Merge pull request #670 from skipperbent/v5-development
Version 5.3.0.5
5.3.0.5
2023-05-06 21:11:12 +02:00
sessingo
d3b1577095 RouteResource: simplified the findUrl method (issue: #666) 2023-05-06 21:07:58 +02:00
Simon Sessingø
12b6e3c1ab Merge pull request #669 from skipperbent/v5-release
V5 release
2023-05-06 17:39:41 +02:00
Simon Sessingø
f085134ae3 Merge pull request #668 from skipperbent/v5-development
Version 5.3.0.4
5.3.0.4
2023-05-06 17:37:00 +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
Simon Sessingø
37f826f24c Merge pull request #664 from SunflowerFuchs/v5-development
Fixed Route::setUrl() behavior
2023-05-06 17:32:57 +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
Simon Sessingø
8ffa1088ab Merge pull request #662 from skipperbent/v5-release
V5 release
2023-04-24 20:08:29 +02:00
Simon Sessingø
9b8843aa08 Merge pull request #661 from skipperbent/v5-development
Reverted exception handling to old behavior (issue: #660)
5.3.0.3
2023-04-24 20:08:17 +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
Simon Sessingø
f565014dff Merge pull request #659 from skipperbent/v5-release
V5 release
2023-04-21 11:38:08 +02:00
Simon Sessingø
ad765b9856 Merge pull request #658 from skipperbent/v5-development
InputItem: php8.1 deprecated warning
5.3.0.2
2023-04-21 11:35:24 +02:00
sessingo
4778a8f29e InputItem: php8.1 deprecated warning-Added returnTypeWillChange to offsetGet 2023-04-21 11:28:19 +02:00
Simon Sessingø
97b61fb8bf Merge pull request #656 from skipperbent/v5-release
V5 release
2023-04-08 20:01:07 +02:00
Simon Sessingø
847cb3e273 Merge pull request #655 from skipperbent/v5-development
Version 5.3.0.1
5.3.0.1
2023-04-08 20:00:55 +02:00
Simon Sessingø
2b4ae2b211 Merge pull request #654 from skipperbent/v5-exception-handling
PHP8: better exception handling
2023-04-08 19:56:55 +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
Simon Sessingø
0ff9258776 Merge pull request #653 from skipperbent/v5-release
V5 release
2023-04-07 15:41:17 +02:00
Simon Sessingø
b937b610de Merge pull request #651 from skipperbent/v5-development
Version 5.3.0.0
5.3.0.0
2023-04-07 15:41:04 +02:00
Simon Sessingø
5ac747374b Merge pull request #652 from skipperbent/fix-tostring
[BUGFIX] String return type
2023-04-07 15:38:41 +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
Simon Sessingø
c635771fcd Merge pull request #650 from skipperbent/v5-fix-exception
[BUGFIX] Exception handling improvements
2023-04-07 14:35:56 +02:00