Merge branch 'fix/#6626-skip-proxy-generation-for-embeddable-classes-2.5' into 2.5
Backport #6626 Backport #6625
This commit is contained in:
commit
6184343fd5
@ -91,7 +91,9 @@ class ProxyFactory extends AbstractProxyFactory
|
|||||||
protected function skipClass(ClassMetadata $metadata)
|
protected function skipClass(ClassMetadata $metadata)
|
||||||
{
|
{
|
||||||
/* @var $metadata \Doctrine\ORM\Mapping\ClassMetadataInfo */
|
/* @var $metadata \Doctrine\ORM\Mapping\ClassMetadataInfo */
|
||||||
return $metadata->isMappedSuperclass || $metadata->getReflectionClass()->isAbstract();
|
return $metadata->isMappedSuperclass
|
||||||
|
|| $metadata->isEmbeddedClass
|
||||||
|
|| $metadata->getReflectionClass()->isAbstract();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -71,6 +71,33 @@ class ProxyFactoryTest extends \Doctrine\Tests\OrmTestCase
|
|||||||
$proxy->getDescription();
|
$proxy->getDescription();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function testSkipMappedSuperClassesOnGeneration()
|
||||||
|
{
|
||||||
|
$cm = new ClassMetadata('stdClass');
|
||||||
|
$cm->isMappedSuperclass = true;
|
||||||
|
|
||||||
|
self::assertSame(
|
||||||
|
0,
|
||||||
|
$this->proxyFactory->generateProxyClasses([$cm]),
|
||||||
|
'No proxies generated.'
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @group 6625
|
||||||
|
*/
|
||||||
|
public function testSkipEmbeddableClassesOnGeneration()
|
||||||
|
{
|
||||||
|
$cm = new ClassMetadata('stdClass');
|
||||||
|
$cm->isEmbeddedClass = true;
|
||||||
|
|
||||||
|
self::assertSame(
|
||||||
|
0,
|
||||||
|
$this->proxyFactory->generateProxyClasses([$cm]),
|
||||||
|
'No proxies generated.'
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @group DDC-1771
|
* @group DDC-1771
|
||||||
*/
|
*/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user