Skip to content

Deprecate AbstractPlatform::canEmulateSchemas()#4805

Merged
morozov merged 1 commit intodoctrine:3.2.xfrom
morozov:deprecate-can-emulate-schemas
Sep 19, 2021
Merged

Deprecate AbstractPlatform::canEmulateSchemas()#4805
morozov merged 1 commit intodoctrine:3.2.xfrom
morozov:deprecate-can-emulate-schemas

Conversation

@morozov
Copy link
Member

@morozov morozov commented Sep 19, 2021

Q A
Type deprecation
BC Break no

The "schema emulation" feature as it's currently implemented in the DBAL doesn't belong to the DBAL. The emulation is effectively replacing the dot in the table names with a double underscore, assuming the dot is a fully qualified name separator (see #4804), which isn't always true (see #4708).

It is used by the ORM but since the ORM owns the table names, it can do the same replacement itself and emulate the schema on any platform. As such, this feature is really questionable. I wouldn't trust the results of such tests.

There isn't a single test in the DBAL that would cover this feature.

@morozov morozov force-pushed the deprecate-can-emulate-schemas branch from 8349860 to 65a8902 Compare September 19, 2021 18:01
@morozov morozov requested a review from derrabus September 19, 2021 18:01
@derrabus
Copy link
Member

It is used by the ORM

To me, this looks like the ORM uses this "feature" so Postgres functionality can be tested on SQLite. 🙈

Yes, please remove it from DBAL.

@morozov morozov added this to the 3.2.0 milestone Sep 19, 2021
@morozov morozov enabled auto-merge September 19, 2021 18:09
@morozov morozov merged commit ba3e2f7 into doctrine:3.2.x Sep 19, 2021
@morozov morozov deleted the deprecate-can-emulate-schemas branch October 2, 2021 18:49
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 3, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

2 participants