Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 9a9134f

Browse filesBrowse files
committed
do not choke on not existing mapping field
1 parent 1c110fa commit 9a9134f
Copy full SHA for 9a9134f

File tree

Expand file treeCollapse file tree

3 files changed

+4
-1
lines changed
Filter options
Expand file treeCollapse file tree

3 files changed

+4
-1
lines changed

‎src/Symfony/Bridge/Doctrine/Tests/Fixtures/BaseUser.php

Copy file name to clipboardExpand all lines: src/Symfony/Bridge/Doctrine/Tests/Fixtures/BaseUser.php
+2Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ class BaseUser
1717
*/
1818
private $username;
1919

20+
private $enabled;
21+
2022
/**
2123
* BaseUser constructor.
2224
*

‎src/Symfony/Bridge/Doctrine/Tests/Resources/orm/BaseUser.orm.xml

Copy file name to clipboardExpand all lines: src/Symfony/Bridge/Doctrine/Tests/Resources/orm/BaseUser.orm.xml
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
<mapped-superclass name="Symfony\Bridge\Doctrine\Tests\Fixtures\BaseUser">
88
<field name="username" column="username" type="string" length="120" />
9+
<field name="enabled" type="boolean" />
910
</mapped-superclass>
1011

1112
</doctrine-mapping>

‎src/Symfony/Bridge/Doctrine/Validator/DoctrineLoader.php

Copy file name to clipboardExpand all lines: src/Symfony/Bridge/Doctrine/Validator/DoctrineLoader.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ public function loadClassMetadata(ClassMetadata $metadata): bool
7272
$metadata->addConstraint(new UniqueEntity(['fields' => $mapping['fieldName']]));
7373
}
7474

75-
if (null === $mapping['length']) {
75+
if (null === ($mapping['length'] ?? null)) {
7676
continue;
7777
}
7878

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.