Add the possibility to mention the URL to the MethodNotAllowedException
khalyomede opened this issue · comments
Khalyomede commented
Description
When throwing a MethodNotAllowedException
, it would be useful to be able to specify the URL that is not allowed for debug purposes.
Expected behavior
To be able to mention the URL like following:
use Folded\Exceptions\MethodNotAllowedException;
$exception = new MethodNotAllowedException();
$exception->setUrl("/")->setMethodNotAllowed("POST")->setAllowedMethods(["GET"]);
echo $exception->getUrl(); // string(1) "/"
Alternatives solutions
None.
Thomas Chapuis commented
Hey, I would like to work on this one !