-
Notifications
You must be signed in to change notification settings - Fork 9.4k
[Magento 2.3.x] Declarative Schema :: Data/Schema Patches getAliases() not working as expected #23031
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
Comments
Hi @atishgoswami. Thank you for your report.
Please make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, please, add a comment to the issue:
For more details, please, review the Magento Contributor Assistant documentation. @atishgoswami do you confirm that you were able to reproduce the issue on vanilla Magento instance following steps to reproduce?
|
Hi @korostii. Thank you for working on this issue.
|
✅ Confirmed by @korostii |
@korostii Thank you for verifying the issue. Unfortunately, not enough information was provided to acknowledge ticket. Please consider adding the following:
Once all required information is added, please add label |
Hi @korostii. Thank you for working on this issue.
|
Maybe I am dumb or have missed the point of the issue, but how does the change in https://github.com/magento/magento2/pull/25265/files solve this issue exactly? I see that the current patch is applied first (line :162) and only then In fact, by testing empirically, all I get from adding the old class/patch name among aliases, is that the migration breaks when it reaches the current patch.. but only after having applied it! Therefore I think documentation snippet at https://devdocs.magento.com/guides/v2.3/extension-dev-guide/declarative-schema/data-patches.html
is misleading |
@francescosalvi I'm no expert either, but I'd say you're at least half-right. The patch does not get applied twice only due to the rollback called within the catch clause. While the actual behavior does not match what is written on the docs, I think the intended behavior is the one described. The incorrect behavior I see (in my case) is that the application of the new patch fails while referencing the first one (an alias). But according to that doc snippet there should be no exception thrown, but simple skipping of reapplying the patch. @magento-engcom-team could you reopen and have a second look at this issue? |
Opened a new issue #31396 |
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
patch_list
table a fully qualified class name for the patch class would be presentActual Result
Expected Result
The patch should not be reapplied.
Note: This issue can be replicated for Data as well as schema patches
The text was updated successfully, but these errors were encountered: