Commit 8b2f85b5 authored by alexpott's avatar alexpott

Issue #2458045 by webflo: Remove calls to core/vendor/autoload.php

parent 6d04d2b8
......@@ -16,4 +16,4 @@
* @see core/modules/statistics/statistics.php
*/
return require_once __DIR__ . '/core/vendor/autoload.php';
return require __DIR__ . '/core/vendor/autoload.php';
......@@ -98,7 +98,7 @@ function install_drupal($class_loader, $settings = array()) {
// infrastructure in https://www.drupal.org/node/2389243
if (is_array($class_loader) && $settings === array()) {
$settings = $class_loader;
$class_loader = require __DIR__ . '/../vendor/autoload.php';
$class_loader = require __DIR__ . '/../../autoload.php';
}
global $install_state;
......
......@@ -140,7 +140,7 @@ protected function setUp() {
// Import new settings.php written by the installer.
$request = Request::createFromGlobals();
$class_loader = require $this->container->get('app.root') . '/core/vendor/autoload.php';
$class_loader = require $this->container->get('app.root') . '/autoload.php';
Settings::initialize($this->container->get('app.root'), DrupalKernel::findSitePath($request), $class_loader);
foreach ($GLOBALS['config_directories'] as $type => $path) {
$this->configDirectories[$type] = $path;
......
......@@ -178,7 +178,7 @@ protected function setUp() {
$GLOBALS['conf']['container_service_providers']['TestServiceProvider'] = 'Drupal\simpletest\TestServiceProvider';
// Bootstrap a new kernel.
$class_loader = require DRUPAL_ROOT . '/core/vendor/autoload.php';
$class_loader = require DRUPAL_ROOT . '/autoload.php';
$this->kernel = new DrupalKernel('testing', $class_loader, FALSE);
$request = Request::create('/');
$site_path = DrupalKernel::findSitePath($request);
......
......@@ -862,7 +862,7 @@ protected function setUp() {
// Since Drupal is bootstrapped already, install_begin_request() will not
// bootstrap again. Hence, we have to reload the newly written custom
// settings.php manually.
$class_loader = require DRUPAL_ROOT . '/core/vendor/autoload.php';
$class_loader = require DRUPAL_ROOT . '/autoload.php';
Settings::initialize(DRUPAL_ROOT, $this->siteDirectory, $class_loader);
// Execute the non-interactive installer.
......
......@@ -61,7 +61,7 @@ protected function prepareConfigDirectories() {
*/
protected function getTestKernel(Request $request, array $modules_enabled = NULL, $read_only = FALSE) {
// Manually create kernel to avoid replacing settings.
$class_loader = require DRUPAL_ROOT . '/core/vendor/autoload.php';
$class_loader = require DRUPAL_ROOT . '/autoload.php';
$kernel = DrupalKernel::createFromRequest($request, $class_loader, 'testing');
$this->settingsSet('container_yamls', []);
$this->settingsSet('hash_salt', $this->databasePrefix);
......@@ -168,7 +168,7 @@ public function testCompileDIC() {
*/
public function testRepeatedBootWithDifferentEnvironment() {
$request = Request::createFromGlobals();
$class_loader = require DRUPAL_ROOT . '/core/vendor/autoload.php';
$class_loader = require DRUPAL_ROOT . '/autoload.php';
$environments = [
'testing1',
......
......@@ -32,7 +32,7 @@ function testSystemInitIgnoresSecondaries() {
Database::addConnectionInfo('default', 'replica', $connection_info['default']);
db_ignore_replica();
$class_loader = require \Drupal::root() . '/core/vendor/autoload.php';
$class_loader = require \Drupal::root() . '/autoload.php';
$kernel = new DrupalKernel('testing', $class_loader, FALSE);
$event = new GetResponseEvent($kernel, Request::create('http://example.com'), HttpKernelInterface::MASTER_REQUEST);
$subscriber = new ReplicaDatabaseIgnoreSubscriber();
......
......@@ -29,7 +29,7 @@
return;
}
$autoloader = require __DIR__ . '/../vendor/autoload.php';
$autoloader = require __DIR__ . '/../../autoload.php';
require_once __DIR__ . '/../includes/bootstrap.inc';
$request = Request::createFromGlobals();
......
......@@ -55,7 +55,7 @@
// Password list to be processed.
$passwords = $_SERVER['argv'];
$autoloader = require __DIR__ . '/../vendor/autoload.php';
$autoloader = require __DIR__ . '/../../autoload.php';
$request = Request::createFromGlobals();
$kernel = DrupalKernel::createFromRequest($request, $autoloader, 'prod', FALSE);
......
......@@ -15,7 +15,7 @@
return;
}
require __DIR__ . '/../vendor/autoload.php';
require __DIR__ . '/../../autoload.php';
require_once __DIR__ . '/../includes/bootstrap.inc';
$request = Request::createFromGlobals();
......
File mode changed from 100644 to 100755
......@@ -68,7 +68,7 @@ function drupal_phpunit_register_extension_dirs(Composer\Autoload\ClassLoader $l
}
// Start with classes in known locations.
$loader = require __DIR__ . '/../vendor/autoload.php';
$loader = require __DIR__ . '/../../autoload.php';
$loader->add('Drupal\\Tests', __DIR__);
// Scan for arbitrary extension namespaces from core and contrib.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment