Skip to content
Advertisement

Doctrine 2.13.2 Warning: Object of class Enum could not be converted to int

Since last week I noticed problem on few places in the app I am working on. After investigation I found that with

composer require doctrine/orm 2.13.1

Everything is ok, but with:

composer require doctrine/orm 2.13.2

App brakes on places where I use enum in query like:

$builder->...->setParameter('type', Type::VARIANT) // Type is enum

I tried to read about it: here and here but I do not see info about this. Error is written in title.

Field is mapped via xml with name="type" type="smallint" enum-type="Type". It is valid, worked for months.

Does anybody knows why doctrine support for enum does not work, or if not that what could cause this problem?

Advertisement

Answer

might be related to https://github.com/doctrine/orm/issues/10066 so i would say downgrade to 2.13.1 and wait for 2.13.4

User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement