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:
parent
b11a755ba8
commit
c0a0d5a94c
6920 changed files with 64395 additions and 57312 deletions
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\forum\Breadcrumb\ForumBreadcrumbBuilderBase.
|
||||
*/
|
||||
|
||||
namespace Drupal\forum\Breadcrumb;
|
||||
|
||||
use Drupal\Core\Breadcrumb\BreadcrumbBuilderInterface;
|
||||
|
|
|
|||
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\forum\Breadcrumb\ForumListingBreadcrumbBuilder.
|
||||
*/
|
||||
|
||||
namespace Drupal\forum\Breadcrumb;
|
||||
|
||||
use Drupal\Core\Link;
|
||||
|
|
|
|||
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\forum\Breadcrumb\ForumNodeBreadcrumbBuilder.
|
||||
*/
|
||||
|
||||
namespace Drupal\forum\Breadcrumb;
|
||||
|
||||
use Drupal\Core\Link;
|
||||
|
|
|
|||
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\forum\Controller\ForumController.
|
||||
*/
|
||||
|
||||
namespace Drupal\forum\Controller;
|
||||
|
||||
use Drupal\Core\Cache\Cache;
|
||||
|
|
|
|||
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\forum\Form\ContainerForm.
|
||||
*/
|
||||
|
||||
namespace Drupal\forum\Form;
|
||||
|
||||
use Drupal\Core\Form\FormStateInterface;
|
||||
|
|
|
|||
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\forum\Form\DeleteForm.
|
||||
*/
|
||||
|
||||
namespace Drupal\forum\Form;
|
||||
|
||||
use Drupal\Core\Form\ConfirmFormBase;
|
||||
|
|
|
|||
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\forum\Form\ForumForm.
|
||||
*/
|
||||
|
||||
namespace Drupal\forum\Form;
|
||||
|
||||
use Drupal\Core\Form\FormStateInterface;
|
||||
|
|
|
|||
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\forum\Form\Overview.
|
||||
*/
|
||||
|
||||
namespace Drupal\forum\Form;
|
||||
|
||||
use Drupal\Core\Entity\EntityManagerInterface;
|
||||
|
|
|
|||
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\forum\ForumIndexStorage.
|
||||
*/
|
||||
|
||||
namespace Drupal\forum;
|
||||
use Drupal\comment\CommentInterface;
|
||||
use Drupal\Core\Database\Connection;
|
||||
|
|
|
|||
|
|
@ -1,8 +1,5 @@
|
|||
<?php
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\forum\ForumIndexStorageInterface.
|
||||
*/
|
||||
|
||||
namespace Drupal\forum;
|
||||
|
||||
use Drupal\node\NodeInterface;
|
||||
|
|
|
|||
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\forum\ForumManager.
|
||||
*/
|
||||
|
||||
namespace Drupal\forum;
|
||||
|
||||
use Drupal\Core\Config\ConfigFactoryInterface;
|
||||
|
|
|
|||
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\forum\ForumManagerInterface.
|
||||
*/
|
||||
|
||||
namespace Drupal\forum;
|
||||
|
||||
use Drupal\Core\Session\AccountInterface;
|
||||
|
|
|
|||
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\forum\ForumSettingsForm.
|
||||
*/
|
||||
|
||||
namespace Drupal\forum;
|
||||
|
||||
use Drupal\Core\Form\ConfigFormBase;
|
||||
|
|
|
|||
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\forum\ForumUninstallValidator.
|
||||
*/
|
||||
|
||||
namespace Drupal\forum;
|
||||
|
||||
use Drupal\Core\Config\ConfigFactoryInterface;
|
||||
|
|
@ -52,7 +47,7 @@ class ForumUninstallValidator implements ModuleUninstallValidatorInterface {
|
|||
* @param \Drupal\Core\Entity\Query\QueryFactory $query_factory
|
||||
* The entity query factory.
|
||||
* @param \Drupal\Core\Config\ConfigFactoryInterface $config_factory
|
||||
* The config factory.
|
||||
* The config factory.
|
||||
* @param \Drupal\Core\StringTranslation\TranslationInterface $string_translation
|
||||
* The string translation service.
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\forum\Plugin\Block\ActiveTopicsBlock.
|
||||
*/
|
||||
|
||||
namespace Drupal\forum\Plugin\Block;
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\forum\Plugin\Block\ForumBlockBase.
|
||||
*/
|
||||
|
||||
namespace Drupal\forum\Plugin\Block;
|
||||
|
||||
use Drupal\Core\Access\AccessResult;
|
||||
|
|
|
|||
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\forum\Plugin\Block\NewTopicsBlock.
|
||||
*/
|
||||
|
||||
namespace Drupal\forum\Plugin\Block;
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\forum\Plugin\Validation\Constraint\ForumLeafConstraint.
|
||||
*/
|
||||
|
||||
namespace Drupal\forum\Plugin\Validation\Constraint;
|
||||
|
||||
use Symfony\Component\Validator\Constraint;
|
||||
|
|
|
|||
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\forum\Plugin\Validation\Constraint\ForumLeafConstraintValidator.
|
||||
*/
|
||||
|
||||
namespace Drupal\forum\Plugin\Validation\Constraint;
|
||||
|
||||
use Symfony\Component\Validator\Constraint;
|
||||
|
|
|
|||
|
|
@ -1,9 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\forum\ProxyClass\ForumUninstallValidator.
|
||||
*/
|
||||
// @codingStandardsIgnoreFile
|
||||
|
||||
/**
|
||||
* This file was generated via php core/scripts/generate-proxy-class.php 'Drupal\forum\ForumUninstallValidator' "core/modules/forum/src".
|
||||
|
|
|
|||
|
|
@ -1,14 +1,10 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\forum\Tests\ForumBlockTest.
|
||||
*/
|
||||
|
||||
namespace Drupal\forum\Tests;
|
||||
|
||||
use Drupal\simpletest\WebTestBase;
|
||||
use Drupal\Core\Datetime\DrupalDateTime;
|
||||
use Drupal\comment\Entity\Comment;
|
||||
|
||||
/**
|
||||
* Tests the forum blocks.
|
||||
|
|
@ -97,7 +93,7 @@ class ForumBlockTest extends WebTestBase {
|
|||
// Get the node from the topic title.
|
||||
$node = $this->drupalGetNodeByTitle($topics[$index]);
|
||||
$date->modify('+1 minute');
|
||||
$comment = entity_create('comment', array(
|
||||
$comment = Comment::create(array(
|
||||
'entity_id' => $node->id(),
|
||||
'field_name' => 'comment_forum',
|
||||
'entity_type' => 'node',
|
||||
|
|
|
|||
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\forum\Tests\ForumIndexTest.
|
||||
*/
|
||||
|
||||
namespace Drupal\forum\Tests;
|
||||
|
||||
use Drupal\simpletest\WebTestBase;
|
||||
|
|
|
|||
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\forum\Tests\ForumNodeAccessTest.
|
||||
*/
|
||||
|
||||
namespace Drupal\forum\Tests;
|
||||
|
||||
use Drupal\simpletest\WebTestBase;
|
||||
|
|
|
|||
|
|
@ -1,12 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\forum\Tests\ForumTest.
|
||||
*
|
||||
* Tests for forum.module.
|
||||
*/
|
||||
|
||||
namespace Drupal\forum\Tests;
|
||||
|
||||
use Drupal\Core\Entity\Entity\EntityFormDisplay;
|
||||
|
|
@ -18,6 +11,8 @@ use Drupal\Core\Url;
|
|||
use Drupal\taxonomy\Entity\Vocabulary;
|
||||
|
||||
/**
|
||||
* Tests for forum.module.
|
||||
*
|
||||
* Create, view, edit, delete, and change forum entries and verify its
|
||||
* consistency in the database.
|
||||
*
|
||||
|
|
@ -339,13 +334,13 @@ class ForumTest extends WebTestBase {
|
|||
// Create a default vocabulary named "Tags".
|
||||
$description = 'Use tags to group articles on similar topics into categories.';
|
||||
$help = 'Enter a comma-separated list of words to describe your content.';
|
||||
$vocabulary = entity_create('taxonomy_vocabulary', array(
|
||||
$vocabulary = Vocabulary::create([
|
||||
'name' => 'Tags',
|
||||
'description' => $description,
|
||||
'vid' => 'tags',
|
||||
'langcode' => \Drupal::languageManager()->getDefaultLanguage()->getId(),
|
||||
'help' => $help,
|
||||
));
|
||||
]);
|
||||
$vocabulary->save();
|
||||
// Test tags vocabulary form is not affected.
|
||||
$this->drupalGet('admin/structure/taxonomy/manage/tags');
|
||||
|
|
|
|||
|
|
@ -1,16 +1,13 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\forum\Tests\ForumUninstallTest.
|
||||
*/
|
||||
|
||||
namespace Drupal\forum\Tests;
|
||||
|
||||
use Drupal\comment\CommentInterface;
|
||||
use Drupal\field\Entity\FieldStorageConfig;
|
||||
use Drupal\node\Entity\NodeType;
|
||||
use Drupal\simpletest\WebTestBase;
|
||||
use Drupal\comment\Entity\Comment;
|
||||
use Drupal\taxonomy\Entity\Term;
|
||||
|
||||
/**
|
||||
* Tests forum module uninstallation.
|
||||
|
|
@ -36,14 +33,14 @@ class ForumUninstallTest extends WebTestBase {
|
|||
$this->assertNotNull($field_storage, 'The taxonomy_forums field storage exists.');
|
||||
|
||||
// Create a taxonomy term.
|
||||
$term = entity_create('taxonomy_term', array(
|
||||
$term = Term::create([
|
||||
'name' => t('A term'),
|
||||
'langcode' => \Drupal::languageManager()->getDefaultLanguage()->getId(),
|
||||
'description' => '',
|
||||
'parent' => array(0),
|
||||
'vid' => 'forums',
|
||||
'forum_container' => 0,
|
||||
));
|
||||
]);
|
||||
$term->save();
|
||||
|
||||
// Create a forum node.
|
||||
|
|
@ -54,7 +51,7 @@ class ForumUninstallTest extends WebTestBase {
|
|||
));
|
||||
|
||||
// Create at least one comment against the forum node.
|
||||
$comment = entity_create('comment', array(
|
||||
$comment = Comment::create(array(
|
||||
'entity_id' => $node->nid->value,
|
||||
'entity_type' => 'node',
|
||||
'field_name' => 'comment_forum',
|
||||
|
|
|
|||
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\forum\Tests\ForumValidationTest.
|
||||
*/
|
||||
|
||||
namespace Drupal\forum\Tests;
|
||||
|
||||
use Drupal\node\Entity\Node;
|
||||
|
|
|
|||
|
|
@ -1,52 +0,0 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\forum\Tests\Migrate\d6\MigrateForumConfigsTest.
|
||||
*/
|
||||
|
||||
namespace Drupal\forum\Tests\Migrate\d6;
|
||||
|
||||
use Drupal\config\Tests\SchemaCheckTestTrait;
|
||||
use Drupal\migrate_drupal\Tests\d6\MigrateDrupal6TestBase;
|
||||
|
||||
/**
|
||||
* Upgrade variables to forum.settings.yml.
|
||||
*
|
||||
* @group migrate_drupal_6
|
||||
*/
|
||||
class MigrateForumConfigsTest extends MigrateDrupal6TestBase {
|
||||
|
||||
use SchemaCheckTestTrait;
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public static $modules = array('comment', 'forum', 'taxonomy');
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
protected function setUp() {
|
||||
parent::setUp();
|
||||
$this->executeMigration('d6_taxonomy_vocabulary');
|
||||
$this->executeMigration('d6_forum_settings');
|
||||
}
|
||||
|
||||
/**
|
||||
* Tests migration of forum variables to forum.settings.yml.
|
||||
*/
|
||||
public function testForumSettings() {
|
||||
$config = $this->config('forum.settings');
|
||||
$this->assertIdentical(15, $config->get('topics.hot_threshold'));
|
||||
$this->assertIdentical(25, $config->get('topics.page_limit'));
|
||||
$this->assertIdentical(1, $config->get('topics.order'));
|
||||
$this->assertIdentical('vocabulary_1_i_0_', $config->get('vocabulary'));
|
||||
// This is 'forum_block_num_0' in D6, but block:active:limit' in D8.
|
||||
$this->assertIdentical(5, $config->get('block.active.limit'));
|
||||
// This is 'forum_block_num_1' in D6, but 'block:new:limit' in D8.
|
||||
$this->assertIdentical(5, $config->get('block.new.limit'));
|
||||
$this->assertConfigSchema(\Drupal::service('config.typed'), 'forum.settings', $config->get());
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,52 +0,0 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\forum\Tests\Migrate\d7\MigrateForumSettingsTest.
|
||||
*/
|
||||
|
||||
namespace Drupal\forum\Tests\Migrate\d7;
|
||||
|
||||
use Drupal\migrate_drupal\Tests\d7\MigrateDrupal7TestBase;
|
||||
|
||||
/**
|
||||
* Tests migration of Forum's variables to configuration.
|
||||
*
|
||||
* @group forum
|
||||
*/
|
||||
class MigrateForumSettingsTest extends MigrateDrupal7TestBase {
|
||||
|
||||
// Don't alphabetize these. They're in dependency order.
|
||||
public static $modules = [
|
||||
'comment',
|
||||
'field',
|
||||
'filter',
|
||||
'text',
|
||||
'node',
|
||||
'taxonomy',
|
||||
'forum',
|
||||
];
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
protected function setUp() {
|
||||
parent::setUp();
|
||||
$this->executeMigration('d7_taxonomy_vocabulary');
|
||||
$this->executeMigration('d7_forum_settings');
|
||||
}
|
||||
|
||||
/**
|
||||
* Tests the migration of Forum's settings to configuration.
|
||||
*/
|
||||
public function testForumSettingsMigration() {
|
||||
$config = $this->config('forum.settings');
|
||||
$this->assertIdentical(9, $config->get('block.active.limit'));
|
||||
$this->assertIdentical(4, $config->get('block.new.limit'));
|
||||
$this->assertIdentical(10, $config->get('topics.hot_threshold'));
|
||||
$this->assertIdentical(25, $config->get('topics.page_limit'));
|
||||
$this->assertIdentical(1, $config->get('topics.order'));
|
||||
$this->assertIdentical('forums', $config->get('vocabulary'));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\forum\Tests\Views\ForumIntegrationTest.
|
||||
*/
|
||||
|
||||
namespace Drupal\forum\Tests\Views;
|
||||
|
||||
use Drupal\views\Views;
|
||||
|
|
|
|||
Reference in a new issue