Skip to content

Commit 5f484d6

Browse files
committed
bug #458 [Autocomplete] Correct Method Name for FQCN (rodnaph)
This PR was merged into the 2.x branch. Discussion ---------- [Autocomplete] Correct Method Name for FQCN | Q | A | ------------- | --- | Bug fix? | yes | New feature? | no | Tickets | N/A | License | MIT The current method does not seem to exist, but this one will return the FQCN of the metadata being wrapped, which seems to be what it intends to do. This bug triggers when a specified search property does not exist, and an exception is thrown when creating the exception message. There are no tests for this code atm, and the `ClassMetadata` service has properties accessed which do not exist on the interface which makes mocking or adding a dummy problematic. Static analysis would also have trouble here I think. I'm happy to spend time adding these tests, but unsure if this is the right fix right now, perhaps I missed something. Commits ------- 7e1ff0d correct name of method for fetching FQCN
2 parents f9a8500 + 7e1ff0d commit 5f484d6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Autocomplete/src/Doctrine/EntityMetadata.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ public function getPropertyMetadata(string $propertyName): array
5353
return $this->metadata->associationMappings[$propertyName];
5454
}
5555

56-
throw new \InvalidArgumentException(sprintf('The "%s" field does not exist in the "%s" entity.', $propertyName, $this->getFqcn()));
56+
throw new \InvalidArgumentException(sprintf('The "%s" field does not exist in the "%s" entity.', $propertyName, $this->metadata->getName()));
5757
}
5858

5959
public function getPropertyDataType(string $propertyName): string

0 commit comments

Comments
 (0)