<p dir="auto">It appears as though the user-agent header that Symfony2 BrowserKit sets is incorrect. I've been bashing my head against Behat for a few hours trying to test against a site running an IIS6 server (fails with IIS7 as well).</p>
<p dir="auto">The server responds with:<br>
HTTP/1.1 400 Bad Request (Invalid Header Name) and returns no body.</p>
<p dir="auto">I did a tshark to observe the headers:</p>
<p dir="auto">Hypertext Transfer Protocol<br>
GET / HTTP/1.1\r\n<br>
[Expert Info (Chat/Sequence): GET / HTTP/1.1\r\n]<br>
[Message: GET / HTTP/1.1\r\n]<br>
[Severity level: Chat]<br>
[Group: Sequence]<br>
Request Method: GET<br>
Request URI: /<br>
Request Version: HTTP/1.1<br>
User-Agent: Guzzle/3.3.0 curl/7.24.0 PHP/5.3.15\r\n<br>
User-agent: Symfony2 BrowserKit\r\n<br>
Host: ******\r\n<br>
\r\n</p>
<p dir="auto">I do not believe that the "User-agent" header declaration is valid. I believe that it should be User-Agent, instead (capital "A"). I'm not sure if multiple User-Agent fields are allowed, either. Thoughts?</p>
<p dir="auto">Current state of collections mapping is not flexible and make a lot of troubles.</p>
<p dir="auto">In SF 2.0 if user sets by_reference property to false, setter for collection was called, e.g. setItems().<br>
Now (SF 2.1) if object have method addItem(), this method is called.</p>
<p dir="auto">Lets take example with ordered items, e.g. gallery images.<br>
User changes they order in UI and script have to reorder them in DB. To do so setImages() method should be used, but class contains also addImage() method, which is used instead and breaks the logic.</p>
<p dir="auto">There should be an option to disable individual setter usage, when by_reference is set to false.</p>