Nyholm / psr7-server

Helper classes to use any PSR7 implementation as your main request and response
MIT License
90 stars 21 forks source link

Mark getHeadersFromServer as static #13

Closed Zegnat closed 6 years ago

Zegnat commented 6 years ago

PR as discussed in #11.

Making this method static makes sense, as people might want to use it as polyfill for the Apache only getallheaders.

mindplay-dk commented 6 years ago

Just my opinion, but static method in an interface?

Shouldn't even be a thing - PHP is notoriously wrong on this point, probably for historical reasons.

No reason to encourage (nay force) people to hide the dependency on this factory - constructors are the de-facto best practice means of indicating your dependencies; this change forces you to burry the dependency in some line in a method somewhere.

I'd roll this back.