c9s/Pux

Route parameters error

Opened this issue · 9 comments

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);

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

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

c9s commented

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

does PR #111 fix this issue?

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 commented

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

c9s commented

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

c9s commented

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

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