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

[BUG] - PHPStan error for CallableRouterInterface #423

Open
piqusy opened this issue Aug 23, 2024 · 2 comments
Open

[BUG] - PHPStan error for CallableRouterInterface #423

piqusy opened this issue Aug 23, 2024 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@piqusy
Copy link
Contributor

piqusy commented Aug 23, 2024

public function routeCallback(WP_REST_Request $request);

PHPStan throws the following error: {namespace}Vendor\EightshiftLibs\Rest\CallableRouteInterface::routeCallback() has parameter $request with generic class WP_REST_Request but does not specify its types: T () [phpstan] phpstan [32, 1]

@piqusy piqusy added the bug Something isn't working label Aug 23, 2024
@mbmjertan mbmjertan changed the title [BUG] - PHPStan error for CallabelRouterInterface [BUG] - PHPStan error for CallableRouterInterface Aug 23, 2024
@mbmjertan
Copy link
Collaborator

This happens directly in CallableRouteInterface or an implementing class? Can you share the function signature for the routeCallback method in your implementing class?

@piqusy
Copy link
Contributor Author

piqusy commented Aug 23, 2024

Both places, but ran into this when generating the rest-route-load-more class via CLI so you can check by generating your own with wp boilerplate create rest-route-load-more

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants