Skip to content

Fixed incorrect duplication warning for disabled plugin in di.xml #529

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

Merged
merged 3 commits into from
Apr 9, 2021

Conversation

VitaliyBoyko
Copy link
Contributor

Description (*)
The duplication plugin warning is shown when disabling a plugin via di.xml

Screenshot 2021-04-09 at 11 05 08

This should be shown only for active plugins. Disabled plugins should be skipped.

Screenshot 2021-04-09 at 11 10 16

if (observerDisabledAttribute != null
&& observerDisabledAttribute.getValue() != null
&& observerDisabledAttribute.getValue().equals("true")
) {
if (modulesWithSameObserverName.isEmpty()) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

just cleanup

problemsHolder.registerProblem(
pluginTypeNameAttribute.getValueElement(),
inspectionBundle.message(
if (modulesWithSamePluginName.isEmpty()) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

affected lines

Copy link
Contributor

@eduard13 eduard13 left a comment

Choose a reason for hiding this comment

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

Hi @VitaliyBoyko, thank you for the fix.

@eduard13 eduard13 merged commit 694913d into 4.0.0-develop Apr 9, 2021
@VitaliyBoyko VitaliyBoyko deleted the incorrect-warning-in-for-disabled-plugin branch April 9, 2021 11:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants