Skip to content
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

Update to DBAL 4.x.x #3088

Open
mrbinr opened this issue Oct 22, 2024 · 1 comment
Open

Update to DBAL 4.x.x #3088

mrbinr opened this issue Oct 22, 2024 · 1 comment

Comments

@mrbinr
Copy link

mrbinr commented Oct 22, 2024

Symfony FOSUserBundle versions: 4.0.0

Description of the problem including expected versus actual behavior:

I have update my project which use Symfony 6.4 with composer update and DBAL has been updated

...
Upgrading doctrine/dbal (3.9.1 => 4.2.1)
...

Provide logs (if relevant):

Doctrine\DBAL\Types\Exception\UnknownColumnType: 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 error 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#getMappedDatabaseTypes(). If the type name is empty you might have a problem with the cache 
or forgot some mapping information.

After investigation the problem seems to be linked to roles property and it cannot being overridden with AttributeOverride.

@iamBunny
Copy link

iamBunny commented Dec 3, 2024

While a change to support this might be coming, i personally doubt it will be changed

For now, your options are:

  • Using a custom field type for Array that you can specify in Doctrine config, which i do not recommend
  • Migrating from using FosUserBundle (recommended, even suggested by FOS in readme of this bundle) and using Symfony’s native User support that comes with Symfony Security. Migrating will save you headaches in the future.

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

No branches or pull requests

2 participants