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
PSR-17 support #43
PSR-17 support #43
Conversation
Removing milestone: I don't have the understanding (right now) to review this patch, so I requested a review from @weierophinney. Today, I'll focus on PHP 8.1 support. |
is there any greater benefit for making seperate internal methods instead of assertAttributeSame (which uses reflection)? bumping php to 7.4 might also be suitable as 7.3 reached EOL. |
in case of the the same principle would apply to
it is a bit a roundabout way to do it but at least it would not litter up the public interface with test-only things. |
Since I stopped working on this as of now, I'd be happy to hand this over. |
@boesing i created a new PR "PSR-17 support #46" based on your work |
Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
- removed some prophecy usage - removed some private attribute assertions Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
5a906f4
to
ccdb10a
Compare
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.
@boesing I rebased against 2.3.x as we've already released 2.2.0. When I did, I bumped the minimum supported PHP to 7.4... and Psalm then flagged a few additional errors, which I fixed, but which were not really related to this.
I've marked a couple nit-picky changes; but otherwise, this makes sense, and I think it's ready to ship.
return new CallableResponseFactoryDecorator($responseFactory); | ||
} | ||
|
||
private function doesConfigurationProvidesDedicatedResponseFactory(ContainerInterface $container): bool |
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.
private function doesConfigurationProvidesDedicatedResponseFactory(ContainerInterface $container): bool | |
private function configurationProvidesDedicatedResponseFactory(ContainerInterface $container): bool |
Reads with a bit more flow.
Assert::isArrayAccessible($aliases); | ||
|
||
if (isset($delegators[ResponseInterface::class]) || isset($aliases[ResponseInterface::class])) { | ||
// Even tho, aliases could point to a different service, we assume that there is a dedicated factory |
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.
// Even tho, aliases could point to a different service, we assume that there is a dedicated factory | |
// Even though aliases could point to a different service, we assume that there is a dedicated factory |
Closing in favor of #46. |
Description
As already done in mezzio/mezzio#75, mezzio/mezzio-router#23 and mezzio/mezzio-problem-details#19 this PR provides support for PSR-17 response factory.
I started removing some prophecy stuff but this is getting too much thus I stopped. Guess I've removed about 50% but I want to focus more on the PSR-17 implementation now. Sorry for not finishing it.