diff --git a/core/includes/form.inc b/core/includes/form.inc index 7c75003..694fb41 100644 --- a/core/includes/form.inc +++ b/core/includes/form.inc @@ -745,8 +745,9 @@ function batch_set($batch_definition) { * This function is generally not needed in form submit handlers; * Form API takes care of batches that were set during form submission. * - * @param $redirect - * (optional) Path to redirect to when the batch has finished processing. + * @param \Drupal\Core\Url|string $redirect + * (optional) Either path or Url object to redirect to when the batch has + * finished processing. * @param \Drupal\Core\Url $url * (optional - should only be used for separate scripts like update.php) * URL of the batch processing page. @@ -831,8 +832,7 @@ function batch_process($redirect = NULL, Url $url = NULL, $redirect_callback = N $function($batch_url->toString(), ['query' => $query_options]); } else { - $batch_url->setAbsolute(); - return new RedirectResponse($batch_url->toString()); + return new RedirectResponse($batch_url->setAbsolute()->toString()); } } else { diff --git a/core/lib/Drupal/Core/Routing/UrlGenerator.php b/core/lib/Drupal/Core/Routing/UrlGenerator.php index e910044..1926d44 100644 --- a/core/lib/Drupal/Core/Routing/UrlGenerator.php +++ b/core/lib/Drupal/Core/Routing/UrlGenerator.php @@ -251,8 +251,7 @@ public function generateFromPath($path = NULL, $options = array()) { // \Drupal\Component\Utility\UrlHelper::stripDangerousProtocols() if $path // contains a ':' before any / ? or #. Note: we could use // \Drupal\Component\Utility\UrlHelper::isExternal($path) here, but that - // would require another function call, and performance inside this is - // critical. + // would require another function call, and performance here is critical. $colonpos = strpos($path, ':'); $options['external'] = ($colonpos !== FALSE && !preg_match('![/?#]!', substr($path, 0, $colonpos)) && UrlHelper::stripDangerousProtocols($path) == $path); } diff --git a/core/modules/hal/src/Tests/NormalizerTestBase.php b/core/modules/hal/src/Tests/NormalizerTestBase.php index 43f10b1..8a279d5 100644 --- a/core/modules/hal/src/Tests/NormalizerTestBase.php +++ b/core/modules/hal/src/Tests/NormalizerTestBase.php @@ -135,6 +135,7 @@ protected function setUp() { $entity_manager = \Drupal::entityManager(); $url_assembler = \Drupal::service('unrouted_url_assembler'); + // @see \Drupal\rest\LinkManager\LinkManager() $link_manager = new LinkManager(new TypeLinkManager(new MemoryBackend('default'), $url_assembler), new RelationLinkManager(new MemoryBackend('default'), $entity_manager, $url_assembler)); $chain_resolver = new ChainEntityResolver(array(new UuidResolver($entity_manager), new TargetIdResolver())); diff --git a/core/modules/image/src/Entity/ImageStyle.php b/core/modules/image/src/Entity/ImageStyle.php index 707a1b4..624eea0 100644 --- a/core/modules/image/src/Entity/ImageStyle.php +++ b/core/modules/image/src/Entity/ImageStyle.php @@ -220,8 +220,9 @@ public function buildUrl($path, $clean_urls = NULL) { // If not using clean URLs, the image derivative callback is only available // with the script path. If the file does not exist, use Url::fromUri() to - // ensure that it is included. Once the file exists it's fine to fall back to the - // actual file path, this avoids bootstrapping PHP once the files are built. + // ensure that it is included. Once the file exists it's fine to fall back + // to the actual file path, this avoids bootstrapping PHP once the files are + // built. if ($clean_urls === FALSE && file_uri_scheme($uri) == 'public' && !file_exists($uri)) { $directory_path = file_stream_wrapper_get_instance_by_uri($uri)->getDirectoryPath(); return Url::fromUri('base://' . $directory_path . '/' . file_uri_target($uri), array('absolute' => TRUE, 'query' => $token_query))->toString();