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

Fix parameter name in ConfigCommands::__constructor() #5379

Merged
merged 5 commits into from
Feb 15, 2023
Merged

Fix parameter name in ConfigCommands::__constructor() #5379

merged 5 commits into from
Feb 15, 2023

Conversation

Chi-teck
Copy link
Collaborator

This currently triggers the following notice on PHP 8.2.

Deprecated function: Creation of dynamic property Drush\Drupal\Commands\config\ConfigCommands::$configStorage is deprecated in Drush\Drupal\Commands\config\ConfigCommands->__construct()

@Chi-teck
Copy link
Collaborator Author

Well, I am not actually certain if the provided fix is correct. Seems like configStorage and configStorageExport are used independently.
Here is the PR where this change was introduced #4201.

@weitzman
Copy link
Member

@bircher Thoughts?

@bircher
Copy link
Contributor

bircher commented Feb 15, 2023

No this is not correct. A more correct fix would be to explicitly define protected $configStorage. The export storage is set via an optional setter (for BC with D8.7), and the one from the constructor is the active storage. If we don't need to support Drupal 8.7 then we could use both in the constructor and clean up all of the config command classes to be more consistent

@weitzman
Copy link
Member

weitzman commented Feb 15, 2023

Thanks. We dropped Drupal 8 compat with Drush 11 https://www.drush.org/latest/install/#drupal-compatibility. I'll close this and hopefully someone will start a new PR with cleanup as suggested.

@weitzman weitzman closed this Feb 15, 2023
@weitzman weitzman reopened this Feb 15, 2023
@andypost
Copy link
Contributor

++ to commit only 5a4a8c1

@weitzman weitzman merged commit 244304b into drush-ops:11.x Feb 15, 2023
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.

None yet

4 participants