-
Notifications
You must be signed in to change notification settings - Fork 95
Add stubs for security factories #342
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
Conversation
b5320d6 to
cf085c8
Compare
cf085c8 to
e63e830
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When does it return a string and when does it return an array?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It depends on the concrete implementation, for example:
- string: https://github.com/symfony/symfony/blob/6.3/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/AccessTokenFactory.php#L70
- array: https://github.com/symfony/symfony/blob/6.3/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/CustomAuthenticatorFactory.php#L60
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Returning a string is treated the same than returning an array containing a single item by the Symfony code calling this factory. It allows to simplify the most common case which only needs to create a single authenticator.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ondrejmirtes is there anything else I can do?
Thank you!
1 similar comment
Thank you!
Uh oh!
There was an error while loading. Please reload this page.
ref symfony/symfony#49783