Skip to content

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

Merged
merged 3 commits into from
Dec 17, 2019
Merged

Conversation

Nyholm
Copy link
Member

@Nyholm Nyholm commented Dec 26, 2018

Q A
Bug fix? no
New feature? no
BC breaks? no
Deprecations? yes
Related tickets fixes #105
Documentation
License MIT

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.

@dbu
Copy link
Contributor

dbu commented Dec 27, 2018

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?

@Nyholm
Copy link
Member Author

Nyholm commented Dec 27, 2018

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

@dbu
Copy link
Contributor

dbu commented Dec 27, 2018

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) ?

@Nyholm
Copy link
Member Author

Nyholm commented Dec 27, 2018

I fixed the code style issues.

Here is a PR for the interfaces: php-http/message-factory#39

@gmponos
Copy link

gmponos commented Dec 27, 2018

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.

@sagikazarmark
Copy link
Member

I would say this PR should be the last one merged and we could even wait for guzzle to release PSR-17

@dbu
Copy link
Contributor

dbu commented Mar 6, 2019

would this now be ready to merge? is guzzle psr-17 released?

@dbu
Copy link
Contributor

dbu commented Aug 4, 2019

@Nyholm what is the state of this?

@dbu
Copy link
Contributor

dbu commented Nov 28, 2019

@Nyholm do we want to merge this?

@Nyholm
Copy link
Member Author

Nyholm commented Dec 16, 2019

Yes, Im 👍 for merging.

I've updated the warning and rebased. The CS issues are unrelated.

Copy link
Contributor

@dbu dbu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks!

@dbu dbu merged commit d9f6bf6 into master Dec 17, 2019
@dbu dbu deleted the patch-deprecation branch December 17, 2019 07:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

PSR-17 compatibility ?
5 participants