Closed
Description
Preconditions
Project Environment
Magento Version: 2.3.x CE
PHP: 7.2
Database: MySQL 5.7
OS: CentOS 7
Caching: Varnish Cache and OPcache
Steps to reproduce
- Create a schema patch with a class name e.g. ExampleSchemaPatch
- Add a logger inside the apply method for the schema patch class to indicate that the apply method was executed
- Run setup:upgrade
- Check the
patch_list
table a fully qualified class name for the patch class would be present - Check the log file to confirm that the apply method for the patch was executed
- Now change the class name of the applied patch to some something else e.g. ChangedExampleSchemaPatch
- Added the old class name as an array item for the return array for the getAliases() method
public function getAliases()
{
return [
ExampleSchemaPatch::class
];
}
- Run setup upgrade one more time
Actual Result
- The patch gets reapplied. This can be verified by checking the log file
- A new entry of the renamed patch is added to the patch_list table
Expected Result
The patch should not be reapplied.
Note: This issue can be replicated for Data as well as schema patches
Metadata
Metadata
Assignees
Labels
USE ONLY for FRAMEWORK RELATED BUG! E.g If bug occurs during Catalog Setup use just CatalogGate 2 Passed. Manual verification of the issue description passedGate 1 Passed. Automatic verification of issue format passedGate 4. Acknowledged. Issue is added to backlog and ready for developmentThe issue has been reproduced on latest 2.3 releaseIssue related to Developer Experience and needs help with Triage to Confirm or Reject it