diff -u b/core/modules/user/user.pages.inc b/core/modules/user/user.pages.inc --- b/core/modules/user/user.pages.inc +++ b/core/modules/user/user.pages.inc @@ -420,8 +420,7 @@ function user_page() { global $user; if ($user->uid) { - $request = drupal_container()->get('request'); - return new RedirectResponse($request->getUriForPath('/user/' . $user->uid)); + return new RedirectResponse(url('user/' . $user->uid, array('absolute' => TRUE))); } else { return drupal_get_form('user_login'); --- a/core/modules/system/lib/Drupal/system/Tests/Upgrade/UpgradePathTestBase.php +++ b/core/modules/system/lib/Drupal/system/Tests/Upgrade/UpgradePathTestBase.php @@ -10,6 +10,7 @@ namespace Drupal\system\Tests\Upgrade; use Drupal\Core\Database\Database; use Drupal\simpletest\WebTestBase; use Exception; +use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException; /** * Perform end-to-end tests of the upgrade path. @@ -251,8 +252,14 @@ abstract class UpgradePathTestBase extends WebTestBase { module_implements_reset(); // Rebuild caches. + // @todo Remove the try/catch when UpgradePathTestBase::setup() is fixed to + // boot DrupalKernel (as WebTestBase::setup() does). drupal_static_reset(); - drupal_flush_all_caches(); + try { + drupal_flush_all_caches(); + } + catch (InvalidArgumentException $e) { + } // Reload global $conf array and permissions. $this->refreshVariables(); --- a/core/update.php +++ b/core/update.php @@ -16,6 +16,7 @@ use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; +use Symfony\Component\DependencyInjection\Reference; // Change the directory to the Drupal root. chdir('..'); @@ -445,6 +446,17 @@ update_fix_d8_requirements(); drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL); drupal_maintenance_theme(); +// @todo Remove after converting update.php to use DrupalKernel. +$container = drupal_container(); +$container->register('database', 'Drupal\Core\Database\Connection') + ->setFactoryClass('Drupal\Core\Database\Database') + ->setFactoryMethod('getConnection') + ->addArgument('default'); +$container->register('router.dumper', '\Drupal\Core\Routing\MatcherDumper') + ->addArgument(new Reference('database')); +$container->register('router.builder', 'Drupal\Core\Routing\RouteBuilder') + ->addArgument(new Reference('router.dumper')); + // Turn error reporting back on. From now on, only fatal errors (which are // not passed through the error handler) will cause a message to be printed. ini_set('display_errors', TRUE);