diff --git a/cookbook/form/create_form_type_extension.rst b/cookbook/form/create_form_type_extension.rst index a75eaefc7ca..ab0d1c42502 100644 --- a/cookbook/form/create_form_type_extension.rst +++ b/cookbook/form/create_form_type_extension.rst @@ -232,7 +232,7 @@ it in the view:: $parentData = $form->getParent()->getData(); if (null !== $parentData) { - $accessor = PropertyAccess::getPropertyAccessor(); + $accessor = PropertyAccess::createPropertyAccessor(); $imageUrl = $accessor->getValue($parentData, $options['image_path']); } else { $imageUrl = null;