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

if [yii\filters\ContentNegotiator] is in bootstrap it does not work #101

Open
mikk150 opened this issue May 8, 2024 · 1 comment
Open

Comments

@mikk150
Copy link

mikk150 commented May 8, 2024

IF I want to use yii\filters\ContentNegotiator in bootstrap(as it implements yii\base\BootstrapInterface and therefore I should be able to do so)

It unfortunately does not work as

Therefore it does not work

There are 2 solutions how to fix it

  1. Move Request making to L345 and remove L355-L363 entirely
  2. yii\filters\ContentNegotiator::bootstrap() should only register eventHandler on yii\base\Application on beforeAction event and handle it's own yii\filters\ContentNegotiator::beforeAction()
@samdark
Copy link
Collaborator

samdark commented May 9, 2024

I'd go way 1 since that's not touching framework itself. Do you have time for implementation?

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

No branches or pull requests

2 participants