Using an enum as a criteria value reached PDO as an object and failed with "Object of class X could not be converted to string". Filtering by a state column - the most natural thing to do with an enum-mapped property - was impossible. CriteriaCompiler now unwraps \BackedEnum both for a plain value and inside an an IN list. Covered by CriteriaCompilerEnumTest.
12 lines
171 B
PHP
12 lines
171 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace Camelia\Orm\Tests\Fixture;
|
|
|
|
enum EstadoPedido: string
|
|
{
|
|
case Pendiente = 'pendiente';
|
|
case Confirmado = 'confirmado';
|
|
}
|