-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[AssetMapper][FrameworkBundle] Do not require http_client
service
#57073
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
Hey! Thanks for your PR. You are targeting branch "7.2" but it seems your PR description refers to branch "6.4". Cheers! Carsonbot |
http_client
servicehttp_client
service
@carsonbot done |
http_client
servicehttp_client
service
http_client
servicehttp_client
service
Ah: why do you consider this as a bugfix? To me it's for 7.2 |
To me it's a bug and not a feature? It's not working without the service defined. |
) { | ||
$this->httpClient = $httpClient ?? HttpClient::create(); |
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.
The changes here do not qualify as a bugfix to me. I think for 6.4 we should remove the asset mapper services instead that require the http_client
service.
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.
here is a PR implementing my suggestion: #57219
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.
As explained, new feature for 7.2.
This makes it possible to use AssetMapper with `http_client` disabled on the framework. Example: ```php $configurator->extension( 'framework', [ 'http_client' => [ 'enabled' => false, ], 'asset_mapper' => [ 'paths' => [ 'assets/', ], ], ] ); ```
ce00298
to
b5e39ec
Compare
Thank you @ruudk. |
…se asset-mapper while http-client is disabled (nicolas-grekas) This PR was merged into the 6.4 branch. Discussion ---------- [FrameworkBundle] Throw runtime exception when trying to use asset-mapper while http-client is disabled | Q | A | ------------- | --- | Branch? | 6.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | Issues | - | License | MIT Replaces #57219 and #57073 Commits ------- df133a9 [FrameworkBundle] Throw runtime exception when trying to use asset-mapper while http-client is disabled
This makes it possible to use AssetMapper with
http_client
disabled on the framework.It will automatically instantiate the required HttpClient.
Example:
This fixes the following problems: