Skip to content

Conversation

Lustmored
Copy link
Contributor

This simple PR solves #116 and #117. The root cause here is that since DBAL 4 MAriaDB platforms are no longer extending MySQL platform, but only AbstractMySQLPlatform. Therefore functions that are identical between MariaDB and MySQL dialects became unusable with Operation "JSON_CONTAINS" is not supported by platform. or similar.

I have tested this change on an existing and pretty large project and everything seems to be working as expected.

@annervisser annervisser requested a review from Hikariii October 8, 2024 14:34
Copy link
Contributor

@annervisser annervisser left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Hikariii This would expose all mysql functions for all mysql-likes (mysql & mariadb)
This effectively makes mariadb a superset of mysql.
I'd be fine with this change, mariadb seems to support all json function mysql does.

In addition we should move JSON_VALUE from mariadb to mysql, since both support it

@kl3sk
Copy link

kl3sk commented Oct 15, 2024

I have tested this change too on a small project and seem to work.

JSON_CONTAINS (as example)

This PR will be much apreciated 😃

annervisser added a commit that referenced this pull request Oct 17, 2024
Reimplementation of PR #120 with backwards compatibility
annervisser and others added 2 commits October 17, 2024 09:16
Reimplementation of PR ScientaNL#120 with backwards compatibility

Fixes ScientaNL#116
Fixes ScientaNL#117

Co-authored-by: Jakub Caban <kuba.iluvatar@gmail.com>
@annervisser
Copy link
Contributor

@Lustmored Thanks for your PR. I've updated it to add backwards compatibility with older versions of DBAL.

@Hikariii Hikariii merged commit f7301d3 into ScientaNL:master Oct 17, 2024
6 checks passed
@annervisser
Copy link
Contributor

annervisser commented Oct 17, 2024

This has been released in 6.2.0: GitHub | Packagist

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants