simple-php-router icon indicating copy to clipboard operation
simple-php-router copied to clipboard

About setRewriteCallback

Open riku22 opened this issue 3 years ago • 1 comments

Hello.

I am using throw new NotFoundHttpException(); within each route to raise an exception. However, I am having trouble with the Page not found string not being output even though I have set setRewriteCallback. I have created a code to reproduce this based on the demo project. Can you tell me what the cause is? The reproduction method is as follows.

  1. Set up a demo project.
    git clone https://github.com/riku22/simple-router-demo
    cd simple-router-demo
    git checkout rewrite_callback_test
    cd public
    php -S localhost:8080
    
  2. Open http://localhost:8080/users.
  3. It is expected that Page not found will be output, but nothing will be output.

I would appreciate any hints.

Very truly yours.

riku22 avatar Jan 31 '22 05:01 riku22

Hello,

Thank you for reporting this issue. I found the issue and created the PR #609. Now we have to wait for @skipperbent to merge.

~ Marius

DeveloperMarius avatar Feb 02 '22 10:02 DeveloperMarius