diff --git a/core/modules/update/tests/src/Unit/UpdateFetcherTest.php b/core/modules/update/tests/src/Unit/UpdateFetcherTest.php index c3e447d..e89b7b3 100644 --- a/core/modules/update/tests/src/Unit/UpdateFetcherTest.php +++ b/core/modules/update/tests/src/Unit/UpdateFetcherTest.php @@ -2,6 +2,7 @@ namespace Drupal\Tests\update\Unit; +use Drupal\Core\Site\Settings; use Drupal\Tests\UnitTestCase; use Drupal\update\UpdateFetcher; @@ -29,7 +30,8 @@ class UpdateFetcherTest extends UnitTestCase { protected function setUp() { $config_factory = $this->getConfigFactoryStub(['update.settings' => ['fetch_url' => 'http://www.example.com']]); $http_client_mock = $this->getMock('\GuzzleHttp\ClientInterface'); - $this->updateFetcher = new UpdateFetcher($config_factory, $http_client_mock); + $settings = new Settings([]); + $this->updateFetcher = new UpdateFetcher($config_factory, $http_client_mock, $settings); } /** diff --git a/sites/default/default.settings.php b/sites/default/default.settings.php index c7dd194..1e1e2cd 100644 --- a/sites/default/default.settings.php +++ b/sites/default/default.settings.php @@ -321,6 +321,17 @@ $settings['update_free_access'] = FALSE; /** + * Fallback to HTTP for update status. + * + * If your Drupal site fails to connect to drupal.org using HTTPS to fetch + * Drupal core and module update status, you may uncomment this setting + * and set to TRUE to allow an insecure fallback to HTTP. + * + * @see \Drupal\update\UpdateFetcher + */ +# $settings['update_fetch_with_http_fallback'] = FALSE; + +/** * External access proxy settings: * * If your site must access the Internet via a web proxy then you can enter the