-
Notifications
You must be signed in to change notification settings - Fork 39
migrated to laminas/laminas-diactoros (#125) #134
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
3868121
to
378765c
Compare
378765c
to
868ed49
Compare
if i understand correctly, this means that if one installs only laminas, but not the zend-bridge, the factory now returns a different class. i would hope that users do not rely on the concrete implementations when using this factory (otherwise there is no need to use the factory anyways). so to me this seems fine. i suggest we do a new minor version, as it still is more than a bugfix. can you please rebase on the master branch and add something to the changelog (including mentioning the bridge?) |
Yes, you need to have the bridge installed. However, the bridge is required as a dependency of laminas-diactoros (see https://packagist.org/packages/laminas/laminas-diactoros) and will, to my understanding, be included there as a dependency until laminas-diactoros releases a major update (i.e. 3.0). So as soon as someone will have laminas-diactoros 2.x installed, they will have the bridge installed as well. In the autoloader of the bridge you can see that they use class_alias() to create the legacy classes (e.g. ZendRequest). Therefore, if you have laminas-diactoros and the bridge installed, you will actually use LaminasRequest, but an $laminasRequest instanceof ZendRequest will still hold true (and vice versa, tough that is unlikely to happen).
Sure, will do. |
3b40bfd
to
bcffd52
Compare
Rebased and changelog updated. I fixed some broken and missing links in the changelog as well. ;-) |
puli.json
Outdated
@@ -7,7 +7,7 @@ | |||
"class": "Http\\Message\\MessageFactory\\DiactorosMessageFactory", | |||
"type": "Http\\Message\\MessageFactory", | |||
"parameters": { | |||
"depends": "Zend\\Diactoros\\Request" | |||
"depends": "Laminas\\Diactoros\\Request" |
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.
not sure how many people use puli, but i think we should only add the laminas things but not replace zend.
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.
I am not using puli and also not sure about its usefullness in general, but the way in understand this would be that adding two dependencies would mean that both (AND) are required and not only one (OR). If this is the case, then we should leave it with laminas here.
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.
@Nyholm do you know if we can make puli detect both the old and the new class?
if we can't i opt to configure it with the old class. when the BC layer is there, that should even still work.
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.
@Nyholm wdyt?
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.
Im honestly not sure either.. :/
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.
Ok, then we should probably stick to the old class name...
can you please fix the cs issue? https://github.com/php-http/message/pull/134/checks?check_run_id=1246548559 if tobias can clarify the puli usage, we can adjust that, if not i suggest we revert the puli change to not introduce unexpected BC breaks. |
bcffd52
to
2d02b25
Compare
@dbu: Rebased on current master, fixed CS issue. Still awaiting the reply of @Nyholm regarding puli. |
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.
thank you!
What's in this PR?
This PR replaces zend/zend-diactoros with laminas/laminas-diactoros. Due to laminas/laminas-zendframework-bridge, there is no BC break.
Why?
Because zend/zend-diactoros is officially abandoned.