for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
namespace Doctrine\Tests\ORM\Functional\Ticket;
use Doctrine\Tests\OrmFunctionalTestCase;
/**
* @group GH7854
*/
class GH7854Test extends OrmFunctionalTestCase
{
public function setUp()
parent::setUp();
$this->_schemaTool->createSchema(
[
$this->_em->getClassMetadata(GH7854Entity::class),
$this->_em->getClassMetadata(GH7854ValueObject::class),
]
);
}
public function testTypedPropertyContainingEmbeddable() : void
$this->_em->persist(new GH7854Entity());
$this->_em->flush();
$this->_em->getRepository(GH7854Entity::class)->findAll();
* @Entity()
class GH7854Entity
* @Embedded(class = "GH7854ValueObject")
private GH7854ValueObject $valueObject;
$valueObject
* @Embeddable()
class GH7854ValueObject
/** @Id() @Column(type="integer") @GeneratedValue(strategy="AUTO") */
private int $value;
$value