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

Update docs for array-notation routes #560

Merged
merged 1 commit into from
May 20, 2021

Conversation

ddrv
Copy link
Contributor

@ddrv ddrv commented Apr 18, 2021

Update docs for slimphp/Slim#3069

@odan
Copy link
Contributor

odan commented Apr 18, 2021

Hi @ddrv

I'm not sure if this is really officially supported by Slim.

When I try this:

$app->get('/', [\App\Action\Home\HomeAction::class, '__invoke']);

I get this error message because is_callable return false:

App\Action\Home\HomeAction, __invoke is not resolvable in
 vendor\slim\slim\Slim\CallableResolver.php on line 165

This is because is_callable requires an object instead.

Demo: https://3v4l.org/vUN3m

https://www.php.net/manual/en/function.is-callable.php

Edit: I just saw your other PR a little to late.

@ddrv
Copy link
Contributor Author

ddrv commented Apr 18, 2021

@odan Hi!

I send this Pull Request to update the docs after merging the Pull Request to framework code . I should have said this in the description, sorry

@l0gicgate
Copy link
Member

@odan this feature will be upcoming in 4.8 see slimphp/Slim#3069

@odan
Copy link
Contributor

odan commented Apr 19, 2021

@l0gicgate Yes, I just noticed that after I wrote my comment 😄

@l0gicgate l0gicgate merged commit 2e87f6f into slimphp:gh-pages May 20, 2021
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

3 participants