Skip to content
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

FIX Guzzle Client options can be configured by extensions #114

Merged

Conversation

robbieaverill
Copy link
Contributor

In the Common Web Platform, or any other network that requires a proxy for outgoing HTTP requests, we need to configure the proxy settings before these requests get made.

Request points:

  • ApiLoader to addons.silverstripe.org
  • Composer Update Checker to GitHub/Packagist/other
  • Security Checker to SensioLabs

This PR adds configurability to the ApiLoader, while the Update Checker can be configured using $_SERVER['CGI_HTTP_PROXY'] and Security Checker via HTTP_PROXY and HTTPS_PROXY environment variables and will be detected automatically.

The ApiLoader uses Guzzle which needs these defined explicitly, and the update checker uses Composer which creates its own stream context, therefore also needs to be configured. Clients like CWP can define input points such as $_SERVER['CGI_HTTP_PROXY'] before the ComposerLoaderExtension::onAfterBuild is run which is the point that Composer is created with its config.

Probably more of a minor semver change but I'd like to treat this as a patch since it's fixing a bug and is backwards compatible.

Fixes #113

@NightJar NightJar merged commit eec67db into bringyourownideas:master Jun 26, 2018
@NightJar NightJar deleted the pulls/2.0/client-options branch June 26, 2018 03:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Can't use module on CWP platform
2 participants