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 restriction for params prefixing in packages #41

Closed
samdark opened this issue Apr 4, 2021 · 2 comments
Closed

Remove restriction for params prefixing in packages #41

samdark opened this issue Apr 4, 2021 · 2 comments

Comments

@samdark
Copy link
Member

samdark commented Apr 4, 2021

Problem

Currenty there is a rule to prefix package parameters with a package name https://github.com/yiisoft/docs/blob/master/000-packages.md#configs-and-defaults. That's mostly great but not always convenient. There could be parameters shared by multiple services. For example, it is convinient when:

  • language parameter is shared for translator and view.
  • db parameter is shared for yiisoft/db and yiisoft/yii-cycle connection.

Proposal

  1. Remove such limitation from docs, leave it as suggestion.
  2. Choose common parameter names.
@vjik
Copy link
Member

vjik commented Apr 22, 2021

Hm... seems this is not problem.

We can use current naming conventions in packages, but in application template and demo application use params on app level. For example, in app create $params['language'] and use this param for translator and view.

@samdark samdark closed this as completed Apr 27, 2021
@samdark
Copy link
Member Author

samdark commented Apr 27, 2021

Agree.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants