To preface my question, I have tried every solution suggested by this StackExchange question.
This is the error given:
[Doctrine\DBAL\DBALException]
Unknown column type "enumAddressSource" requested. Any Doctrine type t
hat you use has to be registered with \Doctrine\DBAL\Types\Type::addTy
pe(). You can get a list of all the known types with \Doctrine\DBAL\Ty
pes\Type::getTypesMap(). If this error occurs during database introspe
ction then you might have forgot to register all database types for a
Doctrine Type. Use AbstractPlatform#registerDoctrineTypeMapping() or h
ave your custom types implement Type#getMappedDatabaseTypes(). If the
type name is empty you might have a problem with the cache or forgot s
ome mapping information.
This error is identical with the one that I had received prior to trying any fixes.
This is the current Doctrine code in the config.yml file:
doctrine:
dbal:
driver: pdo_mysql
host: "%database_host%"
port: "%database_port%"
dbname: "%database_name%"
user: "%database_user%"
password: "%database_password%"
charset: UTF8
mapping_types:
enum: string
enumAddressSource: string
# if using pdo_sqlite as your database driver:
# 1. add the path in parameters.yml
# e.g. database_path: "%kernel.root_dir%/data/data.db3"
# 2. Uncomment database_path in parameters.yml.dist
# 3. Uncomment next line:
# path: "%database_path%"
orm:
auto_generate_proxy_classes: "%kernel.debug%"
naming_strategy: doctrine.orm.naming_strategy.underscore
auto_mapping: true
The relevant code under vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/MySqlPlatform.php:
protected function initializeDoctrineTypeMappings()
{
$this->doctrineTypeMapping = array(
'tinyint' => 'boolean',
'smallint' => 'smallint',
...
'enum' => 'string',
'enumAddressSource' => 'string',
);
I would try to take the advice shown here: Doctrine Cookbook, but the article does not plainly specify which file this code is to be injected into (Referring specifically to option 1). It also appears to me that the code shown would be covered by the code injected at the bottom of the second code example.
This occurs for all enums in the database. Changing the database manually isn't exactly an option. What else can I try?