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

Unknown dependency Yii::$app->settings #33

Open
boehmi1988 opened this issue Dec 2, 2022 · 2 comments
Open

Unknown dependency Yii::$app->settings #33

boehmi1988 opened this issue Dec 2, 2022 · 2 comments
Assignees

Comments

@boehmi1988
Copy link

The code uses calls to Yii::$app->settings in different places, but Yii::$app->settings is not a native Yii2 component, so it crashes with
Exception (Unknown Property) 'yii\base\UnknownPropertyException' with message 'Getting unknown property: yii\web\Application::settings'

On which lib / extension does the code rely here? can it be added to composer.json ?

@Quexer69
Copy link
Contributor

Hi :)

thanks for reporting. indeed that is a non native component.

Yii::$app->settings in this case relies on https://github.com/phemellc/yii2-settings.

As a quick fix you can simply add

"pheme/yii2-settings": "*"

to your composer.json.

@schmunk42 @handcode what do you think ? Should we remove the dependency from code or add the settings module to the project?

Thanks in advance :)

@schmunk42
Copy link
Member

@schmunk42 @handcode what do you think ? Should we remove the dependency from code or add the settings module to the project?

Thanks in advance :)

Yeah, we'll take a look, but will be likely next year or you can come up with a PR, which makes this configurable or "use-when-installed".

The dependency should be in suggest in composer.json in the end.

CC: @eluhr @handcode @H-Algabri @a-klapper

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

4 participants