Skip to content

Commit

Permalink
Fix call to PropertyListExtractorInterface::getProperties
Browse files Browse the repository at this point in the history
In symfony/property-info 5+ the argument was forced to a string transparently.
  • Loading branch information
jorrit committed Oct 21, 2020
1 parent 4243a38 commit 5456601
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Admin/Extension/CloneAdminExtension.php
Expand Up @@ -48,11 +48,12 @@ public function alterNewInstance(AdminInterface $admin, $object)
}

$subject = $request->attributes->get(self::REQUEST_ATTRIBUTE);
$subjectclass = get_class($subject);

$idfields = $admin->getModelManager()->getIdentifierFieldNames($admin->getClass());
$idfields = $admin->getModelManager()->getIdentifierFieldNames($subjectclass);
$propertyAccessor = PropertyAccess::createPropertyAccessor();

$properties = $this->propertyInfoExtractor->getProperties($subject);
$properties = $this->propertyInfoExtractor->getProperties($subjectclass);

foreach ($properties as $property) {
// Skip identifier fields.
Expand Down

0 comments on commit 5456601

Please sign in to comment.