Loading core/includes/install.core.inc +4 −3 Changes for core/includes/install.core.inc: 4 added lines, 3 removed lines. Original line number Diff line number Diff line Loading @@ -35,12 +35,12 @@ use Drupal\language\ConfigurableLanguageManagerInterface; use Drupal\language\Entity\ConfigurableLanguage; use Drupal\Core\Routing\RouteObjectInterface; use Psr\Http\Client\ClientExceptionInterface; use Symfony\Component\DependencyInjection\Reference; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; use Symfony\Component\Routing\Route; use Drupal\user\Entity\User; use GuzzleHttp\Exception\TransferException; /** * Do not run the task during the current installation request. Loading Loading @@ -1446,9 +1446,10 @@ function install_retrieve_file($uri, $destination) { return FALSE; } } catch (TransferException $e) { catch (ClientExceptionInterface) { return FALSE; } return file_put_contents($path, $data) !== FALSE; } Loading @@ -1466,7 +1467,7 @@ function install_check_localization_server($uri) { \Drupal::httpClient()->head($uri); return TRUE; } catch (TransferException $e) { catch (ClientExceptionInterface) { return FALSE; } } Loading core/modules/locale/locale.batch.inc +2 −2 Changes for core/modules/locale/locale.batch.inc: 2 added lines, 2 removed lines. Original line number Diff line number Diff line Loading @@ -11,7 +11,7 @@ use Drupal\Core\Url; use GuzzleHttp\Exception\ConnectException; use GuzzleHttp\Exception\RequestException; use GuzzleHttp\Exception\TransferException; use Psr\Http\Client\ClientExceptionInterface; use Psr\Http\Message\RequestInterface; use Psr\Http\Message\ResponseInterface; use Psr\Http\Message\UriInterface; Loading Loading @@ -354,7 +354,7 @@ function locale_translation_download_source($source_file, $directory = 'temporar return $file; } } catch (TransferException $exception) { catch (ClientExceptionInterface $exception) { \Drupal::messenger()->addError(t('Failed to fetch file due to error "%error"', ['%error' => $exception->getMessage()])); } catch (FileException | InvalidStreamWrapperException $e) { Loading core/modules/media/src/OEmbed/ProviderRepository.php +2 −2 Changes for core/modules/media/src/OEmbed/ProviderRepository.php: 2 added lines, 2 removed lines. Original line number Diff line number Diff line Loading @@ -8,7 +8,7 @@ use Drupal\Core\KeyValueStore\KeyValueFactoryInterface; use Drupal\Core\Logger\LoggerChannelFactoryInterface; use GuzzleHttp\ClientInterface; use GuzzleHttp\Exception\TransferException; use Psr\Http\Client\ClientExceptionInterface; /** * Retrieves and caches information about oEmbed providers. Loading Loading @@ -100,7 +100,7 @@ public function getAll() { try { $response = $this->httpClient->request('GET', $this->providersUrl); } catch (TransferException $e) { catch (ClientExceptionInterface $e) { if (isset($stored['data'])) { // Use the stale data to fall back gracefully, but warn site // administrators that we used stale data. Loading core/modules/media/src/OEmbed/ResourceFetcher.php +2 −2 Changes for core/modules/media/src/OEmbed/ResourceFetcher.php: 2 added lines, 2 removed lines. Original line number Diff line number Diff line Loading @@ -5,8 +5,8 @@ use Drupal\Component\Serialization\Json; use Drupal\Core\Cache\CacheBackendInterface; use GuzzleHttp\ClientInterface; use GuzzleHttp\Exception\TransferException; use GuzzleHttp\RequestOptions; use Psr\Http\Client\ClientExceptionInterface; // cspell:ignore nocdata Loading Loading @@ -68,7 +68,7 @@ public function fetchResource($url) { RequestOptions::TIMEOUT => 5, ]); } catch (TransferException $e) { catch (ClientExceptionInterface $e) { throw new ResourceException('Could not retrieve the oEmbed resource.', $url, [], $e); } Loading core/modules/media/src/OEmbed/UrlResolver.php +2 −2 Changes for core/modules/media/src/OEmbed/UrlResolver.php: 2 added lines, 2 removed lines. Original line number Diff line number Diff line Loading @@ -7,7 +7,7 @@ use Drupal\Core\Cache\CacheBackendInterface; use Drupal\Core\Extension\ModuleHandlerInterface; use GuzzleHttp\ClientInterface; use GuzzleHttp\Exception\TransferException; use Psr\Http\Client\ClientExceptionInterface; // cspell:ignore omitscript Loading Loading @@ -96,7 +96,7 @@ protected function discoverResourceUrl($url) { try { $response = $this->httpClient->get($url); } catch (TransferException $e) { catch (ClientExceptionInterface) { return FALSE; } Loading Loading
core/includes/install.core.inc +4 −3 Changes for core/includes/install.core.inc: 4 added lines, 3 removed lines. Original line number Diff line number Diff line Loading @@ -35,12 +35,12 @@ use Drupal\language\ConfigurableLanguageManagerInterface; use Drupal\language\Entity\ConfigurableLanguage; use Drupal\Core\Routing\RouteObjectInterface; use Psr\Http\Client\ClientExceptionInterface; use Symfony\Component\DependencyInjection\Reference; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; use Symfony\Component\Routing\Route; use Drupal\user\Entity\User; use GuzzleHttp\Exception\TransferException; /** * Do not run the task during the current installation request. Loading Loading @@ -1446,9 +1446,10 @@ function install_retrieve_file($uri, $destination) { return FALSE; } } catch (TransferException $e) { catch (ClientExceptionInterface) { return FALSE; } return file_put_contents($path, $data) !== FALSE; } Loading @@ -1466,7 +1467,7 @@ function install_check_localization_server($uri) { \Drupal::httpClient()->head($uri); return TRUE; } catch (TransferException $e) { catch (ClientExceptionInterface) { return FALSE; } } Loading
core/modules/locale/locale.batch.inc +2 −2 Changes for core/modules/locale/locale.batch.inc: 2 added lines, 2 removed lines. Original line number Diff line number Diff line Loading @@ -11,7 +11,7 @@ use Drupal\Core\Url; use GuzzleHttp\Exception\ConnectException; use GuzzleHttp\Exception\RequestException; use GuzzleHttp\Exception\TransferException; use Psr\Http\Client\ClientExceptionInterface; use Psr\Http\Message\RequestInterface; use Psr\Http\Message\ResponseInterface; use Psr\Http\Message\UriInterface; Loading Loading @@ -354,7 +354,7 @@ function locale_translation_download_source($source_file, $directory = 'temporar return $file; } } catch (TransferException $exception) { catch (ClientExceptionInterface $exception) { \Drupal::messenger()->addError(t('Failed to fetch file due to error "%error"', ['%error' => $exception->getMessage()])); } catch (FileException | InvalidStreamWrapperException $e) { Loading
core/modules/media/src/OEmbed/ProviderRepository.php +2 −2 Changes for core/modules/media/src/OEmbed/ProviderRepository.php: 2 added lines, 2 removed lines. Original line number Diff line number Diff line Loading @@ -8,7 +8,7 @@ use Drupal\Core\KeyValueStore\KeyValueFactoryInterface; use Drupal\Core\Logger\LoggerChannelFactoryInterface; use GuzzleHttp\ClientInterface; use GuzzleHttp\Exception\TransferException; use Psr\Http\Client\ClientExceptionInterface; /** * Retrieves and caches information about oEmbed providers. Loading Loading @@ -100,7 +100,7 @@ public function getAll() { try { $response = $this->httpClient->request('GET', $this->providersUrl); } catch (TransferException $e) { catch (ClientExceptionInterface $e) { if (isset($stored['data'])) { // Use the stale data to fall back gracefully, but warn site // administrators that we used stale data. Loading
core/modules/media/src/OEmbed/ResourceFetcher.php +2 −2 Changes for core/modules/media/src/OEmbed/ResourceFetcher.php: 2 added lines, 2 removed lines. Original line number Diff line number Diff line Loading @@ -5,8 +5,8 @@ use Drupal\Component\Serialization\Json; use Drupal\Core\Cache\CacheBackendInterface; use GuzzleHttp\ClientInterface; use GuzzleHttp\Exception\TransferException; use GuzzleHttp\RequestOptions; use Psr\Http\Client\ClientExceptionInterface; // cspell:ignore nocdata Loading Loading @@ -68,7 +68,7 @@ public function fetchResource($url) { RequestOptions::TIMEOUT => 5, ]); } catch (TransferException $e) { catch (ClientExceptionInterface $e) { throw new ResourceException('Could not retrieve the oEmbed resource.', $url, [], $e); } Loading
core/modules/media/src/OEmbed/UrlResolver.php +2 −2 Changes for core/modules/media/src/OEmbed/UrlResolver.php: 2 added lines, 2 removed lines. Original line number Diff line number Diff line Loading @@ -7,7 +7,7 @@ use Drupal\Core\Cache\CacheBackendInterface; use Drupal\Core\Extension\ModuleHandlerInterface; use GuzzleHttp\ClientInterface; use GuzzleHttp\Exception\TransferException; use Psr\Http\Client\ClientExceptionInterface; // cspell:ignore omitscript Loading Loading @@ -96,7 +96,7 @@ protected function discoverResourceUrl($url) { try { $response = $this->httpClient->get($url); } catch (TransferException $e) { catch (ClientExceptionInterface) { return FALSE; } Loading