Skip to content

Commit 3c1c702

Browse files
committed
fix relationship detection when the datetime property immediatelly ends with newline
1 parent 00735a8 commit 3c1c702

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Reflection/EntityRelationshipPropertyReflectionExtension.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@ public function hasProperty(ClassReflection $classReflection, string $propertyNa
3434
return false;
3535
}
3636

37-
$hasRelationship = preg_match('#\$' . $propertyName . '\s(?:[^\n]*)\{[1m]:1.+\}.*$#m', $phpDoc) === 1;
37+
$regexp = '#\$' . preg_quote($propertyName, '#') . '[^\n]+\{[1m]:1.+}.*$#m';
38+
$hasRelationship = preg_match($regexp, $phpDoc) === 1;
3839
return $hasRelationship;
3940
}
4041

0 commit comments

Comments
 (0)