-
Notifications
You must be signed in to change notification settings - Fork 39
Added deprecation notification on our factories #106
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
should we additionally deprecate our factory interfaces? i'd say so. also, symfony does a |
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 |
I fixed the code style issues. Here is a PR for the interfaces: php-http/message-factory#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? |
a496c27
to
af747ab
Compare
Yes, Im 👍 for merging. I've updated the warning and rebased. The CS issues are unrelated. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks!
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.