Skip to content

Commit

Permalink
Merge pull request #120 from localgovdrupal/2.x
Browse files Browse the repository at this point in the history
Drupal 10 support (#119)
  • Loading branch information
finnlewis authored Jun 26, 2023
2 parents ecb1286 + 9204386 commit db261f2
Show file tree
Hide file tree
Showing 8 changed files with 61 additions and 63 deletions.
56 changes: 28 additions & 28 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@ jobs:
strategy:
fail-fast: false
matrix:
localgov-version:
- '2.x'
drupal-version:
- '~9.3'
php-version:
- '7.4'
- '8.1'
include:
- localgov-version: '2.x'
drupal-version: '~9.4'
php-version: '8.1'
- localgov-version: '3.x'
drupal-version: '~10.0'
php-version: '8.1'

steps:

Expand Down Expand Up @@ -108,13 +108,13 @@ jobs:
strategy:
fail-fast: false
matrix:
localgov-version:
- '2.x'
drupal-version:
- '~9.3'
php-version:
- '7.4'
- '8.1'
include:
- localgov-version: '2.x'
drupal-version: '~9.4'
php-version: '8.1'
- localgov-version: '3.x'
drupal-version: '~10.0'
php-version: '8.1'

steps:

Expand Down Expand Up @@ -144,13 +144,13 @@ jobs:
strategy:
fail-fast: false
matrix:
localgov-version:
- '2.x'
drupal-version:
- '~9.3'
php-version:
- '7.4'
- '8.1'
include:
- localgov-version: '2.x'
drupal-version: '~9.4'
php-version: '8.1'
- localgov-version: '3.x'
drupal-version: '~10.0'
php-version: '8.1'

steps:

Expand Down Expand Up @@ -179,13 +179,13 @@ jobs:
strategy:
fail-fast: false
matrix:
localgov-version:
- '2.x'
drupal-version:
- '~9.3'
php-version:
- '7.4'
- '8.1'
include:
- localgov-version: '2.x'
drupal-version: '~9.4'
php-version: '8.1'
- localgov-version: '3.x'
drupal-version: '~10.0'
php-version: '8.1'

steps:

Expand Down
38 changes: 19 additions & 19 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
{
"name": "localgovdrupal/localgov_subsites",
"description": "Provides subsite sections using page builder paragraph types for LocalGovDrupal.",
"type": "drupal-module",
"homepage": "https://github.com/localgovdrupal/localgov_subsites",
"license": "GPL-2.0-or-later",
"minimum-stability": "dev",
"require": {
"drupal/entity_hierarchy": "^3.3",
"drupal/tablefield": "^2.2",
"drupal/viewsreference": "^2.0",
"localgovdrupal/localgov_core": "^2.1",
"localgovdrupal/localgov_paragraphs": "^2.2"
},
"extra": {
"composer-exit-on-patch-failure": true,
"patchLevel": {
"drupal/core": "-p2"
"name": "localgovdrupal/localgov_subsites",
"description": "Provides subsite sections using page builder paragraph types for LocalGovDrupal.",
"type": "drupal-module",
"homepage": "https://github.com/localgovdrupal/localgov_subsites",
"license": "GPL-2.0-or-later",
"minimum-stability": "dev",
"require": {
"drupal/entity_hierarchy": "^3.3",
"drupal/tablefield": "^2.2",
"drupal/viewsreference": "^2.0",
"localgovdrupal/localgov_core": "^2.12",
"localgovdrupal/localgov_paragraphs": "^2.3"
},
"patches": {}
}
"extra": {
"composer-exit-on-patch-failure": true,
"patchLevel": {
"drupal/core": "-p2"
},
"patches": {}
}
}
2 changes: 1 addition & 1 deletion localgov_subsites.info.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: LocalGov Subsites
description: Provides subsite sections using page builder paragraph types for LocalGov Drupal.
core_version_requirement: ^8.9 || ^9
core_version_requirement: ^9 || ^10
type: module
package: LocalGov Drupal

Expand Down
2 changes: 1 addition & 1 deletion src/EventSubscriber/PageHeaderSubscriber.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

namespace Drupal\localgov_subsites\EventSubscriber;

use Drupal\localgov_core\Event\PageHeaderDisplayEvent;
use Drupal\node\Entity\Node;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
use Drupal\localgov_core\Event\PageHeaderDisplayEvent;

/**
* Hide page header.
Expand Down
4 changes: 2 additions & 2 deletions src/Subsite.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

namespace Drupal\localgov_subsites;

use Drupal\Core\DependencyInjection\ContainerInjectionInterface;
use Drupal\Core\Entity\EntityTypeManagerInterface;
use Symfony\Component\DependencyInjection\ContainerInterface;
use Drupal\localgov_subsites\Plugin\Block\SubsitesHierarchyTrait;
use Drupal\node\NodeInterface;
use Drupal\Core\DependencyInjection\ContainerInjectionInterface;
use Symfony\Component\DependencyInjection\ContainerInterface;

/**
* Class Subsite.
Expand Down
10 changes: 4 additions & 6 deletions tests/src/Functional/LocalgovIntegrationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

namespace Drupal\Tests\localgov_subsites\Functional;

use Drupal\Tests\Traits\Core\CronRunTrait;
use Drupal\node\NodeInterface;
use Drupal\Tests\BrowserTestBase;
use Drupal\Tests\node\Traits\NodeCreationTrait;
use Drupal\Tests\system\Functional\Menu\AssertBreadcrumbTrait;
use Drupal\Tests\Traits\Core\CronRunTrait;

/**
* Tests pages working together with LocalGov: pathauto, services, search.
Expand All @@ -20,16 +20,14 @@ class LocalgovIntegrationTest extends BrowserTestBase {
use CronRunTrait;

/**
* Test breadcrumbs in the Standard profile.
*
* @var string
* {@inheritdoc}
*/
protected $profile = 'standard';
protected $profile = 'testing';

/**
* {@inheritdoc}
*/
protected $defaultTheme = 'stable';
protected $defaultTheme = 'stark';

/**
* A user with permission to bypass content access checks.
Expand Down
6 changes: 3 additions & 3 deletions tests/src/Functional/SubsiteBlocksTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@

namespace Drupal\Tests\localgov_subsites\Functional;

use Drupal\Core\Database\Database;
use Drupal\file\Entity\File;
use Drupal\file\FileInterface;
use Drupal\media\Entity\Media;
use Drupal\node\NodeInterface;
use Drupal\paragraphs\Entity\Paragraph;
use Drupal\Tests\BrowserTestBase;
use Drupal\Tests\TestFileCreationTrait;
use Drupal\Tests\node\Traits\NodeCreationTrait;
use Drupal\Core\Database\Database;
use Drupal\Tests\TestFileCreationTrait;

/**
* Tests user blocks.
Expand Down Expand Up @@ -39,7 +39,7 @@ class SubsiteBlocksTest extends BrowserTestBase {
/**
* {@inheritdoc}
*/
protected $profile = 'localgov';
protected $profile = 'testing';

/**
* A user with the 'administer blocks' permission.
Expand Down
6 changes: 3 additions & 3 deletions tests/src/Functional/SubsitePagesTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

namespace Drupal\Tests\localgov_subsites\Functional;

use Drupal\Core\Database\Database;
use Drupal\node\NodeInterface;
use Drupal\Tests\BrowserTestBase;
use Drupal\Tests\node\Traits\NodeCreationTrait;
use Drupal\Tests\system\Functional\Menu\AssertBreadcrumbTrait;
use Drupal\Core\Database\Database;

/**
* Tests LocalGov Subsite pages work together.
Expand All @@ -22,12 +22,12 @@ class SubsitePagesTest extends BrowserTestBase {
/**
* {@inheritdoc}
*/
protected $defaultTheme = 'localgov_base';
protected $defaultTheme = 'stark';

/**
* {@inheritdoc}
*/
protected $profile = 'localgov';
protected $profile = 'testing';

/**
* A user with permission to bypass content access checks.
Expand Down

0 comments on commit db261f2

Please sign in to comment.