bug #31336 [DoctrineBridge] do not choke on not existing mapping field (xabbuh)
This PR was merged into the 4.3-dev branch.
Discussion
----------
[DoctrineBridge] do not choke on not existing mapping field
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | 31239
| License | MIT
| Doc PR |
Commits
-------
9a9134f4e4
do not choke on not existing mapping field
This commit is contained in:
commit
51ff98ebbc
@ -17,6 +17,8 @@ class BaseUser
|
||||
*/
|
||||
private $username;
|
||||
|
||||
private $enabled;
|
||||
|
||||
/**
|
||||
* BaseUser constructor.
|
||||
*
|
||||
|
@ -6,6 +6,7 @@
|
||||
|
||||
<mapped-superclass name="Symfony\Bridge\Doctrine\Tests\Fixtures\BaseUser">
|
||||
<field name="username" column="username" type="string" length="120" />
|
||||
<field name="enabled" type="boolean" />
|
||||
</mapped-superclass>
|
||||
|
||||
</doctrine-mapping>
|
||||
|
@ -72,7 +72,7 @@ final class DoctrineLoader implements LoaderInterface
|
||||
$metadata->addConstraint(new UniqueEntity(['fields' => $mapping['fieldName']]));
|
||||
}
|
||||
|
||||
if (null === $mapping['length']) {
|
||||
if (null === ($mapping['length'] ?? null)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user