Skip to content

Commit

Permalink
(Fix) watch field nullable if as a resource was specified a method
Browse files Browse the repository at this point in the history
  • Loading branch information
Dmytro Somik committed Jan 21, 2021
1 parent f9ab906 commit 2c6d295
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Common/TsVectorSubscriber.php
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,10 @@ private function checkWatchFields(\ReflectionClass $class, \ReflectionProperty $
private function isWatchFieldNullable(\ReflectionClass $class, TsVector $annotation)
{
foreach ($annotation->fields as $fieldName) {
if ($class->hasMethod($fieldName)) {
continue;
}

$property = $class->getProperty($fieldName);
/** @var Column $propAnnot */
$propAnnot = $this->reader->getPropertyAnnotation($property, Column::class);
Expand Down

0 comments on commit 2c6d295

Please sign in to comment.