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

False Positive: Magento2.Legacy.InstallUpgrade.ObsoleteInstallDataScript #411

Open
dfelton opened this issue Jul 5, 2022 · 1 comment
Open
Labels

Comments

@dfelton
Copy link

dfelton commented Jul 5, 2022

Preconditions

  1. Package contains data patch \VendorName\ModuleName\Setup\Patch\Data\InstallData (exact nature of data patch irrelevant)

Steps to reproduce

  1. Run the coding standard against the file Setup/Patch/Data/InstallData.php

Expected result

  1. Sniff Magento2.Legacy.InstallUpgrade.ObsoleteInstallDataScript to not be triggered by the presence of a data patch named InstallData, as it is not a Setup/InstallData.php script.

Actual result

  1. Data patch fails due to Magento2.Legacy.InstallUpgrade.ObsoleteInstallDataScript sniff.

Misc Notes:

  • Possible to disable failure with phpcs:ignore Magento2.Legacy.InstallUpgrade.ObsoleteInstallDataScript annotation within the file. Line must be present on line 1, after the opening PHP tag.
@dfelton dfelton added the bug Something isn't working label Jul 5, 2022
@m2-assistant
Copy link

m2-assistant bot commented Jul 5, 2022

Hi @dfelton. Thank you for your report.
To speed up processing of this issue, make sure that you provided sufficient information.

Add a comment to assign the issue: @magento I am working on this


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

No branches or pull requests

1 participant