Skip to content

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

Open
@dfelton

Description

@dfelton

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions