Repository navigation
Description
Focused summary of Doctrine ORM 3 / DBAL 4 (the second most widely used PHP ORM, default in Symfony) against MatrixOne 4.0.0-rc3. The ORM runtime is solid — 221 / 237 scenarios pass (93.2%): entities, DQL (where/join/aggregate/functions/NEW DTO/UPDATE/DELETE), associations incl. OneToOne, lifecycle callbacks, repositories, the full DBAL query-builder expr() surface, typed value round-trips, and SchemaTool::createSchema. The 16 failures cluster into 4 themes — and the dominant one blocks Doctrine Migrations. (Part of the overall study in #1.)
1. 🟠 Schema introspection & Doctrine Migrations broken — missing information_schema.collation_character_set_applicability (11 scenarios)
Doctrine's MySQL platform joins information_schema.collation_character_set_applicability to read column charsets during bulk introspection, schema-diff and ALTER generation. MatrixOne does not have that table:
1064 SQL parser error: table "collation_character_set_applicability" does not exist
- Failing:
listTables (bulk),introspectTable,introspectTable round-trip,schema diff / migrate (Comparator), and everygetAlterTableSQLpath via the Comparator (add column,drop column,change column type,add index,drop index), plus a direct probe of the missing table. - Impact: Doctrine Migrations and any schema-diff workflow do not work — this is the single biggest blocker for a Symfony/Doctrine app on MatrixOne.
- Fix: add
information_schema.collation_character_set_applicability(and ideallycheck_constraints, which separately blocks CakePHP).
2. 🟠 Single-table introspection returns inaccurate metadata (3 scenarios)
Even where introspection runs, column metadata is wrong:
-- VARCHAR(20) column:
SELECT CHARACTER_MAXIMUM_LENGTH FROM information_schema.columns WHERE ... -- NULL (expected 20)
-- DECIMAL(12,2) column:
SELECT NUMERIC_PRECISION, NUMERIC_SCALE FROM information_schema.columns WHERE ... -- NULL (expected 12, 2)- Failing:
column length on varchar(got NULL),decimal precision/scale(got NULL),listTableForeignKeys on FK table(returns no FKs for a table created with a FK). - Impact: ORMs/tools that map types from introspection get wrong lengths/precision and miss foreign keys. (Also observed:
DATA_TYPEis upper-cased and TEXTCHARACTER_MAXIMUM_LENGTH = 0.) - Fix: populate
CHARACTER_MAXIMUM_LENGTH/NUMERIC_PRECISION/NUMERIC_SCALEand expose FKs ininformation_schema.KEY_COLUMN_USAGE/REFERENTIAL_CONSTRAINTS.
3. 🟡 Doctrine float type emits DOUBLE PRECISION, which is rejected (1 scenario)
#[ORM\Column(type: 'float')] public float $x;
// Doctrine MySQL platform generates: ... DOUBLE PRECISION ...
// MatrixOne: 1064 (only DOUBLE is accepted)- Failing:
type float. - Impact: any entity with a
floatcolumn fails at schema-create/migrate time. - Workaround: map to
decimal, or a custom type that emitsDOUBLE. Fix: accept theDOUBLE PRECISIONkeyword as an alias ofDOUBLE.
4. 🟡 Nested transactions & a Criteria LIMIT bug (2 scenarios)
nested with savepoints→20101 savepoint has not been implemented yet(DBAL'ssetNestTransactionsWithSavepoints(true)can't roll back to a savepoint — same root cause as the Eloquent issue).matching() Criteria in + limit→ returns 3 rows whenCriteria::setMaxResults(2)was set (the persister-built SQL omits theLIMITclause on this platform).
Priority for MatrixOne
- Add
information_schema.collation_character_set_applicability(theme 1) — unblocks Doctrine Migrations / schema-diff (11 of 16 failures). - Accurate column metadata + FK exposure in information_schema (theme 2).
ROLLBACK TO SAVEPOINT(theme 4) + acceptDOUBLE PRECISION(theme 3).
Reproduced by the compatibility suite on branch claude/funny-ritchie-skwh06; run php run.php --only=doctrine.
Activity