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

Passing vars to container call method #16

Closed
wants to merge 1 commit into from
Closed

Passing vars to container call method #16

wants to merge 1 commit into from

Conversation

ghost
Copy link

@ghost ghost commented Feb 9, 2015

If you are using MethodArgumentStrategy, it's impossible to use wildcard routes.
Let's say we have this route

$router->get('/test/{id:number}/{test:word}', function( $id, $test, Request $request) {
    //code
});

We are going to get this exception

RuntimeException: Cannot resolve argument [id], it should be provided within an array of arguments passed to [League\Container\Container::call], have a default value or be type hinted

Sorry, if I'm just being stupid and could not find another way to make it working, but to me it seems like you forgot to pass $vars to container call method.

@ghost ghost closed this Feb 9, 2015
@philipobenito
Copy link
Member

Planned improvement #12

This pull request was closed.
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

Successfully merging this pull request may close these issues.

None yet

1 participant