Skip to content

[Doctrine] Simplify usage and safety#286

Merged
sstok merged 3 commits intorollerworks:masterfrom
sstok:refactor/doctrine-orm
Sep 13, 2020
Merged

[Doctrine] Simplify usage and safety#286
sstok merged 3 commits intorollerworks:masterfrom
sstok:refactor/doctrine-orm

Conversation

@sstok
Copy link
Member

@sstok sstok commented Sep 7, 2020

Q A
Bug fix? no
New feature? yes
BC breaks? yes
Deprecations? no
Tickets Closes #276
License MIT
  • Remove support for SQLite (not recommended for this kind of usage and internally it was only used for mock-testing)
  • Remove support for Doctrine ORM NativeQuery, use the DBAL ConditionGenerator instead to get the correct SQL.
  • Reintroduce parameter-binding instead of embedding values directly
  • Separate Doctrine DBAL/ORM conversions for more flexibility and reduced complexity -- additionally this might allow for [Doctrine] Value with querying multiple columns #208 to finally happen!
  • Remove support for conversion strategies, it's still possible to use a different conversion for values and columns, but the conversion is no longer cached internally. Which also makes it possible now to handle value/context-specific column conversions (making it possible to add support for a new DateInterval type; to be introduced later).

sstok added 2 commits August 6, 2020 14:11
If someone wants to work with native SQL it's better to use the DBAL
generator, or apply the mapping manually.

This is also done in preparation of the Doctrine ORM v3 to simplify things.
In a very old version it was possible to have either embedded values
or parameters. Then to simplify generation, embedded values were introduced.

However, Doctrine ORM doesn't have a native escaping system for embedding values
directly. Making the current system rather hacky, plus that the previous parameter system
didn't allow value-splitting in conversions.

Note. DBAL conversions are no longer applied in ORM, ORM now has it's own
conversion API that operates directly with DQL (not SQL). Meaning special
functions must be registered separately.

_Minimum PHP version for the monorep was updated to PHP 7.2_
@sstok sstok force-pushed the refactor/doctrine-orm branch from e21c47f to bdb25e9 Compare September 13, 2020 17:46
@sstok sstok merged commit c8fa110 into rollerworks:master Sep 13, 2020
@sstok sstok deleted the refactor/doctrine-orm branch September 13, 2020 17:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[RFC] Remove Doctrine ORM QueryGenerator

1 participant