zendframework / zf2-documentation

Zend Framework 2 documentation sources
BSD 3-Clause "New" or "Revised" License
190 stars 570 forks source link

Failing tests due to missing id field + missing "/" in redirect URL #1406

Closed andy-b-84 closed 9 years ago

andy-b-84 commented 9 years ago

I followed your tutorials step by step, and the "id" field is required. Thus the "add" route refused to "create" an album, because this "id" field was missing, resulting in a 200 response code. In the mean time, PHPUnit complained because I was redirected to "/album/", and not "/album"

Ocramius commented 9 years ago

Is an empty identifier valid?

andy-b-84 commented 9 years ago

I don't see it as valid myself, but it did work fine with the rest of the tutorial. The best solution IMHO would be not to add the ID field in the form class by default, eventually extending the "CreateFormClass" by an "UpdateFormClass", but that is, as I said, my humble opinion.

Ocramius commented 9 years ago

Merging for now, then. Ping @manuakasam

Ocramius commented 9 years ago

Merged, thanks!

master: zendframework/zf2-documentation@f3c2e9c4d9f140132a94ab11cd7288f26cc9be71 develop: zendframework/zf2-documentation@619547584119df92bbce1abc997ae3a484838b0c

andy-b-84 commented 9 years ago

No problems. Thanks for your work on ZF2 :)

Ocramius commented 9 years ago

@andy-b-84 no: thank you for contributing :-)