ScientaNL / DoctrineJsonFunctions

Doctrine DQL functions for SQL JSON data type
MIT License
533 stars 48 forks source link

The MariaDB JSON functions are no longer processed #117

Open konmedia-devops opened 3 months ago

konmedia-devops commented 3 months ago

The MariaDB JSON functions are no longer processed as of doctrine/dbal:4.0 because the platform abstraction has changed there.

\Scienta\DoctrineJsonFunctions\Query\AST\Functions\Mariadb\MariadbJsonFunctionNode::validatePlatform

The class mentioned checks for the MySQLPlatform. However, MariaDb now only belongs to it in an abstract way. It would have to check for AbstractMySQLPlatform.

ErykBabayan commented 2 weeks ago

Why doesn't this package have some JSON functions that have afaik same syntax as in MySQL. JSON_LENGTH or JSON_CONTAINS for example ?

I did a quick fix and what I did is to copy-paste whole classes and link it in doctrine.yaml config if you're using Symfony. They need to extend from MariaDbJsonFunctionNode