Skip to content

Commit b3e6c77

Browse files
authored
Merge branch 'main' into docs/next-drupal-docs-update
2 parents 239b578 + 1cda615 commit b3e6c77

32 files changed

+87
-103
lines changed

.github/workflows/next.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ on:
99

1010
jobs:
1111
phpunit:
12-
runs-on: ubuntu-latest
12+
runs-on: ubuntu-24.04
1313
strategy:
1414
matrix:
1515
# Supported PHP versions: https://www.drupal.org/docs/getting-started/system-requirements/php-requirements
@@ -22,15 +22,21 @@ jobs:
2222
- "10.0.x"
2323
- "10.1.x"
2424
- "10.2.x"
25+
- "10.3.x"
26+
- "11.0.x"
2527
exclude:
2628
- drupal: "10.0.x"
2729
php: "8.3"
2830
- drupal: "10.1.x"
2931
php: "8.3"
32+
- drupal: "11.0.x"
33+
php: "8.1"
34+
- drupal: "11.0.x"
35+
php: "8.2"
3036
name: Drupal ${{ matrix.drupal }} - PHP ${{ matrix.php }}
3137
services:
3238
mysql:
33-
image: mysql:5.7
39+
image: mysql:8.0
3440
env:
3541
MYSQL_ALLOW_EMPTY_PASSWORD: yes
3642
MYSQL_DATABASE: db

modules/next/.gitlab-ci.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,11 @@ include:
5252
#
5353
# Docs at https://git.drupalcode.org/project/gitlab_templates/-/blob/1.0.x/includes/include.drupalci.variables.yml
5454
################
55-
# variables:
56-
# SKIP_ESLINT: '1'
57-
55+
variables:
56+
# SKIP_ESLINT: '1'
57+
OPT_IN_TEST_PREVIOUS_MINOR: 1
58+
OPT_IN_TEST_NEXT_MINOR: 1
59+
OPT_IN_TEST_NEXT_MAJOR: 1
5860
###################################################################################
5961
#
6062
# *

modules/next/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,6 @@
1717
"drupal/subrequests": "^3.0"
1818
},
1919
"require-dev": {
20-
"phpunit/phpunit": "^6.0 || ^7.0 || ^8.0 || ^9.0"
20+
"phpunit/phpunit": "^9 || ^10"
2121
}
2222
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: Next.js Extras (Experimental)
22
description: Adds extra (mostly experiemental) functionality to Next.js module
33
type: module
4-
core_version_requirement: ^9 || ^10
4+
core_version_requirement: ^10 || ^11
55
package: Web services
66
dependencies:
77
- next:next

modules/next/modules/next_extras/src/NextCacheInvalidator.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,8 @@ public function invalidatePath(string $path, array $sites): void {
143143
}
144144
}
145145
catch (RequestException $exception) {
146-
watchdog_exception('next_extras', $exception);
146+
// Using logger service to log the exception.
147+
$this->logger->error($exception->getMessage());
147148
}
148149
}
149150
}

modules/next/modules/next_graphql/next_graphql.info.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: 'Next.js GraphQL'
22
type: module
33
description: 'GraphQL for Next.js'
4-
core_version_requirement: ^9 || ^10
4+
core_version_requirement: ^10 || ^11
55
package: Web services
66
dependencies:
77
- graphql:graphql

modules/next/modules/next_jsonapi/next_jsonapi.info.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: 'Next.js JSON:API'
22
type: module
33
description: 'JSON:API Helpers for Next.js'
4-
core_version_requirement: ^9 || ^10
4+
core_version_requirement: ^10 || ^11
55
package: Web services
66
dependencies:
77
- decoupled_router:decoupled_router

modules/next/modules/next_jsonapi/src/NextJsonapiServiceProvider.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ class NextJsonapiServiceProvider extends ServiceProviderBase {
1515
*/
1616
public function alter(ContainerBuilder $container) {
1717
/** @var \Symfony\Component\DependencyInjection\Definition $definition */
18-
1918
if ($container->hasDefinition('jsonapi.entity_resource')) {
2019
$definition = $container->getDefinition('jsonapi.entity_resource');
2120
$definition->setClass('Drupal\next_jsonapi\Controller\EntityResource');

modules/next/modules/next_jsonapi/tests/src/Kernel/Controller/EntityResourceTest.php

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
use Drupal\Tests\node\Traits\NodeCreationTrait;
99
use Drupal\Tests\user\Traits\UserCreationTrait;
1010
use Drupal\user\Entity\User;
11-
use Symfony\Component\HttpFoundation\ParameterBag;
11+
use Symfony\Component\HttpFoundation\InputBag;
1212
use Symfony\Component\HttpFoundation\Request;
1313

1414
/**
@@ -45,7 +45,6 @@ protected function setUp(): void {
4545
$this->installEntitySchema('node');
4646
$this->installEntitySchema('user');
4747
$this->installConfig(['filter', 'next']);
48-
$this->installSchema('system', ['sequences']);
4948
$this->installSchema('node', ['node_access']);
5049

5150
$type = NodeType::create([
@@ -91,14 +90,14 @@ public function testPageLimit() {
9190

9291
// Default using \Drupal\jsonapi\Query\OffsetPage::SIZE_MAX.
9392
$request = Request::create('/jsonapi/node/article');
94-
$request->query = new ParameterBag();
93+
$request->query = new InputBag();
9594
$response = $entity_resource->getCollection($resource_type, $request);
9695
$data = $response->getResponseData()->getData();
9796
$this->assertSame(50, $data->count());
9897

9998
// With page limit.
10099
$request = Request::create('/jsonapi/node/article');
101-
$request->query = new ParameterBag([
100+
$request->query = new InputBag([
102101
'page' => [
103102
'limit' => 10,
104103
],
@@ -109,7 +108,7 @@ public function testPageLimit() {
109108

110109
// With page limit over size max.
111110
$request = Request::create('/jsonapi/node/article');
112-
$request->query = new ParameterBag([
111+
$request->query = new InputBag([
113112
'page' => [
114113
'limit' => 100,
115114
],
@@ -120,7 +119,7 @@ public function testPageLimit() {
120119

121120
// With page limit and offset.
122121
$request = Request::create('/jsonapi/node/article');
123-
$request->query = new ParameterBag([
122+
$request->query = new InputBag([
124123
'page' => [
125124
'offset' => 2,
126125
'limit' => 5,
@@ -132,7 +131,7 @@ public function testPageLimit() {
132131

133132
// With fields as sparse fieldset.
134133
$request = Request::create('/jsonapi/node/article');
135-
$request->query = new ParameterBag([
134+
$request->query = new InputBag([
136135
'fields' => [
137136
'node--article' => 'title',
138137
],
@@ -143,7 +142,7 @@ public function testPageLimit() {
143142

144143
// Using sparse fieldset path override.
145144
$request = Request::create('/jsonapi/node/article');
146-
$request->query = new ParameterBag([
145+
$request->query = new InputBag([
147146
'fields' => [
148147
'node--article' => 'path,title',
149148
],
@@ -154,7 +153,7 @@ public function testPageLimit() {
154153

155154
// Using sparse fieldset path override and limit.
156155
$request = Request::create('/jsonapi/node/article');
157-
$request->query = new ParameterBag([
156+
$request->query = new InputBag([
158157
'fields' => [
159158
'node--article' => 'path,title',
160159
],
@@ -168,7 +167,7 @@ public function testPageLimit() {
168167

169168
// Using sparse fieldset path override and limit.
170169
$request = Request::create('/jsonapi/node/article');
171-
$request->query = new ParameterBag([
170+
$request->query = new InputBag([
172171
'fields' => [
173172
'node--article' => 'path,title',
174173
],

modules/next/modules/next_jwt/next_jwt.info.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: Next.js JWT (Experimental)
22
type: module
33
description: 'Generates preview URLs using JSON Web Token'
4-
core_version_requirement: ^9 || ^10
4+
core_version_requirement: ^10 || ^11
55
package: Web services
66
dependencies:
77
- next:next

0 commit comments

Comments
 (0)