-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AbstractLogEntry - Unknown doctrine type "array" #2883
Comments
The Loggable extension isn't compatible with DBAL 4 right now, see #2502 and #2825 for the progress on that. If you need the loggable extension, you'll need to stick with DBAL 3 for the time being (I guess you could also try copying the old array type from the DBAL 3 codebase and registering it as a custom type in your application, but that's not a great long term solution, either). |
Thanks for answer. I think README need an alert on that. I will stick to DBAL 3 then |
I totally agree. |
Only one change is enough. In a single file, AbstractLogEntry @ line 90 :
|
Changing it from an array type to a JSON type like that works if you have no intention on using the old data in that table. The two field types aren't compatible when they're transformed to a database value by the DBAL (the array type makes a VARCHAR field that stores the result of |
I maked a workaround too by moving the data column to a new column old_data, and adding data in json type. (Just a patch then to update data from old_data) |
Package
show
Doctrine packages
show
PHP version
Subject
Since v3.17.0 and bump doctrine/dbal to 4.0, i got this error on doctrine :
Unknown column type "array" requested. Any Doctrine type that you use has to be registered with \Doctrine\DBAL\Types\Type::addType(). You can get a list of all the known types with \Doctrine\DBAL\Types\Type::getTypesMap(). If this er ror occurs during database introspection then you might have forgotten to register all database types for a Doctrine Type. Use AbstractPlatform#registerDoctrineTypeMapping() or have your custom types implement Type#getMappedDatabaseT ypes(). If the type name is empty you might have a problem with the cache or forgot some mapping information.
The text was updated successfully, but these errors were encountered: