Skip to content

Commit 44dfd11

Browse files
committed
minor #11363 Minor change (ThomasLandauer)
This PR was merged into the 3.4 branch. Discussion ---------- Minor change "upload" was the wrong term, since an upload is initiated by the end-user, not by Symfony. Question: Is a Doctrine Listener preferred over a view transformer? I'm wondering, since the error message recommends a view transformer: > The form's view data is expected to be an instance of class Symfony\Component\HttpFoundation\File\File, but is a(n) string. You can avoid this error by setting the "data_class" option to null or by adding a view transformer that transforms a(n) string to an instance of Symfony\Component\HttpFoundation\File\File. <!-- If your pull request fixes a BUG, use the oldest maintained branch that contains the bug (see https://symfony.com/roadmap for the list of maintained branches). If your pull request documents a NEW FEATURE, use the same Symfony branch where the feature was introduced (and `master` for features of unreleased versions). --> Commits ------- 9497189 Minor change
2 parents 59aec66 + 9497189 commit 44dfd11

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

controller/upload_file.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,7 @@ Using a Doctrine Listener
315315

316316
If you are using Doctrine to store the Product entity, you can create a
317317
:doc:`Doctrine listener </doctrine/event_listeners_subscribers>` to
318-
automatically upload the file when persisting the entity::
318+
automatically move the file when persisting the entity::
319319

320320
// src/AppBundle/EventListener/BrochureUploadListener.php
321321
namespace AppBundle\EventListener;

0 commit comments

Comments
 (0)