Closed Nyholm closed 4 years ago
should we additionally deprecate our factory interfaces? i'd say so.
also, symfony does a trigger_error('...', E_USER_DEPRECATED);
to make the problem more visible. should we do that here too?
I think we should deprecate our interfaces yes.
About trigger_error. I was considering that. I don't think it is needed. Since we currently have not plan of ever release a new major version I don't think we need to make it very visible. This annotation will show that you should never create a new implementation with these factories
agreed, so lets not trigger. can you please update this with deprecation on the interface and fix the code style issue (blank line around @deprecated
line) ?
I fixed the code style issues.
Here is a PR for the interfaces: https://github.com/php-http/message-factory/pull/39
There is also one more reason not to have trigger_error and that is that libraries like guzzle do not have factories implemented yet.
Otherwise my opinion would've been that it would be better to raise the error.
I would say this PR should be the last one merged and we could even wait for guzzle to release PSR-17
would this now be ready to merge? is guzzle psr-17 released?
@Nyholm what is the state of this?
@Nyholm do we want to merge this?
Yes, Im 👍 for merging.
I've updated the warning and rebased. The CS issues are unrelated.
What's in this PR?
PSR-17 is out. Our factories are not BC compatible with PSR-17 because of PHP7 return types. I think we should remove our factories in version 2.
Note. I do not suggest we plan for a version 2 release.