Skip to content

Commit 75dd0a4

Browse files
authored
test(drupal): Test Drupal 10.3 (#1410)
1 parent 79d09dd commit 75dd0a4

File tree

4 files changed

+13
-4
lines changed

4 files changed

+13
-4
lines changed

.github/workflows/testing.yml

+6-2
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,20 @@ jobs:
1414
fail-fast: false
1515
matrix:
1616
php-versions: ['8.1', '8.2']
17-
drupal-core: ['10.2.x']
17+
drupal-core: ['10.3.x']
1818
phpstan: ['0']
1919
include:
2020
# Extra run to test older supported Drupal 10.1.x.
2121
- php-versions: '8.1'
2222
drupal-core: '10.1.x'
2323
phpstan: '0'
24+
# Extra run to test older supported Drupal 10.2.x.
25+
- php-versions: '8.1'
26+
drupal-core: '10.2.x'
27+
phpstan: '0'
2428
# We only need to run PHPStan once on the latest PHP version.
2529
- php-versions: '8.3'
26-
drupal-core: '10.2.x'
30+
drupal-core: '10.3.x'
2731
phpstan: '1'
2832
steps:
2933
- name: Checkout Drupal core

src/Config/LanguageConfigOverride.php

-1
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,6 @@ public function getCacheSuffix() {
7575
public function createConfigObject($name, $collection = StorageInterface::DEFAULT_COLLECTION) {
7676
// The interface says we should return an object here, but we don't care and
7777
// this does not seem to break anything?
78-
// @phpstan-ignore-next-line
7978
return NULL;
8079
}
8180

src/GraphQL/Utility/FileUpload.php

+4
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,8 @@ public function saveFileUpload(UploadedFile $uploaded_file, array $settings): Fi
248248

249249
$temp_file_path = $uploaded_file->getRealPath();
250250

251+
// Drupal 10.2 compatibility: use the deprecated constant for now.
252+
// @phpstan-ignore-next-line
251253
$file_uri = $this->fileSystem->getDestinationFilename($file_uri, FileSystemInterface::EXISTS_RENAME);
252254

253255
// Lock based on the prepared file URI.
@@ -291,6 +293,8 @@ public function saveFileUpload(UploadedFile $uploaded_file, array $settings): Fi
291293
// FileSystemInterface::EXISTS_ERROR as the file location has already been
292294
// determined above in FileSystem::getDestinationFilename().
293295
try {
296+
// Drupal 10.2 compatibility: use the deprecated constant for now.
297+
// @phpstan-ignore-next-line
294298
$this->fileSystem->move($temp_file_path, $file_uri, FileSystemInterface::EXISTS_ERROR);
295299
}
296300
catch (FileException $e) {

tests/src/Kernel/DataProducer/RoutingTest.php

+3-1
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ class RoutingTest extends GraphQLTestBase {
3535
public function setUp(): void {
3636
parent::setUp();
3737

38+
$this->installEntitySchema('path_alias');
3839
$this->installEntitySchema('redirect');
3940
$this->installConfig(['redirect']);
4041

@@ -129,7 +130,8 @@ public function testUrlPath(): void {
129130
'url' => $url,
130131
]);
131132

132-
$this->assertEquals('/user/logout', $result);
133+
// Starting with Drupal 10.3 the URL has a token at the end, ignore that.
134+
$this->assertStringStartsWith('/user/logout', $result);
133135
}
134136

135137
/**

0 commit comments

Comments
 (0)