setValue(object|array $objectOrArray, string|PropertyPathInterface $propertyPath, mixed $value)
Sets the value at the end of the property path of the object graph. Example: use Symfony\Component\PropertyAccess\PropertyAccess;
$propertyAccessor = PropertyAccess::createPropertyAccessor();
echo $propertyAccessor->setValue($object, 'child.name', 'Fabien');
// equals echo $object->getChild()->setName('Fabien');
This method first tries to find a public setter for each property