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
TypeError: Argument 7 passed to Symfony\Component\Security\Http\Firewall\ContextListener::__construct() must be callable or null, array given #40334
Comments
Thank you for a detailed issue. |
Hi @Nyholm thank you please find below the security config
|
I've been looking but I cannot find anything... I was hoping someone with more knowledge than me could spot the misstake. Could you create a minimum symfony application that reproduces this issue? Ie , create a new repo, run |
@Nyholm I will try to reproduce it, in a small repo, I will give it a try and update here. |
@ccvf2s Did you manage to work on an example application? |
I am going to close here for now due to the lack of feedback. Please let us know when you have more information and we can consider to reopen. |
Hi Guys,
I am getting the error above on
Symfony version(s) affected: 4.4.19
Description
When running my test after upgrading to the last version to Symfony
4.4.19
, I am getting this error:How to reproduce
It's a bit difficult to say appropriately how to reproduce it, but I can show you the way my test is written.
It's failing on the line
$client->request('GET', '/api/v1/public/company/4320/review-token');
Effectively when checking the ContextListener constructor signature method the 7th argument is type-hinted as a callable and not an array.
Possible Solution
When I removed the type-hint of callable it suddenly worked, I guess the correction here should be to pass a callable or remove the type-hint.
Additional context
Composer version:
composer show|grep security
The cached
getSecurity_ContextListener_0Service.php
file:In the past, another issue was opened with the same error please find below the link of the correction which was surely not the same context as it looks like this one was solving the type of
TokenStorage
.Previous issue: #36720
Correction: https://github.com/symfony/symfony/pull/38869/files#diff-eb942086a7d2fce031f42c8a40f7926e3f89c1300cb8930a3e1b54e089a4db9bR52
Thanks a lot for the help which is going to be provided.
Feel free to let me know if I need to give more information and context.
The text was updated successfully, but these errors were encountered: