Update to Drupal 8.1.0. For more information, see https://www.drupal.org/drupal-8.1.0-release-notes

This commit is contained in:
Pantheon Automation 2016-04-20 09:56:34 -07:00 committed by Greg Anderson
parent b11a755ba8
commit c0a0d5a94c
6920 changed files with 64395 additions and 57312 deletions

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\update\Access\UpdateManagerAccessCheck.
*/
namespace Drupal\update\Access;
use Drupal\Core\Access\AccessResult;

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\update\Controller\UpdateController.
*/
namespace Drupal\update\Controller;
use Drupal\update\UpdateManagerInterface;

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\update\Form\UpdateManagerInstall.
*/
namespace Drupal\update\Form;
use Drupal\Core\Extension\ModuleHandlerInterface;
@ -128,7 +123,7 @@ class UpdateManagerInstall extends FormBase {
*/
public function validateForm(array &$form, FormStateInterface $form_state) {
$uploaded_file = $this->getRequest()->files->get('files[project_upload]', NULL, TRUE);
if (!($form_state->getValue('project_url') XOR !empty($uploaded_file))) {
if (!($form_state->getValue('project_url') xor !empty($uploaded_file))) {
$form_state->setErrorByName('project_url', $this->t('You must either provide a URL or upload an archive file to install.'));
}
}
@ -245,7 +240,7 @@ class UpdateManagerInstall extends FormBase {
// The page title must be passed here to ensure it is initially used when
// authorize.php loads for the first time with the FTP/SSH credentials
// form.
system_authorized_init('update_authorize_run_install', drupal_get_path('module', 'update') . '/update.authorize.inc', $arguments, $this->t('Update manager'));
system_authorized_init('update_authorize_run_install', __DIR__ . '/../../update.authorize.inc', $arguments, $this->t('Update manager'));
$form_state->setRedirectUrl(system_authorized_get_url());
}
}

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\update\Form\UpdateManagerUpdate.
*/
namespace Drupal\update\Form;
use Drupal\Core\Extension\ModuleHandlerInterface;
@ -39,7 +34,7 @@ class UpdateManagerUpdate extends FormBase {
* @param \Drupal\Core\Extension\ModuleHandlerInterface $module_handler
* The module handler.
* @param \Drupal\Core\State\StateInterface $state
* The state service.
* The state service.
*/
public function __construct(ModuleHandlerInterface $module_handler, StateInterface $state) {
$this->moduleHandler = $module_handler;

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\update\Form\UpdateReady.
*/
namespace Drupal\update\Form;
use Drupal\Core\Extension\ModuleHandlerInterface;
@ -169,7 +164,7 @@ class UpdateReady extends FormBase {
// The page title must be passed here to ensure it is initially used
// when authorize.php loads for the first time with the FTP/SSH
// credentials form.
system_authorized_init('update_authorize_run_update', drupal_get_path('module', 'update') . '/update.authorize.inc', array($updates), $this->t('Update manager'));
system_authorized_init('update_authorize_run_update', __DIR__ . '/../../update.authorize.inc', array($updates), $this->t('Update manager'));
$form_state->setRedirectUrl(system_authorized_get_url());
}
}

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\update\Tests\UpdateContribTest.
*/
namespace Drupal\update\Tests;
use Drupal\Core\Url;

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\update\Tests\UpdateCoreTest.
*/
namespace Drupal\update\Tests;
use Drupal\Core\Url;
@ -176,7 +171,7 @@ class UpdateCoreTest extends UpdateTestBase {
$system_info = array(
'#all' => array(
// We need to think we're running a -dev snapshot to see dates.
'version' => '8.0.0-dev',
'version' => '8.1.0-dev',
'datestamp' => time(),
),
'block' => array(

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\update\Tests\UpdateDeleteFileIfStaleTest.
*/
namespace Drupal\update\Tests;
/**

View file

@ -1,8 +1,13 @@
<?php
namespace Drupal\update\Tests;
use Drupal\Core\DrupalKernel;
use Drupal\Core\Url;
use Drupal\simpletest\WebTestBase;
/**
* @file
* Contains \Drupal\update\Tests\UpdateTestBase.
* Defines some shared functions used by all update tests.
*
* The overarching methodology of these tests is we need to compare a given
* state of installed modules and themes (e.g., version, project grouping,
@ -18,16 +23,6 @@
* assertions that the report matches our expectations given the specific
* initial state and availability scenario.
*/
namespace Drupal\update\Tests;
use Drupal\Core\DrupalKernel;
use Drupal\Core\Url;
use Drupal\simpletest\WebTestBase;
/**
* Defines some shared functions used by all update tests.
*/
abstract class UpdateTestBase extends WebTestBase {
protected function setUp() {

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\update\Tests\UpdateUploadTest.
*/
namespace Drupal\update\Tests;
use Drupal\Core\Extension\InfoParserDynamic;
@ -52,7 +47,7 @@ class UpdateUploadTest extends UpdateTestBase {
// Check to ensure an existing module can't be reinstalled. Also checks that
// the archive was extracted since we can't know if the module is already
// installed until after extraction.
$validArchiveFile = drupal_get_path('module', 'update') . '/tests/aaa_update_test.tar.gz';
$validArchiveFile = __DIR__ . '/../../tests/aaa_update_test.tar.gz';
$edit = array(
'files[project_upload]' => $validArchiveFile,
);
@ -65,7 +60,7 @@ class UpdateUploadTest extends UpdateTestBase {
$moduleUpdater = $updaters['module']['class'];
$installedInfoFilePath = $this->container->get('update.root') . '/' . $moduleUpdater::getRootDirectoryRelativePath() . '/update_test_new_module/update_test_new_module.info.yml';
$this->assertFalse(file_exists($installedInfoFilePath), 'The new module does not exist in the filesystem before it is installed with the Update Manager.');
$validArchiveFile = drupal_get_path('module', 'update') . '/tests/update_test_new_module/8.x-1.0/update_test_new_module.tar.gz';
$validArchiveFile = __DIR__ . '/../../tests/update_test_new_module/8.x-1.0/update_test_new_module.tar.gz';
$edit = array(
'files[project_upload]' => $validArchiveFile,
);

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\update\UpdateFetcher.
*/
namespace Drupal\update;
use Drupal\Core\Config\ConfigFactoryInterface;

View file

@ -1,8 +1,4 @@
<?php
/**
* @file
* Contains \Drupal\update\UpdateFetcherInterface.
*/
namespace Drupal\update;

View file

@ -1,8 +1,4 @@
<?php
/**
* @file
* Contains \Drupal\update\UpdateManager.
*/
namespace Drupal\update;

View file

@ -1,8 +1,4 @@
<?php
/**
* @file
* Contains \Drupal\update\UpdateManagerInterface.
*/
namespace Drupal\update;

View file

@ -1,8 +1,4 @@
<?php
/**
* @file
* Contains \Drupal\update\UpdateProcessor.
*/
namespace Drupal\update;

View file

@ -1,8 +1,4 @@
<?php
/**
* @file
* Contains \Drupal\update\UpdateProcessorInterface.
*/
namespace Drupal\update;

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\update\UpdateRootFactory.
*/
namespace Drupal\update;
use Drupal\Core\DrupalKernelInterface;
@ -35,7 +30,7 @@ class UpdateRootFactory {
* @param \Drupal\Core\DrupalKernelInterface $drupal_kernel
* The Drupal kernel.
* @param \Symfony\Component\HttpFoundation\RequestStack $request_stack
* The request stack.
* The request stack.
*/
public function __construct(DrupalKernelInterface $drupal_kernel, RequestStack $request_stack) {
$this->drupalKernel = $drupal_kernel;

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\update\UpdateSettingsForm.
*/
namespace Drupal\update;
use Drupal\Core\DependencyInjection\ContainerInjectionInterface;

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\update_test\Controller\UpdateTestController.
*/
namespace Drupal\update_test\Controller;
use Drupal\Core\Controller\ControllerBase;
@ -68,8 +63,7 @@ class UpdateTestController extends ControllerBase {
$availability_scenario = '#broken#';
}
$path = drupal_get_path('module', 'update_test');
$file = "$path/$project_name.$availability_scenario.xml";
$file = __DIR__ . "/../../$project_name.$availability_scenario.xml";
$headers = array('Content-Type' => 'text/xml; charset=utf-8');
if (!is_file($file)) {
// Return an empty response.

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\update_test\MockFileTransfer.
*/
namespace Drupal\update_test;
/**

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\update_test\Plugin\Archiver\UpdateTestArchiver.
*/
namespace Drupal\update_test\Plugin\Archiver;
use Drupal\Core\Archiver\ArchiverInterface;

View file

@ -1,12 +1,12 @@
<?php
use Drupal\Core\Extension\Extension;
/**
* @file
* Module for testing Update Manager functionality.
*/
use Drupal\Core\Extension\Extension;
/**
* Implements hook_system_info_alter().
*

View file

@ -1,14 +1,9 @@
<?php
/**
* @file
* Contains \Drupal\update\Tests\Migrate\d6\MigrateUpdateConfigsTest.
*/
namespace Drupal\update\Tests\Migrate\d6;
namespace Drupal\Tests\update\Kernel\Migrate\d6;
use Drupal\config\Tests\SchemaCheckTestTrait;
use Drupal\migrate_drupal\Tests\d6\MigrateDrupal6TestBase;
use Drupal\Tests\migrate_drupal\Kernel\d6\MigrateDrupal6TestBase;
/**
* Upgrade variables to update.settings.yml.

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\Tests\update\Unit\Menu\UpdateLocalTasksTest.
*/
namespace Drupal\Tests\update\Unit\Menu;
use Drupal\Tests\Core\Menu\LocalTaskIntegrationTestBase;

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\Tests\update\Unit\UpdateFetcherTest.
*/
namespace Drupal\Tests\update\Unit;
use Drupal\Tests\UnitTestCase;