Skip to content

Minor change #11363

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 9, 2019
Merged

Minor change #11363

merged 1 commit into from
Apr 9, 2019

Conversation

ThomasLandauer
Copy link
Contributor

"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.

"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.
@javiereguiluz
Copy link
Member

Thanks Thomas.

@javiereguiluz javiereguiluz merged commit 9497189 into symfony:3.4 Apr 9, 2019
javiereguiluz added a commit that referenced this pull request Apr 9, 2019
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
@ThomasLandauer ThomasLandauer deleted the patch-8 branch April 9, 2019 18:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants