Skip to content

Commit fe4f738

Browse files
committed
PR feedback changes.
1 parent b62295a commit fe4f738

File tree

3 files changed

+8
-6
lines changed

3 files changed

+8
-6
lines changed

.github/workflows/testing.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
strategy:
1414
fail-fast: false
1515
matrix:
16-
php-versions: ['8.1', '8.2']
16+
php-versions: ['8.1', '8.2', '8.3']
1717
drupal-core: ['10.3.x']
1818
phpstan: ['0']
1919
include:

src/GraphQL/Utility/FileUpload.php

+2-5
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ class FileUpload {
3737
use StringTranslationTrait;
3838

3939
/**
40-
* The entity storage for the 'file' entity type.
40+
* The file storage where we will create new file entities from.
4141
*
4242
* @var \Drupal\file\FileStorageInterface
4343
*/
@@ -294,10 +294,7 @@ public function saveFileUpload(UploadedFile $uploaded_file, array $settings): Fi
294294
$maxResolution = $settings['max_resolution'] ?? 0;
295295
$minResolution = $settings['min_resolution'] ?? 0;
296296
if (!empty($maxResolution) || !empty($minResolution)) {
297-
$image_resolution_errors = $this->validateFileImageResolution($file, $maxResolution, $minResolution);
298-
if (!empty($image_resolution_errors)) {
299-
$errors = array_merge($errors, $image_resolution_errors);
300-
}
297+
$errors += $this->validateFileImageResolution($file, $maxResolution, $minResolution);
301298
}
302299

303300
if (!empty($errors)) {

tests/src/Kernel/Framework/UploadFileServiceTest.php

+5
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,11 @@
1515
*/
1616
class UploadFileServiceTest extends GraphQLTestBase {
1717

18+
/**
19+
* {@inheritdoc}
20+
*/
21+
protected static $modules = ['file_validator_test'];
22+
1823
/**
1924
* The FileUpload object we want to test, gets prepared in setUp().
2025
*

0 commit comments

Comments
 (0)