Open
Description
Preconditions and environment
- Clean Magento 2.4.7-p3
- Reproducible on MySQL 8, cannot be reproduced on MariaDB 10.6
Steps to reproduce
- Make custom module with a declarative schema that contains a PHP class as default. For example:
<?xml version="1.0"?>
<schema xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Setup/Declaration/Schema/etc/schema.xsd">
<table name="test_module_db" resource="default" engine="innodb">
<column xsi:type="varchar" name="model" nullable="true" default="Test\\Module\\Model\\Default" comment="Corresponding Model"/>
</table>
</schema>
- Run
setup:upgrade
- Run
setup:db:status
Expected result
No database migrations needed, just ran the migrations.
Actual result
Migration is needed (breaking zero-downtime deployments for no reason), this is the difference:
from xml:
array(5) {
["type"]=>
string(7) "varchar"
["nullable"]=>
bool(true)
["default"]=>
string(28) "Test\\Module\\Model\\Default"
["length"]=>
int(255)
["comment"]=>
string(19) "Corresponding Model"
}
from MySQL:
array(5) {
["type"]=>
string(7) "varchar"
["nullable"]=>
bool(true)
["default"]=>
string(25) "Test\Module\Model\Default"
["length"]=>
int(255)
["comment"]=>
string(19) "Corresponding Model"
}
for reference, MariaDB:
array(5) {
["type"]=>
string(7) "varchar"
["nullable"]=>
bool(true)
["default"]=>
string(25) "Test\\Module\\Model\\Default"
["length"]=>
int(255)
["comment"]=>
string(19) "Corresponding Model"
}
Additional information
No response
Release note
No response
Triage and priority
- Severity: S0 - Affects critical data or functionality and leaves users without workaround.
- Severity: S1 - Affects critical data or functionality and forces users to employ a workaround.
- Severity: S2 - Affects non-critical data or functionality and forces users to employ a workaround.
- Severity: S3 - Affects non-critical data or functionality and does not force users to employ a workaround.
- Severity: S4 - Affects aesthetics, professional look and feel, “quality” or “usability”.
Metadata
Metadata
Assignees
Labels
USE ONLY for FRAMEWORK RELATED BUG!Gate 3 Passed. Manual verification of the issue completed. Issue is confirmedA defect with this priority could have functionality issues which are not to expectations.Indicates original Magento version for the Issue report.The issue has been reproduced on latest 2.4-develop branchIssue related to Developer Experience and needs help with Triage to Confirm or Reject it