Skip to content

Commit 89cb4a3

Browse files
authored
Merge pull request #97 from CuBoulder/issue/96
#96 - Explicitly mark nullable for PHP 8.4, D11 typedConfigManager Requirement
2 parents 30c1f42 + a824eda commit 89cb4a3

4 files changed

Lines changed: 13 additions & 7 deletions

File tree

‎src/Form/AppearanceForm.php‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
namespace Drupal\ucb_site_configuration\Form;
44

55
use Drupal\Core\Config\ConfigFactoryInterface;
6+
use Drupal\Core\Config\TypedConfigManagerInterface;
67
use Drupal\Core\File\FileSystemInterface;
78
use Drupal\Core\Form\ConfigFormBase;
89
use Drupal\Core\Form\FormStateInterface;
@@ -50,8 +51,8 @@ class AppearanceForm extends ConfigFormBase {
5051
* @param \Drupal\ucb_site_configuration\SiteConfiguration $service
5152
* The site configuration service defined in this module.
5253
*/
53-
public function __construct(ConfigFactoryInterface $config_factory, FileSystemInterface $file_system, AccountInterface $user, SiteConfiguration $service) {
54-
parent::__construct($config_factory);
54+
public function __construct(ConfigFactoryInterface $config_factory, TypedConfigManagerInterface $typed_config_manager, FileSystemInterface $file_system, AccountInterface $user, SiteConfiguration $service) {
55+
parent::__construct($config_factory, $typed_config_manager);
5556
$this->fileSystem = $file_system;
5657
$this->user = $user;
5758
$this->service = $service;
@@ -68,6 +69,7 @@ public function __construct(ConfigFactoryInterface $config_factory, FileSystemIn
6869
public static function create(ContainerInterface $container) {
6970
return new static(
7071
$container->get('config.factory'),
72+
$container->get('config.typed'),
7173
$container->get('file_system'),
7274
$container->get('current_user'),
7375
$container->get('ucb_site_configuration')

‎src/Form/ContentTypesForm.php‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
namespace Drupal\ucb_site_configuration\Form;
44

55
use Drupal\Core\Config\ConfigFactoryInterface;
6+
use Drupal\Core\Config\TypedConfigManagerInterface;
67
use Drupal\Core\Entity\EntityTypeManagerInterface;
78
use Drupal\Core\Form\ConfigFormBase;
89
use Drupal\Core\Form\FormStateInterface;
@@ -38,8 +39,8 @@ class ContentTypesForm extends ConfigFormBase {
3839
* @param \Drupal\ucb_site_configuration\SiteConfiguration $service
3940
* The site configuration service defined in this module.
4041
*/
41-
public function __construct(ConfigFactoryInterface $config_factory, EntityTypeManagerInterface $entityTypeManager, SiteConfiguration $service) {
42-
parent::__construct($config_factory);
42+
public function __construct(ConfigFactoryInterface $config_factory, TypedConfigManagerInterface $typed_config_manager, EntityTypeManagerInterface $entityTypeManager, SiteConfiguration $service) {
43+
parent::__construct($config_factory, $typed_config_manager);
4344
$this->entityTypeManager = $entityTypeManager;
4445
$this->service = $service;
4546
}
@@ -55,6 +56,7 @@ public function __construct(ConfigFactoryInterface $config_factory, EntityTypeMa
5556
public static function create(ContainerInterface $container) {
5657
return new static(
5758
$container->get('config.factory'),
59+
$container->get('config.typed'),
5860
$container->get('entity_type.manager'),
5961
$container->get('ucb_site_configuration')
6062
);

‎src/Form/GeneralForm.php‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
namespace Drupal\ucb_site_configuration\Form;
44

55
use Drupal\Core\Config\ConfigFactoryInterface;
6+
use Drupal\Core\Config\TypedConfigManagerInterface;
67
use Drupal\Core\Form\ConfigFormBase;
78
use Drupal\Core\Form\FormStateInterface;
89
use Drupal\Core\Path\PathValidatorInterface;
@@ -68,8 +69,8 @@ class GeneralForm extends ConfigFormBase {
6869
* @param \Drupal\ucb_site_configuration\SiteConfiguration $service
6970
* The site configuration service defined in this module.
7071
*/
71-
public function __construct(ConfigFactoryInterface $config_factory, AliasManagerInterface $alias_manager, PathValidatorInterface $path_validator, RequestContext $request_context, AccountInterface $user, SiteConfiguration $service) {
72-
parent::__construct($config_factory);
72+
public function __construct(ConfigFactoryInterface $config_factory, TypedConfigManagerInterface $typed_config_manager, AliasManagerInterface $alias_manager, PathValidatorInterface $path_validator, RequestContext $request_context, AccountInterface $user, SiteConfiguration $service) {
73+
parent::__construct($config_factory, $typed_config_manager);
7374
$this->aliasManager = $alias_manager;
7475
$this->pathValidator = $path_validator;
7576
$this->requestContext = $request_context;
@@ -88,6 +89,7 @@ public function __construct(ConfigFactoryInterface $config_factory, AliasManager
8889
public static function create(ContainerInterface $container) {
8990
return new static(
9091
$container->get('config.factory'),
92+
$container->get('config.typed'),
9193
$container->get('path_alias.manager'),
9294
$container->get('path.validator'),
9395
$container->get('router.request_context'),

‎src/SiteConfiguration.php‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -473,7 +473,7 @@ public function attachPeopleListConfiguration(array &$variables) {
473473
* A node to match includes that are for specific content. If null, only
474474
* sitewide includes will be attached.
475475
*/
476-
public function attachExternalServiceIncludes(array &$attachments, NodeInterface $node = NULL) {
476+
public function attachExternalServiceIncludes(array &$attachments, ?NodeInterface $node = NULL) {
477477
$storage = $this->entityTypeManager->getStorage($this->entityTypeRepository->getEntityTypeFromClass(ExternalServiceInclude::class));
478478
$query = $storage->getQuery('OR')->condition('sitewide', TRUE);
479479
if ($node) {

0 commit comments

Comments
 (0)