Skip to content
This repository has been archived by the owner on Aug 18, 2024. It is now read-only.

Add support for Drupal 8.7.x #473

Merged
merged 7 commits into from
Apr 23, 2019
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ env:
global:
- COMPOSER_MEMORY_LIMIT=2G
matrix:
- TEST_SUITE=8.6.x
- TEST_SUITE=8.7.x
- TEST_SUITE=8.8.x
- TEST_SUITE=PHP_CodeSniffer

# Only run the coding standards check once.
Expand All @@ -22,7 +22,7 @@ matrix:
- php: 7.2
env: TEST_SUITE=PHP_CodeSniffer
allow_failures:
- env: TEST_SUITE=8.7.x
- env: TEST_SUITE=8.8.x

mysql:
database: og
Expand Down
5 changes: 3 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,10 @@
"source": "https://cgit.drupalcode.org/og"
},
"require": {
"drupal/core": "~8.6"
"drupal/core": "~8.7"
},
"require-dev": {
"drupal/coder": "~8.2"
}
},
"minimum-stability": "RC"
}
5 changes: 5 additions & 0 deletions src/Entity/OgMembershipType.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@
* entity_keys = {
* "id" = "type",
* "label" = "name"
* },
* config_export = {
* "type",
* "name",
* "description"
* }
* )
*/
Expand Down
2 changes: 1 addition & 1 deletion src/Plugin/Condition/GroupType.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* @Condition(
* id = "og_group_type",
* label = @Translation("Group type"),
* context = {
* context_definitions = {
* "og" = @ContextDefinition("entity", label = @Translation("Group"))
* }
* )
Expand Down
9 changes: 4 additions & 5 deletions tests/src/Functional/OgComplexWidgetTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
use Drupal\node\Entity\Node;
use Drupal\og\Og;
use Drupal\og\OgGroupAudienceHelperInterface;
use Drupal\simpletest\BrowserTestBase;
use Drupal\simpletest\ContentTypeCreationTrait;
use Drupal\simpletest\NodeCreationTrait;
use Drupal\Tests\BrowserTestBase;
use Drupal\Tests\node\Traits\ContentTypeCreationTrait;
use Drupal\Tests\node\Traits\NodeCreationTrait;

/**
* Tests the complex widget.
Expand Down Expand Up @@ -88,7 +88,6 @@ public function testFields($field, $field_name) {
$this->assertSession()->statusCodeEquals(200);

// Retrieve the post that was created from the database.
/** @var QueryInterface $query */
$query = $this->container->get('entity_type.manager')->getStorage('node')->getQuery();
$result = $query
->condition('type', 'post')
Expand All @@ -97,7 +96,7 @@ public function testFields($field, $field_name) {
->execute();
$post_nid = reset($result);

/** @var \Drupal\node\Entity\NodeInterface $post */
/** @var \Drupal\node\NodeInterface $post */
$post = Node::load($post_nid);

// Check that the post references the group correctly.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,7 @@ protected function setUp() {
'comment_type' => $bundle_id,
'entity_id' => $this->group->id(),
'entity_type' => 'entity_test',
'field_name' => 'an_imaginary_field',
OgGroupAudienceHelperInterface::DEFAULT_FIELD => [['target_id' => $this->group->id()]],
];
break;
Expand Down
2 changes: 1 addition & 1 deletion tests/src/Kernel/Action/ActionTestBase.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ public function setUp() {
$this->installEntitySchema('og_membership');
$this->installEntitySchema('user');
$this->installEntitySchema('node');
$this->installSchema('system', ['queue', 'sequences']);
$this->installSchema('system', ['sequences']);

$this->membershipManager = $this->container->get('og.membership_manager');
$this->groupTypeManager = $this->container->get('og.group_type_manager');
Expand Down
4 changes: 2 additions & 2 deletions tests/src/Kernel/Entity/EntityCreateAccessTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
use Drupal\node\Entity\NodeType;
use Drupal\og\Og;
use Drupal\og\OgGroupAudienceHelperInterface;
use Drupal\simpletest\ContentTypeCreationTrait;
use Drupal\simpletest\NodeCreationTrait;
use Drupal\Tests\node\Traits\ContentTypeCreationTrait;
use Drupal\Tests\node\Traits\NodeCreationTrait;
use Drupal\user\Entity\Role;
use Drupal\user\Entity\User;

Expand Down
2 changes: 1 addition & 1 deletion tests/src/Kernel/GroupManagerSubscriptionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ protected function setUp() {
$this->installEntitySchema('node');
$this->installEntitySchema('og_membership');
$this->installEntitySchema('user');
$this->installSchema('system', ['queue', 'sequences']);
$this->installSchema('system', ['sequences']);

// Create a group type.
NodeType::create([
Expand Down
2 changes: 1 addition & 1 deletion tests/src/Kernel/GroupTypeConditionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ protected function setUp() {
$this->installEntitySchema('entity_test');
$this->installEntitySchema('node');
$this->installEntitySchema('user');
$this->installSchema('system', ['queue', 'sequences']);
$this->installSchema('system', ['sequences']);

// Create three test groups of different types.
for ($i = 0; $i < 2; $i++) {
Expand Down
2 changes: 1 addition & 1 deletion tests/src/Kernel/OgDeleteOrphansTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public function setUp() {
$this->installEntitySchema('user');
$this->installEntitySchema('node');
$this->installSchema('node', 'node_access');
$this->installSchema('system', ['queue', 'sequences']);
$this->installSchema('system', ['sequences']);

/** @var \Drupal\og\OgDeleteOrphansPluginManager $plugin_manager */
$plugin_manager = \Drupal::service('plugin.manager.og.delete_orphans');
Expand Down
2 changes: 1 addition & 1 deletion tests/src/Kernel/Views/OgAdminMembersViewTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
use Drupal\node\Entity\Node;
use Drupal\node\Entity\NodeType;
use Drupal\og\Og;
use Drupal\simpletest\UserCreationTrait;
use Drupal\Tests\user\Traits\UserCreationTrait;
use Drupal\Tests\views\Kernel\ViewsKernelTestBase;
use Drupal\views\Views;

Expand Down