Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Route parameters error #112

Open
caferyukseloglu opened this issue Mar 1, 2023 · 9 comments
Open

Route parameters error #112

caferyukseloglu opened this issue Mar 1, 2023 · 9 comments

Comments

@caferyukseloglu
Copy link
Contributor

caferyukseloglu commented Mar 1, 2023

Hi, updated 1.6 to 2.0 I am trying to get a rout with someroute/:param1/:param2 my controller catches first param as array and second null. This is how I do the excute;

$router = new Mux;
$router->get('/someroute/:param1/:param2', ['\Api\Controller\SomeController', 'getSometing'], ['scope' => 'default']);
$route = $router->dispatch($incomingURL);
$result = RouteExecutor::execute($route);

@caferyukseloglu
Copy link
Contributor Author

@c9s

@caferyukseloglu
Copy link
Contributor Author

This function => public static function execute(array $route, array $environment = [], array $response = [])
The options here not returning in callback [$pcre, $pattern, $callbackArg, $options] = $route;

@caferyukseloglu
Copy link
Contributor Author

caferyukseloglu commented Mar 1, 2023

This is not working as expected, I am using 1.6 Executor for now
MotaWord@eb55975

@c9s
Copy link
Owner

c9s commented Mar 28, 2023

@caferyukseloglu sorry for the late reply, was too busy last month

does PR #111 fix this issue?

@caferyukseloglu
Copy link
Contributor Author

Hi, no, I had to get old function running in new one, so my system works RN. The options never used in new one MotaWord@eb55975

@c9s
Copy link
Owner

c9s commented Mar 28, 2023

Oh, i recalled that 2.0 was actually under development and it's incomplete.

@c9s
Copy link
Owner

c9s commented Mar 28, 2023

it's like almost 9 years ago and I have already forgot what I was implementing LOL

@c9s
Copy link
Owner

c9s commented Mar 28, 2023

I guess it's related to PHPSGI, to make it compatible with PHPSGI

@caferyukseloglu
Copy link
Contributor Author

Lol I have been there, you can use old RouteExecutor.php it is fine

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants