Skip to content

Commit 21d560d

Browse files
committed
Fix PHP 8.4 incompatibility
The module throws some warnings about "Implicitly marking a parameter as nullable is deprecated since PHP 8.4."
1 parent c1a9054 commit 21d560d

File tree

5 files changed

+5
-5
lines changed

5 files changed

+5
-5
lines changed

modules/next/modules/next_jwt/src/Plugin/Next/PreviewUrlGenerator/Jwt.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ public function submitConfigurationForm(array &$form, FormStateInterface $form_s
132132
/**
133133
* {@inheritdoc}
134134
*/
135-
public function generate(NextSiteInterface $next_site, EntityInterface $entity, string $resource_version = NULL): ?Url {
135+
public function generate(NextSiteInterface $next_site, EntityInterface $entity, ?string $resource_version = NULL): ?Url {
136136
$query = [];
137137
$query['path'] = $path = $entity->toUrl()->toString();
138138
$query['uuid'] = $this->user->uuid();

modules/next/src/Form/IframeSitePreviewerSwitcherForm.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ public function getFormId() {
4747
/**
4848
* {@inheritdoc}
4949
*/
50-
public function buildForm(array $form, FormStateInterface $form_state, EntityInterface $entity = NULL, array $sites = [], string $site_id = NULL) {
50+
public function buildForm(array $form, FormStateInterface $form_state, ?EntityInterface $entity = NULL, array $sites = [], ?string $site_id = NULL) {
5151
/** @var \Drupal\next\Entity\NextSiteInterface[] $sites */
5252
$site_options = [];
5353
foreach ($sites as $site) {

modules/next/src/Form/NextEntityTypeConfigForm.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ class NextEntityTypeConfigForm extends EntityForm {
6060
* @param \Drupal\next\Plugin\RevalidatorManagerInterface $revalidator_manager
6161
* The revalidator manager.
6262
*/
63-
public function __construct(EntityTypeManagerInterface $entity_type_manager, EntityTypeBundleInfoInterface $entity_type_bundle_info, SiteResolverManagerInterface $site_resolver_manager, RevalidatorManagerInterface $revalidator_manager = NULL) {
63+
public function __construct(EntityTypeManagerInterface $entity_type_manager, EntityTypeBundleInfoInterface $entity_type_bundle_info, SiteResolverManagerInterface $site_resolver_manager, ?RevalidatorManagerInterface $revalidator_manager = NULL) {
6464
if (!$revalidator_manager) {
6565
@trigger_error('Calling NextEntityTypeConfigForm::__construct() without the $revalidator_manager argument is deprecated in next:1.4.0 and will be required in next:2.0.0. See https://www.drupal.org/node/3325622', E_USER_DEPRECATED);
6666
// @codingStandardsIgnoreStart

modules/next/src/Plugin/Next/PreviewUrlGenerator/SimpleOauth.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ public function submitConfigurationForm(array &$form, FormStateInterface $form_s
124124
/**
125125
* {@inheritdoc}
126126
*/
127-
public function generate(NextSiteInterface $next_site, EntityInterface $entity, string $resource_version = NULL): ?Url {
127+
public function generate(NextSiteInterface $next_site, EntityInterface $entity, ?string $resource_version = NULL): ?Url {
128128
$query = [];
129129
$query['path'] = $path = $entity->toUrl()->toString();
130130

modules/next/src/Plugin/PreviewUrlGeneratorInterface.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ public function getDescription(): string;
4949
* @return \Drupal\Core\Url|null
5050
* The generated preview url.
5151
*/
52-
public function generate(NextSiteInterface $next_site, EntityInterface $entity, string $resource_version = NULL): ?Url;
52+
public function generate(NextSiteInterface $next_site, EntityInterface $entity, ?string $resource_version = NULL): ?Url;
5353

5454
/**
5555
* Validates the preview url.

0 commit comments

Comments
 (0)