Skip to content

Commit 4b317c4

Browse files
joshua-salsadigitalJoshua Fernandes
andauthored
Issue #3421274 by joshua1234511, trrroy, mohd-sahzad: TypeError: Argument #3 ($file_system) must be of type Drupal\Core\File\FileSystem, Drupal\s3fs\S3fsFileService given (#1240)
Co-authored-by: Joshua Fernandes <“[email protected]”>
1 parent 09be2a6 commit 4b317c4

File tree

3 files changed

+5
-7
lines changed

3 files changed

+5
-7
lines changed

web/themes/contrib/civictheme/src/CivicthemeColorManager.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -521,7 +521,7 @@ protected function saveMatrixToConfig(): static {
521521
* @SuppressWarnings(MissingImport)
522522
*/
523523
protected static function validateMatrixStructure(array $matrix): void {
524-
if (!is_array($matrix) || count($matrix) != 2) {
524+
if (count($matrix) != 2) {
525525
throw new \Exception(sprintf('Invalid color matrix structure: should be an array with exactly 2 elements keyed by "%s" and "%s"', self::COLOR_TYPE_BRAND, self::COLOR_TYPE_PALETTE));
526526
}
527527

web/themes/contrib/civictheme/src/CivicthemeStylesheetGenerator.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
namespace Drupal\civictheme;
66

77
use Drupal\Core\DependencyInjection\ContainerInjectionInterface;
8-
use Drupal\Core\File\FileSystem;
98
use Drupal\Core\File\FileSystemInterface;
109
use Symfony\Component\DependencyInjection\ContainerInterface;
1110

@@ -34,10 +33,10 @@ final class CivicthemeStylesheetGenerator implements ContainerInjectionInterface
3433
/**
3534
* Constructor.
3635
*
37-
* @param \Drupal\Core\File\FileSystem $fileSystem
36+
* @param \Drupal\Core\File\FileSystemInterface $fileSystem
3837
* File system discovery service.
3938
*/
40-
public function __construct(protected FileSystem $fileSystem) {
39+
public function __construct(protected FileSystemInterface $fileSystem) {
4140
$this->setStylesheetUriSuffix('default');
4241
}
4342

web/themes/contrib/civictheme/src/Settings/CivicthemeSettingsFormSectionBase.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
use Drupal\Core\Config\ConfigManager;
1010
use Drupal\Core\DependencyInjection\ContainerInjectionInterface;
1111
use Drupal\Core\Extension\ThemeExtensionList;
12-
use Drupal\Core\File\FileSystem;
1312
use Drupal\Core\File\FileSystemInterface;
1413
use Drupal\Core\File\FileUrlGenerator;
1514
use Drupal\Core\Form\FormStateInterface;
@@ -38,7 +37,7 @@ abstract class CivicthemeSettingsFormSectionBase implements ContainerInjectionIn
3837
* Theme manager service.
3938
* @param \Drupal\Core\Extension\ThemeExtensionList $themeExtensionList
4039
* Theme extension list service.
41-
* @param \Drupal\Core\File\FileSystem $fileSystem
40+
* @param \Drupal\Core\File\FileSystemInterface $fileSystem
4241
* File system service.
4342
* @param \Drupal\Core\File\FileUrlGenerator $fileUrlgenerator
4443
* File URL generator.
@@ -51,7 +50,7 @@ abstract class CivicthemeSettingsFormSectionBase implements ContainerInjectionIn
5150
* @param \Drupal\Core\Image\ImageFactory $imageFactory
5251
* The image factory.
5352
*/
54-
public function __construct(protected ThemeManager $themeManager, protected ThemeExtensionList $themeExtensionList, protected FileSystem $fileSystem, protected FileUrlGenerator $fileUrlgenerator, protected Messenger $messenger, protected ConfigManager $configManager, protected CivicthemeConfigManager $themeConfigManager, protected ImageFactory $imageFactory) {
53+
public function __construct(protected ThemeManager $themeManager, protected ThemeExtensionList $themeExtensionList, protected FileSystemInterface $fileSystem, protected FileUrlGenerator $fileUrlgenerator, protected Messenger $messenger, protected ConfigManager $configManager, protected CivicthemeConfigManager $themeConfigManager, protected ImageFactory $imageFactory) {
5554
}
5655

5756
/**

0 commit comments

Comments
 (0)