Skip to content
Snippets Groups Projects
Commit a8917eb2 authored by Project-Update-bot's avatar Project-Update-bot
Browse files

Automated Project Update Bot fixes from run 11-188815.

parent f3999748
No related branches found
No related tags found
1 merge request!52Resolve #3451984 "Automated drupal 11"
Pipeline #209394 passed with warnings
name: JSON:API Extras
type: module
description: Builds on top of JSON:API to deliver extra functionality.
core_version_requirement: '^9.2 || ^10'
core_version_requirement: ^10.1 || ^11
package: Web services
configure: jsonapi_extras.settings
dependencies:
......
name: JSON:API Defaults
type: module
description: Builds on top of JSON API to deliver extra functionality.
core_version_requirement: '^9.2 || ^10'
core_version_requirement: ^10.1 || ^11
package: Web services
dependencies:
- jsonapi_extras:jsonapi_extras
......@@ -103,7 +103,7 @@ class ConfigSubscriber implements EventSubscriberInterface {
/**
* {@inheritdoc}
*/
public static function getSubscribedEvents() {
public static function getSubscribedEvents(): array {
$events[ConfigEvents::SAVE][] = ['onSave'];
// Run before
// \Drupal\jsonapi\EventSubscriber\ResourceResponseSubscriber::onResponse()
......
......@@ -50,7 +50,7 @@ class JsonApiBuildSubscriber implements EventSubscriberInterface {
/**
* What events to subscribe to.
*/
public static function getSubscribedEvents() {
public static function getSubscribedEvents(): array {
$events[ResourceTypeBuildEvents::BUILD][] = ['applyResourceConfig'];
return $events;
}
......
......@@ -170,7 +170,7 @@ class JsonapiResourceConfigForm extends EntityForm {
}
catch (PluginNotFoundException $exception) {
// Log the exception and continue.
watchdog_exception('jsonapi_extras', $exception);
\Drupal\Component\Utility\DeprecationHelper::backwardsCompatibleCall(\Drupal::VERSION, '10.1.0', fn() => \Drupal\Core\Utility\Error::logException(\Drupal::logger('jsonapi_extras'), $exception), fn() => watchdog_exception('jsonapi_extras', $exception));
}
$form['id'] = ['#type' => 'hidden', '#value' => $resource_config_id];
}
......@@ -341,7 +341,7 @@ class JsonapiResourceConfigForm extends EntityForm {
}
catch (PluginException $exception) {
// Log exception and continue.
watchdog_exception('jsonapi_extras', $exception);
\Drupal\Component\Utility\DeprecationHelper::backwardsCompatibleCall(\Drupal::VERSION, '10.1.0', fn() => \Drupal\Core\Utility\Error::logException(\Drupal::logger('jsonapi_extras'), $exception), fn() => watchdog_exception('jsonapi_extras', $exception));
continue;
}
NestedArray::setValue(
......
......@@ -48,7 +48,7 @@ class FieldItemNormalizer extends JsonApiNormalizerDecoratorBase {
/**
* {@inheritdoc}
*/
public function normalize($object, $format = NULL, array $context = []) {
public function normalize($object, $format = NULL, array $context = []): array|bool|string|int|float|null|\ArrayObject {
// First get the regular output.
$normalized_output = parent::normalize($object, $format, $context);
// Then detect if there is any enhancer to be applied here.
......
......@@ -34,7 +34,7 @@ class JsonApiNormalizerDecoratorBase implements NormalizerInterface, Denormalize
/**
* {@inheritdoc}
*/
public function normalize($object, $format = NULL, array $context = []) {
public function normalize($object, $format = NULL, array $context = []): array|bool|string|int|float|null|\ArrayObject {
return $this->inner->normalize($object, $format, $context);
}
......@@ -55,14 +55,14 @@ class JsonApiNormalizerDecoratorBase implements NormalizerInterface, Denormalize
/**
* {@inheritdoc}
*/
public function supportsNormalization($data, $format = NULL) {
public function supportsNormalization($data, $format = NULL): bool {
return $this->inner instanceof NormalizerInterface && $this->inner->supportsNormalization($data, $format);
}
/**
* {@inheritdoc}
*/
public function supportsDenormalization($data, $type, $format = NULL) {
public function supportsDenormalization($data, $type, $format = NULL): bool {
return $this->inner instanceof DenormalizerInterface && $this->inner->supportsDenormalization($data, $type, $format);
}
......
......@@ -43,7 +43,7 @@ class ResourceIdentifierNormalizer extends JsonApiNormalizerDecoratorBase {
/**
* {@inheritdoc}
*/
public function normalize($field, $format = NULL, array $context = []) {
public function normalize($field, $format = NULL, array $context = []): array|bool|string|int|float|null|\ArrayObject {
assert($field instanceof ResourceIdentifier);
$normalized_output = parent::normalize($field, $format, $context);
assert($normalized_output instanceof CacheableNormalization);
......
......@@ -18,7 +18,7 @@ class ResourceObjectNormalizer extends JsonApiNormalizerDecoratorBase {
/**
* {@inheritdoc}
*/
public function normalize($object, $format = NULL, array $context = []) {
public function normalize($object, $format = NULL, array $context = []): array|bool|string|int|float|null|\ArrayObject {
assert($object instanceof ResourceObject);
$resource_type = $object->getResourceType();
$cacheable_normalization = parent::normalize($object, $format, $context);
......
......@@ -98,14 +98,14 @@ class SerializerDecorator implements SerializerInterface, NormalizerInterface, D
/**
* {@inheritdoc}
*/
public function normalize($object, $format = NULL, array $context = []) {
public function normalize($object, $format = NULL, array $context = []): array|bool|string|int|float|null|\ArrayObject {
return $this->relay(__FUNCTION__, func_get_args());
}
/**
* {@inheritdoc}
*/
public function supportsDecoding($format) {
public function supportsDecoding($format): bool {
return $this->relay(__FUNCTION__, func_get_args());
}
......@@ -119,7 +119,7 @@ class SerializerDecorator implements SerializerInterface, NormalizerInterface, D
/**
* {@inheritdoc}
*/
public function supportsDenormalization($data, $type, $format = NULL) {
public function supportsDenormalization($data, $type, $format = NULL): bool {
return $this->relay(__FUNCTION__, func_get_args());
}
......@@ -133,7 +133,7 @@ class SerializerDecorator implements SerializerInterface, NormalizerInterface, D
/**
* {@inheritdoc}
*/
public function supportsNormalization($data, $format = NULL) {
public function supportsNormalization($data, $format = NULL): bool {
return $this->relay(__FUNCTION__, func_get_args());
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment