-
Notifications
You must be signed in to change notification settings - Fork 11k
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
[6.x] Utilize Symfony’s PSR Factory #31018
[6.x] Utilize Symfony’s PSR Factory #31018
Conversation
- replace DiactorosFactory with Symfony’s PSR Factory and recommended implementaiton - replace Diactoros Resposne with Nyholm’s Response per Symfony docs recommendation
Thanks for the PR. Please update the suggest blocks in the composer.json file. |
(in both composer.json files) |
- updated routing composer on psr-http-bridge language inline with base composer file
FYI - Updated composer files |
Thanks for this. I've left some more comments. :) |
if (class_exists(ZendPsrResponse::class)) { | ||
return new ZendPsrResponse; | ||
} | ||
|
||
throw new Exception('Unable to resolve PSR response. Please install nyholm/psr7 or laminas/laminas-diactoros.'); |
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.
Since we're not actually supporting zendframework/zend-diactoros
as per the previous discussion, and the zend stuff is now deprecated, maybe we should only recommend nyholm/psr7
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.
So, we'll have:
Unable to resolve PSR response. Please install nyholm/psr7.
if (class_exists(DiactorosFactory::class)) { | ||
return (new DiactorosFactory)->createRequest($app->make('request')); | ||
} | ||
|
||
throw new Exception('Unable to resolve PSR request. Please install nyholm/psr7 or laminas/laminas-diactoros.'); |
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.
We should probably replace this message with:
Unable to resolve PSR request. Please install symfony/psr-http-message-bridge.
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.
Probably should be both since that Psr17Factory comes from the nyholm package?
Unable to resolve PSR request. Please install symfony/psr-http-message-bridge and nyholm/psr7.
Closes #31017.