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

Remove locale middleware #341

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Remove locale middleware #341

wants to merge 3 commits into from

Conversation

samdark
Copy link
Member

@samdark samdark commented Jan 18, 2025

Removing for now since it conflicts with file-router and is overall not really great.

Q A
Is bugfix?
New feature?
Breaks BC?
Fixed issues -

@samdark samdark requested a review from vjik January 18, 2025 10:58
Copy link
Member

@vjik vjik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Remove yiisoft/i18n dependency
  • Check Locale usage in code
  • Fix tests

@samdark
Copy link
Member Author

samdark commented Jan 19, 2025

Locale is automatically set via SetLocaleEventHandler and is used to configure translator and webview.

@samdark samdark requested a review from vjik January 20, 2025 12:33
@vjik
Copy link
Member

vjik commented Jan 23, 2025

Member

Seems, we can remove SetLocaleEventHandler, right?

Also need to remove middleware definition:

\Yiisoft\Yii\Middleware\Locale::class => [

@samdark
Copy link
Member Author

samdark commented Jan 23, 2025

It is used by translator but if you want to remove it as well, the yes. This part is to be removed.

@vjik
Copy link
Member

vjik commented Jan 23, 2025

It is used by translator but if you want to remove it as well, the yes. This part is to be removed.

SetLocaleEvent fired by Locale middlware. This middleware remove, so we can remove event handler also.

@samdark
Copy link
Member Author

samdark commented Jan 23, 2025

@vjik did more cleanup.

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.

2 participants