TheFootballSocialClub / FSCHateoasBundle

Please use https://github.com/willdurand/hateoas and https://github.com/willdurand/BazingaHateoasBundle instead.
94 stars 26 forks source link

You should not commit var_dump;die #60

Closed lyrixx closed 11 years ago

lyrixx commented 11 years ago

https://github.com/TheFootballSocialClub/FSCHateoasBundle/blob/master/Serializer/XmlFormViewSerializer.php#L482-L488

This does not work at all ;)

adrienbrault commented 11 years ago

IIRC, I didn't know the form component well enough when I wrote this class, and couldn't find an example on how to generate/test this case.

I'm planning on creating a package/repository only for this class, I'll probably take the time to fix this at that time

lyrixx commented 11 years ago

To reproduce:

$formBuilder->add('text', 'collection', array('type' => 'text', 'allow_add' => true));

Note: I did not test. But the allow_add will add the form prototype to the view.

adrienbrault commented 11 years ago

Ok, no more exit/var_dump :p.

The code is at https://github.com/adrienbrault/form-serializer .

The test https://github.com/adrienbrault/form-serializer/blob/master/tests/AdrienBrault/FormSerializer/Tests/XmlFormViewSerializerTest.php#L394-L396 . But I realize now that this isn't correct when there is data.

Do you actually need the data-prototype attribute, or have you just noticed the exit/var_dump issue?

lyrixx commented 11 years ago

I don't need it. And i experienced the issue ;-)