Update src/Symfony/Component/Form/Extension/Core/Type/FileType.php #5028

Closed
wants to merge 2 commits into
from

Conversation

Projects
None yet
@webmozart

This comment has been minimized.

Show comment
Hide comment
@webmozart

webmozart Jul 24, 2012

Contributor

Thank you for the PR! Could you please add a test case?

Contributor

webmozart commented Jul 24, 2012

Thank you for the PR! Could you please add a test case?

@stfalcon

This comment has been minimized.

Show comment
Hide comment
@stfalcon

stfalcon Jul 25, 2012

Contributor

Could you please add a test case?

And what to check? I added one static option :)

Contributor

stfalcon commented Jul 25, 2012

Could you please add a test case?

And what to check? I added one static option :)

@webmozart

This comment has been minimized.

Show comment
Hide comment
@webmozart

webmozart Jul 25, 2012

Contributor

Whatever was the reason for adding the option ;) The test should fail when the option is not added and succeed when the option is there.

Probably it is sufficient to create a new field of type "file" in the test which comes prefilled with a File object.

$file = $this->getMock('Symfony\Component\HttpFoundation\File\File');
$this->factory->create('file', $file)
Contributor

webmozart commented Jul 25, 2012

Whatever was the reason for adding the option ;) The test should fail when the option is not added and succeed when the option is there.

Probably it is sufficient to create a new field of type "file" in the test which comes prefilled with a File object.

$file = $this->getMock('Symfony\Component\HttpFoundation\File\File');
$this->factory->create('file', $file)

@stfalcon stfalcon closed this Aug 27, 2012

@stfalcon stfalcon reopened this Nov 12, 2012

@stfalcon stfalcon closed this Nov 15, 2012

@stfalcon

This comment has been minimized.

Show comment
Hide comment
@stfalcon

stfalcon Nov 15, 2012

Contributor

sorry, it's bug in VichUploaderBundle

Contributor

stfalcon commented Nov 15, 2012

sorry, it's bug in VichUploaderBundle

@stfalcon

This comment has been minimized.

Show comment
Hide comment
@stfalcon

stfalcon Nov 21, 2012

Contributor

or not :)

Contributor

stfalcon commented Nov 21, 2012

or not :)

@stfalcon stfalcon reopened this Nov 21, 2012

@stfalcon

This comment has been minimized.

Show comment
Hide comment
@stfalcon

stfalcon Nov 22, 2012

Contributor

@bschussek done! it was really a bug with FileType

Contributor

stfalcon commented Nov 22, 2012

@bschussek done! it was really a bug with FileType

@stfalcon

This comment has been minimized.

Show comment
Hide comment
@stfalcon

stfalcon Nov 22, 2012

Contributor

@stof who can merge it? I want close this bug dustin10/VichUploaderBundle#27 :)

Contributor

stfalcon commented Nov 22, 2012

@stof who can merge it? I want close this bug dustin10/VichUploaderBundle#27 :)

@stof

This comment has been minimized.

Show comment
Hide comment
@stof

stof Nov 23, 2012

Member

@stfalcon the rule is that only @fabpot merges PRs on symfony.

Member

stof commented Nov 23, 2012

@stfalcon the rule is that only @fabpot merges PRs on symfony.

@webkmua webkmua referenced this pull request in dustin10/VichUploaderBundle Nov 23, 2012

Closed

fix this issue: https://github.com/dustin10/VichUploaderBundle/issues/27 #69

@stfalcon

This comment has been minimized.

Show comment
Hide comment
@stfalcon

stfalcon Nov 23, 2012

Contributor

@fabpot do you have a minute :)? it's simple PR but many people wait for it

Contributor

stfalcon commented Nov 23, 2012

@fabpot do you have a minute :)? it's simple PR but many people wait for it

@fabpot fabpot closed this in ac24f3e Nov 24, 2012

@stfalcon stfalcon referenced this pull request in dustin10/VichUploaderBundle Nov 24, 2012

Closed

Symfony's form component cleanup. #27

@fvilpoix

This comment has been minimized.

Show comment
Hide comment
@fvilpoix

fvilpoix Nov 26, 2012

Hello,

Since this update, I've got a 500 error instead of validation failure when I try to post a form without a required file.

Warning: Missing argument 1 for Symfony\Component\HttpFoundation\File\File::__construct(), called in […]/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Core/Type/FormType.php on line 172 and defined in […]/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/File/File.php line 38

Hello,

Since this update, I've got a 500 error instead of validation failure when I try to post a form without a required file.

Warning: Missing argument 1 for Symfony\Component\HttpFoundation\File\File::__construct(), called in […]/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Core/Type/FormType.php on line 172 and defined in […]/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/File/File.php line 38
@piotrantosik

This comment has been minimized.

Show comment
Hide comment
@piotrantosik

piotrantosik Nov 26, 2012

Contributor

I have same error as @fvilpoix

Contributor

piotrantosik commented Nov 26, 2012

I have same error as @fvilpoix

@choomz

This comment has been minimized.

Show comment
Hide comment
@choomz

choomz Nov 27, 2012

I have the same error on my side. This change means that we must necessarily provide Symfony File objects on forms input and output ?

I fail to see how this can work as in this case, nothing is passed to the File constructor.

choomz commented Nov 27, 2012

I have the same error on my side. This change means that we must necessarily provide Symfony File objects on forms input and output ?

I fail to see how this can work as in this case, nothing is passed to the File constructor.

@stfalcon

This comment has been minimized.

Show comment
Hide comment
@stfalcon

stfalcon Nov 28, 2012

Contributor

Hmm. @bschussek, "Houston, we have a problem"

Contributor

stfalcon commented Nov 28, 2012

Hmm. @bschussek, "Houston, we have a problem"

@Sybio

This comment has been minimized.

Show comment
Hide comment
@Sybio

Sybio Nov 30, 2012

+1 same error !

Sybio commented Nov 30, 2012

+1 same error !

@stfalcon

This comment has been minimized.

Show comment
Hide comment
@stfalcon

stfalcon Nov 30, 2012

Contributor

@fabpot can you revert changes? and reopen this issue.

Contributor

stfalcon commented Nov 30, 2012

@fabpot can you revert changes? and reopen this issue.

@dchaffin

This comment has been minimized.

Show comment
Hide comment
@dchaffin

dchaffin Nov 30, 2012

I am getting this same error.

I am getting this same error.

@dchaffin

This comment has been minimized.

Show comment
Hide comment
@dchaffin

dchaffin Nov 30, 2012

I did find this 'fix':

#6134

I did find this 'fix':

#6134

@frodosghost

This comment has been minimized.

Show comment
Hide comment
@frodosghost

frodosghost Dec 3, 2012

Same error.

Same error.

@minart

This comment has been minimized.

Show comment
Hide comment
@minart

minart Dec 3, 2012

Yes, I have the same error, when i edit, and when the field file is empty :(

minart commented Dec 3, 2012

Yes, I have the same error, when i edit, and when the field file is empty :(

@gzankevich

This comment has been minimized.

Show comment
Hide comment
@gzankevich

gzankevich Dec 4, 2012

The fix posted by dchaffin works for me. It's a little worrying that a security update (2.1.4) ended up breaking functionality.

The fix posted by dchaffin works for me. It's a little worrying that a security update (2.1.4) ended up breaking functionality.

@shadypierre

This comment has been minimized.

Show comment
Hide comment
@shadypierre

shadypierre Dec 7, 2012

Contributor

Same error and the fix posted by dchaffin doesn't works for me :/

Contributor

shadypierre commented Dec 7, 2012

Same error and the fix posted by dchaffin doesn't works for me :/

@alainivars

This comment has been minimized.

Show comment
Hide comment
@alainivars

alainivars Dec 11, 2012

Same error to minoz and the fix posted by dchaffin doesn't works for me to

Same error to minoz and the fix posted by dchaffin doesn't works for me to

@webmozart

This comment has been minimized.

Show comment
Hide comment
@webmozart

webmozart Dec 13, 2012

Contributor

Fixed in #6319

Contributor

webmozart commented Dec 13, 2012

Fixed in #6319

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment