4.x - Improve AppFactory & ServerRequestCreatorFactory Automatic Decoration#2716
Merged
Merged
Conversation
l0gicgate
force-pushed
the
4.x-ImproveAutomaticDecoration
branch
from
June 6, 2019 03:40
b979123 to
22f7157
Compare
Contributor
|
Cool. |
Merged
chriscct7
pushed a commit
to awesomemotive/aioseo-slim-v3-php-8.1
that referenced
this pull request
Sep 3, 2025
…coration 4.x - Improve AppFactory & ServerRequestCreatorFactory Automatic Decoration
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
AppFactory's New Behavior
AppFactorywill attempt to decorateResponseFactoryinstances passed viaAppFactory::create()or set viaAppFactory::setResponseFactory()given that aStreamFactoryInterfacehas been set viaAppFactory::setStreamFactory()given thatSlim\Httpis present.Note that the
AppFactorysetters will override any of the PSR-17 factory provider automatically detected implementations.ServerRequestCreatorFactory's New Behavior
Similarly to
AppFactoryyou can set a defaultServerRequestCreatorwhich implementsServerRequestCreatorInterfacethat will override the automatically detected server request creators present in the PSR-17 factory provider.This PR effectively closes #2709, #2710, #2712 and #2713