Skip to content

Commit db261f2

Browse files
authored
Merge pull request #120 from localgovdrupal/2.x
Drupal 10 support (#119)
2 parents ecb1286 + 9204386 commit db261f2

File tree

8 files changed

+61
-63
lines changed

8 files changed

+61
-63
lines changed

.github/workflows/test.yml

+28-28
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,13 @@ jobs:
2424
strategy:
2525
fail-fast: false
2626
matrix:
27-
localgov-version:
28-
- '2.x'
29-
drupal-version:
30-
- '~9.3'
31-
php-version:
32-
- '7.4'
33-
- '8.1'
27+
include:
28+
- localgov-version: '2.x'
29+
drupal-version: '~9.4'
30+
php-version: '8.1'
31+
- localgov-version: '3.x'
32+
drupal-version: '~10.0'
33+
php-version: '8.1'
3434

3535
steps:
3636

@@ -108,13 +108,13 @@ jobs:
108108
strategy:
109109
fail-fast: false
110110
matrix:
111-
localgov-version:
112-
- '2.x'
113-
drupal-version:
114-
- '~9.3'
115-
php-version:
116-
- '7.4'
117-
- '8.1'
111+
include:
112+
- localgov-version: '2.x'
113+
drupal-version: '~9.4'
114+
php-version: '8.1'
115+
- localgov-version: '3.x'
116+
drupal-version: '~10.0'
117+
php-version: '8.1'
118118

119119
steps:
120120

@@ -144,13 +144,13 @@ jobs:
144144
strategy:
145145
fail-fast: false
146146
matrix:
147-
localgov-version:
148-
- '2.x'
149-
drupal-version:
150-
- '~9.3'
151-
php-version:
152-
- '7.4'
153-
- '8.1'
147+
include:
148+
- localgov-version: '2.x'
149+
drupal-version: '~9.4'
150+
php-version: '8.1'
151+
- localgov-version: '3.x'
152+
drupal-version: '~10.0'
153+
php-version: '8.1'
154154

155155
steps:
156156

@@ -179,13 +179,13 @@ jobs:
179179
strategy:
180180
fail-fast: false
181181
matrix:
182-
localgov-version:
183-
- '2.x'
184-
drupal-version:
185-
- '~9.3'
186-
php-version:
187-
- '7.4'
188-
- '8.1'
182+
include:
183+
- localgov-version: '2.x'
184+
drupal-version: '~9.4'
185+
php-version: '8.1'
186+
- localgov-version: '3.x'
187+
drupal-version: '~10.0'
188+
php-version: '8.1'
189189

190190
steps:
191191

composer.json

+19-19
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
11
{
2-
"name": "localgovdrupal/localgov_subsites",
3-
"description": "Provides subsite sections using page builder paragraph types for LocalGovDrupal.",
4-
"type": "drupal-module",
5-
"homepage": "https://github.com/localgovdrupal/localgov_subsites",
6-
"license": "GPL-2.0-or-later",
7-
"minimum-stability": "dev",
8-
"require": {
9-
"drupal/entity_hierarchy": "^3.3",
10-
"drupal/tablefield": "^2.2",
11-
"drupal/viewsreference": "^2.0",
12-
"localgovdrupal/localgov_core": "^2.1",
13-
"localgovdrupal/localgov_paragraphs": "^2.2"
14-
},
15-
"extra": {
16-
"composer-exit-on-patch-failure": true,
17-
"patchLevel": {
18-
"drupal/core": "-p2"
2+
"name": "localgovdrupal/localgov_subsites",
3+
"description": "Provides subsite sections using page builder paragraph types for LocalGovDrupal.",
4+
"type": "drupal-module",
5+
"homepage": "https://github.com/localgovdrupal/localgov_subsites",
6+
"license": "GPL-2.0-or-later",
7+
"minimum-stability": "dev",
8+
"require": {
9+
"drupal/entity_hierarchy": "^3.3",
10+
"drupal/tablefield": "^2.2",
11+
"drupal/viewsreference": "^2.0",
12+
"localgovdrupal/localgov_core": "^2.12",
13+
"localgovdrupal/localgov_paragraphs": "^2.3"
1914
},
20-
"patches": {}
21-
}
15+
"extra": {
16+
"composer-exit-on-patch-failure": true,
17+
"patchLevel": {
18+
"drupal/core": "-p2"
19+
},
20+
"patches": {}
21+
}
2222
}

localgov_subsites.info.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: LocalGov Subsites
22
description: Provides subsite sections using page builder paragraph types for LocalGov Drupal.
3-
core_version_requirement: ^8.9 || ^9
3+
core_version_requirement: ^9 || ^10
44
type: module
55
package: LocalGov Drupal
66

src/EventSubscriber/PageHeaderSubscriber.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
namespace Drupal\localgov_subsites\EventSubscriber;
44

5+
use Drupal\localgov_core\Event\PageHeaderDisplayEvent;
56
use Drupal\node\Entity\Node;
67
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
7-
use Drupal\localgov_core\Event\PageHeaderDisplayEvent;
88

99
/**
1010
* Hide page header.

src/Subsite.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22

33
namespace Drupal\localgov_subsites;
44

5+
use Drupal\Core\DependencyInjection\ContainerInjectionInterface;
56
use Drupal\Core\Entity\EntityTypeManagerInterface;
6-
use Symfony\Component\DependencyInjection\ContainerInterface;
77
use Drupal\localgov_subsites\Plugin\Block\SubsitesHierarchyTrait;
88
use Drupal\node\NodeInterface;
9-
use Drupal\Core\DependencyInjection\ContainerInjectionInterface;
9+
use Symfony\Component\DependencyInjection\ContainerInterface;
1010

1111
/**
1212
* Class Subsite.

tests/src/Functional/LocalgovIntegrationTest.php

+4-6
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22

33
namespace Drupal\Tests\localgov_subsites\Functional;
44

5-
use Drupal\Tests\Traits\Core\CronRunTrait;
65
use Drupal\node\NodeInterface;
76
use Drupal\Tests\BrowserTestBase;
87
use Drupal\Tests\node\Traits\NodeCreationTrait;
98
use Drupal\Tests\system\Functional\Menu\AssertBreadcrumbTrait;
9+
use Drupal\Tests\Traits\Core\CronRunTrait;
1010

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

2222
/**
23-
* Test breadcrumbs in the Standard profile.
24-
*
25-
* @var string
23+
* {@inheritdoc}
2624
*/
27-
protected $profile = 'standard';
25+
protected $profile = 'testing';
2826

2927
/**
3028
* {@inheritdoc}
3129
*/
32-
protected $defaultTheme = 'stable';
30+
protected $defaultTheme = 'stark';
3331

3432
/**
3533
* A user with permission to bypass content access checks.

tests/src/Functional/SubsiteBlocksTest.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22

33
namespace Drupal\Tests\localgov_subsites\Functional;
44

5+
use Drupal\Core\Database\Database;
56
use Drupal\file\Entity\File;
67
use Drupal\file\FileInterface;
78
use Drupal\media\Entity\Media;
89
use Drupal\node\NodeInterface;
910
use Drupal\paragraphs\Entity\Paragraph;
1011
use Drupal\Tests\BrowserTestBase;
11-
use Drupal\Tests\TestFileCreationTrait;
1212
use Drupal\Tests\node\Traits\NodeCreationTrait;
13-
use Drupal\Core\Database\Database;
13+
use Drupal\Tests\TestFileCreationTrait;
1414

1515
/**
1616
* Tests user blocks.
@@ -39,7 +39,7 @@ class SubsiteBlocksTest extends BrowserTestBase {
3939
/**
4040
* {@inheritdoc}
4141
*/
42-
protected $profile = 'localgov';
42+
protected $profile = 'testing';
4343

4444
/**
4545
* A user with the 'administer blocks' permission.

tests/src/Functional/SubsitePagesTest.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22

33
namespace Drupal\Tests\localgov_subsites\Functional;
44

5+
use Drupal\Core\Database\Database;
56
use Drupal\node\NodeInterface;
67
use Drupal\Tests\BrowserTestBase;
78
use Drupal\Tests\node\Traits\NodeCreationTrait;
89
use Drupal\Tests\system\Functional\Menu\AssertBreadcrumbTrait;
9-
use Drupal\Core\Database\Database;
1010

1111
/**
1212
* Tests LocalGov Subsite pages work together.
@@ -22,12 +22,12 @@ class SubsitePagesTest extends BrowserTestBase {
2222
/**
2323
* {@inheritdoc}
2424
*/
25-
protected $defaultTheme = 'localgov_base';
25+
protected $defaultTheme = 'stark';
2626

2727
/**
2828
* {@inheritdoc}
2929
*/
30-
protected $profile = 'localgov';
30+
protected $profile = 'testing';
3131

3232
/**
3333
* A user with permission to bypass content access checks.

0 commit comments

Comments
 (0)