diff --git a/autoload.php b/autoload.php index 690e09f8e9bfb130b17b7dd6f7c6602b26aed1ed..caedb48a19b861220cf52576006813ec3a529349 100644 --- a/autoload.php +++ b/autoload.php @@ -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'; diff --git a/core/includes/install.core.inc b/core/includes/install.core.inc index 7e3398645c48362472a3a8615d1ed88b836a06a9..b78fd9d5dab12b9f33148af03f729a6666e896f9 100644 --- a/core/includes/install.core.inc +++ b/core/includes/install.core.inc @@ -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; diff --git a/core/modules/simpletest/src/InstallerTestBase.php b/core/modules/simpletest/src/InstallerTestBase.php index 11e9076cb5dc6076f2ae82ef93cd37a235e349d5..c340c92c02dc4e4295801bf7b94cbe2d528d317a 100644 --- a/core/modules/simpletest/src/InstallerTestBase.php +++ b/core/modules/simpletest/src/InstallerTestBase.php @@ -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; diff --git a/core/modules/simpletest/src/KernelTestBase.php b/core/modules/simpletest/src/KernelTestBase.php index 14b839b19beb25c9c769a5d09ba0bb3ae43069f3..abc1f20ed755a6dd73fd0f305ad0d80a4875e58c 100644 --- a/core/modules/simpletest/src/KernelTestBase.php +++ b/core/modules/simpletest/src/KernelTestBase.php @@ -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); diff --git a/core/modules/simpletest/src/WebTestBase.php b/core/modules/simpletest/src/WebTestBase.php index 63cf76a9e67e58edf98e238f224988a1c8b3e211..708845609d22f897aedcdb2d9395141efa5b74fd 100644 --- a/core/modules/simpletest/src/WebTestBase.php +++ b/core/modules/simpletest/src/WebTestBase.php @@ -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. diff --git a/core/modules/system/src/Tests/DrupalKernel/DrupalKernelTest.php b/core/modules/system/src/Tests/DrupalKernel/DrupalKernelTest.php index ebd83075132ed9f4ef97407903231fdb35021d4d..03e56fcdf5d7c1faf54e002ee37780f8e3f7e01c 100644 --- a/core/modules/system/src/Tests/DrupalKernel/DrupalKernelTest.php +++ b/core/modules/system/src/Tests/DrupalKernel/DrupalKernelTest.php @@ -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', diff --git a/core/modules/system/src/Tests/System/IgnoreReplicaSubscriberTest.php b/core/modules/system/src/Tests/System/IgnoreReplicaSubscriberTest.php index 3615c43a9a7d644bdbccbac8f23fc729d2446643..18298f9e94fc1fef17e418c497d60cfc83f38b19 100644 --- a/core/modules/system/src/Tests/System/IgnoreReplicaSubscriberTest.php +++ b/core/modules/system/src/Tests/System/IgnoreReplicaSubscriberTest.php @@ -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(); diff --git a/core/scripts/migrate-dump-d6.sh b/core/scripts/migrate-dump-d6.sh index 11e05c57961080dec9809eb8d32dc66da7dd359a..6d9b3660e86e1cba0042973a48719b4113022542 100755 --- a/core/scripts/migrate-dump-d6.sh +++ b/core/scripts/migrate-dump-d6.sh @@ -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(); diff --git a/core/scripts/password-hash.sh b/core/scripts/password-hash.sh index b1cfa2f9da5901cac50ec9e2b98824b479c346a8..cf5e9e3824687fee9761e7ac29240d9c4aa561d5 100755 --- a/core/scripts/password-hash.sh +++ b/core/scripts/password-hash.sh @@ -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); diff --git a/core/scripts/rebuild_token_calculator.sh b/core/scripts/rebuild_token_calculator.sh index 87c306995e6cc40837f12940f6234909083b293b..38a64ab119c055feb58e090ee11257430c51c110 100755 --- a/core/scripts/rebuild_token_calculator.sh +++ b/core/scripts/rebuild_token_calculator.sh @@ -15,7 +15,7 @@ return; } -require __DIR__ . '/../vendor/autoload.php'; +require __DIR__ . '/../../autoload.php'; require_once __DIR__ . '/../includes/bootstrap.inc'; $request = Request::createFromGlobals(); diff --git a/core/scripts/run-tests.sh b/core/scripts/run-tests.sh old mode 100644 new mode 100755 diff --git a/core/tests/bootstrap.php b/core/tests/bootstrap.php index 76f745cf8178fd6474e53ea55c0839a581f76369..d0512e108203b9bf17ab42b5e8b10efd845d156c 100644 --- a/core/tests/bootstrap.php +++ b/core/tests/bootstrap.php @@ -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.