Skip to content

Commit e17f675

Browse files
Florian WeberLuis
authored andcommitted
PHP 8.4 compatibility (3.x)
1 parent c44734e commit e17f675

File tree

5 files changed

+7
-7
lines changed

5 files changed

+7
-7
lines changed

modules/graphql_core/src/GraphQL/EntityCrudOutputWrapper.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,9 @@ class EntityCrudOutputWrapper {
4040
* additional error messages e.g. for access restrictions.
4141
*/
4242
public function __construct(
43-
EntityInterface $entity = NULL,
44-
ConstraintViolationListInterface $violations = NULL,
45-
array $errors = NULL
43+
?EntityInterface $entity = NULL,
44+
?ConstraintViolationListInterface $violations = NULL,
45+
?array $errors = NULL
4646
) {
4747
$this->entity = $entity;
4848
$this->violations = $violations;

src/Config/GraphQLConfigOverrides.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ class GraphQLConfigOverrides implements ConfigFactoryOverrideInterface {
3535
* The config storage service.
3636
* @param \Drupal\language\LanguageNegotiationMethodManager|null $negotiatorManager
3737
*/
38-
public function __construct(StorageInterface $storage, LanguageNegotiationMethodManager $negotiatorManager = NULL) {
38+
public function __construct(StorageInterface $storage, ?LanguageNegotiationMethodManager $negotiatorManager = NULL) {
3939
$this->baseStorage = $storage;
4040
$this->negotiatorManager = $negotiatorManager;
4141
}

src/Form/EntityQueryMapForm.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ class EntityQueryMapForm extends EntityForm {
1313
/**
1414
* {@inheritdoc}
1515
*/
16-
public function buildForm(array $form, FormStateInterface $formState = NULL) {
16+
public function buildForm(array $form, ?FormStateInterface $formState = NULL) {
1717
$form = parent::buildForm($form, $formState);
1818
$form['#title'] = $this->t('Query map version %version', ['%version' => $this->entity->id()]);
1919

src/GraphQL/Execution/QueryResult.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ class QueryResult extends ExecutionResult implements RefinableCacheableDependenc
2222
* @param \Drupal\Core\Cache\CacheableDependencyInterface $metadata
2323
* The cache metadata collected during query execution.
2424
*/
25-
public function __construct(array $data = null, array $errors = [], array $extensions = [], CacheableDependencyInterface $metadata = NULL) {
25+
public function __construct(?array $data = null, array $errors = [], array $extensions = [], ?CacheableDependencyInterface $metadata = NULL) {
2626
$this->data = $data;
2727
$this->errors = $errors;
2828
$this->extensions = $extensions;

src/Plugin/LanguageNegotiation/LanguageNegotiationGraphQL.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ public function __construct(GraphQLLanguageContext $languageContext) {
5757
/**
5858
* {@inheritdoc}
5959
*/
60-
public function getLangcode(Request $request = NULL) {
60+
public function getLangcode(?Request $request = NULL) {
6161
return $this->languageContext->getCurrentLanguage();
6262
}
6363

0 commit comments

Comments
 (0)