Hi guys,
I'm having a small problem with this bundle because a couple of functions are not PHP 7.2 compatible.
These are the two functions involved:
private function getRelatedEntityIdentifier($entity)
{
assert('is_object($entity)');
if ($entity instanceof \Doctrine\Common\Persistence\Proxy) {
$entity->__load();
}
$relClass = ClassUtils::getClass($entity);
$relId = $this->registry->getManagerForClass($relClass)->getMetadataFactory()
->getMetadataFor($relClass)->getIdentifierValues($entity);
asort($relId);
if ( ! $relId) {
throw new \InvalidArgumentException(sprintf('The identifier for entity of class "%s" was empty.', $relClass));
}
return array($relClass, json_encode($relId));
}
public function addRelatedEntity($entity)
{
assert('is_object($entity)');
if ($this->relatedEntities->contains($entity)) {
return;
}
$this->relatedEntities->add($entity);
}
As you can see these two functions are not compatible with PHP 7.2 because they contain an assert() function call using a string argument. See here for more informations.
If it's possibile I will fix this two functions and create a pull request.
Hi guys, I'm having a small problem with this bundle because a couple of functions are not PHP 7.2 compatible. These are the two functions involved:
As you can see these two functions are not compatible with PHP 7.2 because they contain an
assert()
function call using a string argument. See here for more informations. If it's possibile I will fix this two functions and create a pull request.