I am using PHP-DI with the Slim framework. In Slim you make a route segment optional by putting brackets around it. Now that I have set up PHP-DI when I leave out the optional route segment, I get this error:
Type: Invoker\Exception\NotEnoughParametersException
Message: Unable to invoke the callable because no value was given for parameter 1 ($limit)
Here is my route:
$app->get('/api2/products[/{limit}]', ['\App\Controllers\SampleProductController', 'show']);
I can't find anything in the PHP-DI docs that talk about the optional part, just how to get the value of a named segment.