Skip to content
Snippets Groups Projects
Commit 9aa1d53c authored by catch's avatar catch
Browse files

Issue #3232074 by bbrala, daffie, effulgentsia, catch, gabesullice, alexpott:...

Issue #3232074 by bbrala, daffie, effulgentsia, catch, gabesullice, alexpott: [Symfony 6] Add "array|string|int|float|bool|\ArrayObject|null" to all Normalizer classes that implement the method ::normalize()
parent 055054d5
No related branches found
No related tags found
33 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!2074Issue #2707689: NodeForm::actions() checks for delete access on new entities,!1896Issue #2940605: Can only intentionally re-render an entity with references 20 times,!1459Issue #3087632: menu_name max length is too long,!1398Issue #3186992 by hinal05, djsagar, kiran.kadam911, hitvika_verma,...,!1283Issue #2922435: "Add new comment" and "@count comments" links are not following accessibility good practices,!1255Issue #3238922: Refactor (if feasible) uses of the jQuery serialize function to use vanillaJS,!1254Issue #3238915: Refactor (if feasible) uses of the jQuery ready function to use VanillaJS,!1213Issue #3236497: Allow other modules to opt out of security release message from update_page_top,!1185Issue 318778: Rerolled patch.,!1162Issue #3100350: Unable to save '/' root path alias,!1158Draft: Resolve #3161889 "Symfony 5 4",!1073issue #3191727: Focus states on mobile second level navigation items fixed,!10223132456: Fix issue where views instances are emptied before an ajax request is complete,!1018Issue #2793343: Dialog drupalAutoButtons option should be respected on initial load,!1014Issue #3226806: Move filter implementations from filter.module to plugin classes,!957Added throwing of InvalidPluginDefinitionException from getDefinition().,!939Issue #2971209: Allow the MediaLibraryUiBuilder service to use an alternative view display,!878Issue #3221534: throw an exception when IDs passed to loadMultiple() are badly formed,!877Issue #2708101: Default value for link text is not saved,!873Issue #2875228: Site install not using batch API service,!872Draft: Issue #3221319: Race condition when creating menu links and editing content deletes menu links,!866Issue #2845319: The highlighting of the 'Home' menu-link does not respect query strings and fragment identifiers,!844Resolve #3036010 "Updaters",!8293023322 - Contextual Links Style Update,!712Issue #2909128: Autocomplete intermittent on Chrome Android,!617Issue #3043725: Provide a Entity Handler for user cancelation,!579Issue #2230909: Simple decimals fail to pass validation,!560Move callback classRemove outside of the loop,!555Issue #3202493,!485Sets the autocomplete attribute for username/password input field on login form.,!449Issue #2784233: Allow multiple vocabularies in the taxonomy filter,!30Issue #3182188: Updates composer usage to point at ./vendor/bin/composer
......@@ -16,7 +16,7 @@
* @see https://www.drupal.org/project/drupal/issues/3032787
* @see jsonapi.api.php
*/
class CacheableNormalization implements CacheableDependencyInterface {
class CacheableNormalization extends TemporaryArrayObjectThrowingExceptions implements CacheableDependencyInterface {
use CacheableDependencyTrait;
......
<?php
namespace Drupal\jsonapi\Normalizer\Value;
/**
* An \ArrayObject that throws an exception when used as an ArrayObject.
*
* @internal This class implements all methods for class \ArrayObject and throws
* an \Exception when one of those methods is called.
*/
class TemporaryArrayObjectThrowingExceptions extends \ArrayObject {
/**
* Append a value to the ArrayObject.
*
* @param mixed $value
* The value to append to the ArrayObject.
*
* @throws \Exception
* This class does not support this action but it must implement it, because
* it is extending \ArrayObject.
*/
public function append($value): void {
throw new \Exception('This ' . __CLASS__ . ' does not support this action but it must implement it, because it is extending \ArrayObject.');
}
/**
* Sort the ArrayObject.
*
* @param int $flags
* The flags to sort the ArrayObject by.
*
* @return bool
* This method always returns TRUE.
*
* @throws \Exception
* This class does not support this action but it must implement it, because
* it is extending \ArrayObject.
*/
public function asort($flags = SORT_REGULAR): bool {
throw new \Exception('This ' . __CLASS__ . ' does not support this action but it must implement it, because it is extending \ArrayObject.');
}
/**
* Count the ArrayObject.
*
* @return int
* The number of public properties in the \ArrayObject.
*
* @throws \Exception
* This class does not support this action but it must implement it, because
* it is extending \ArrayObject.
*/
public function count(): int {
throw new \Exception('This ' . __CLASS__ . ' does not support this action but it must implement it, because it is extending \ArrayObject.');
}
/**
* Exchange the current array with another array or object.
*
* @param array|object $array
* The array to replace for the current array.
*
* @return array
* The new array or object to exchange with the current array.
*
* @throws \Exception
* This class does not support this action but it must implement it, because
* it is extending \ArrayObject.
*/
public function exchangeArray($array): array {
throw new \Exception('This ' . __CLASS__ . ' does not support this action but it must implement it, because it is extending \ArrayObject.');
}
/**
* Exports the \ArrayObject to an array.
*
* @return array
* Returns a copy of the array.
*
* @throws \Exception
* This class does not support this action but it must implement it, because
* it is extending \ArrayObject.
*/
public function getArrayCopy(): array {
throw new \Exception('This ' . __CLASS__ . ' does not support this action but it must implement it, because it is extending \ArrayObject.');
}
/**
* Gets the behavior flags of the \ArrayObject.
*
* @return int
* Returns the behavior flags of the \ArrayObject.
*
* @throws \Exception
* This class does not support this action but it must implement it, because
* it is extending \ArrayObject.
*/
public function getFlags(): int {
throw new \Exception('This ' . __CLASS__ . ' does not support this action but it must implement it, because it is extending \ArrayObject.');
}
/**
* Create a new iterator from an ArrayObject instance.
*
* @return \Iterator
* An iterator from the ArrayObject.
*
* @throws \Exception
* This class does not support this action but it must implement it, because
* it is extending \ArrayObject.
*/
public function getIterator(): \Iterator {
throw new \Exception('This ' . __CLASS__ . ' does not support this action but it must implement it, because it is extending \ArrayObject.');
}
/**
* Gets the class name of the array iterator that is used by \ArrayObject::getIterator().
*
* @return string
* Returns the iterator class name that is used to iterate over this object.
*
* @throws \Exception
* This class does not support this action but it must implement it, because
* it is extending \ArrayObject.
*/
public function getIteratorClass(): string {
throw new \Exception('This ' . __CLASS__ . ' does not support this action but it must implement it, because it is extending \ArrayObject.');
}
/**
* Sort the entries by key.
*
* @param int $flags
* The flags to sort the ArrayObject by.
*
* @return bool
* This method always returns TRUE.
*
* @throws \Exception
* This class does not support this action but it must implement it, because
* it is extending \ArrayObject.
*/
public function ksort($flags = SORT_REGULAR): bool {
throw new \Exception('This ' . __CLASS__ . ' does not support this action but it must implement it, because it is extending \ArrayObject.');
}
/**
* Sort an array using a case insensitive "natural order" algorithm.
*
* @return bool
* This method always returns TRUE.
*
* @throws \Exception
* This class does not support this action but it must implement it, because
* it is extending \ArrayObject.
*/
public function natcasesort(): bool {
throw new \Exception('This ' . __CLASS__ . ' does not support this action but it must implement it, because it is extending \ArrayObject.');
}
/**
* Sort entries using a "natural order" algorithm.
*
* @return bool
* This method always returns TRUE.
*
* @throws \Exception
* This class does not support this action but it must implement it, because
* it is extending \ArrayObject.
*/
public function natsort(): bool {
throw new \Exception('This ' . __CLASS__ . ' does not support this action but it must implement it, because it is extending \ArrayObject.');
}
/**
* Returns whether the requested index exists.
*
* @param mixed $key
* The index being checked.
*
* @return bool
* Return TRUE if the requested index exists, otherwise FALSE.
*
* @throws \Exception
* This class does not support this action but it must implement it, because
* it is extending \ArrayObject.
*/
public function offsetExists($key): bool {
throw new \Exception('This ' . __CLASS__ . ' does not support this action but it must implement it, because it is extending \ArrayObject.');
}
/**
* Returns the value at the specified index.
*
* @param mixed $key
* The index with the value.
*
* @return mixed
* The value at the specified index or null.
*
* @throws \Exception
* This class does not support this action but it must implement it, because
* it is extending \ArrayObject.
*/
#[\ReturnTypeWillChange]
public function offsetGet($key) {
throw new \Exception('This ' . __CLASS__ . ' does not support this action but it must implement it, because it is extending \ArrayObject.');
}
/**
* Sets the value at the specified index to new value.
*
* @param mixed $key
* The index being set.
* @param mixed $value
* The new value for the key.
*
* @throws \Exception
* This class does not support this action but it must implement it, because
* it is extending \ArrayObject.
*/
public function offsetSet($key, $value): void {
throw new \Exception('This ' . __CLASS__ . ' does not support this action but it must implement it, because it is extending \ArrayObject.');
}
/**
* Unsets the value at the specified index.
*
* @param mixed $key
* The index being unset.
*
* @throws \Exception
* This class does not support this action but it must implement it, because
* it is extending \ArrayObject.
*/
public function offsetUnset($key): void {
throw new \Exception('This ' . __CLASS__ . ' does not support this action but it must implement it, because it is extending \ArrayObject.');
}
/**
* Serialize the \ArrayObject.
*
* @throws \Exception
* This class does not support this action but it must implement it, because
* it is extending \ArrayObject.
*/
public function serialize(): string {
throw new \Exception('This ' . __CLASS__ . ' does not support this action but it must implement it, because it is extending \ArrayObject.');
}
/**
* Sets the behavior flags for the \ArrayObject.
*
* @param int $flags
* Set the flags that change the behavior of the \ArrayObject.
*
* @throws \Exception
* This class does not support this action but it must implement it, because
* it is extending \ArrayObject.
*/
public function setFlags($flags): void {
throw new \Exception('This ' . __CLASS__ . ' does not support this action but it must implement it, because it is extending \ArrayObject.');
}
/**
* Sets the iterator classname for the \ArrayObject.
*
* @param string $iteratorClass
* The classname of the array iterator to use when iterating over this
* object.
*
* @throws \Exception
* This class does not support this action but it must implement it, because
* it is extending \ArrayObject.
*/
public function setIteratorClass($iteratorClass): void {
throw new \Exception('This ' . __CLASS__ . ' does not support this action but it must implement it, because it is extending \ArrayObject.');
}
/**
* Sort the entries with a user-defined comparison function.
*
* @param callable $callback
* The comparison function must return an integer less than, equal to, or
* greater than zero if the first argument is considered to be respectively
* less than, equal to, or greater than the second.
*
* @return bool
* This method always returns TRUE.
*
* @throws \Exception
* This class does not support this action but it must implement it, because
* it is extending \ArrayObject.
*/
public function uasort($callback): bool {
throw new \Exception('This ' . __CLASS__ . ' does not support this action but it must implement it, because it is extending \ArrayObject.');
}
/**
* Sort the entries by keys using a user-defined comparison function.
*
* @param callable $callback
* The comparison function must return an integer less than, equal to, or
* greater than zero if the first argument is considered to be respectively
* less than, equal to, or greater than the second.
*
* @return bool
* This method always returns TRUE.
*
* @throws \Exception
* This class does not support this action but it must implement it, because
* it is extending \ArrayObject.
*/
public function uksort($callback): bool {
throw new \Exception('This ' . __CLASS__ . ' does not support this action but it must implement it, because it is extending \ArrayObject.');
}
/**
* Unserialize the \ArrayObject.
*
* @throws \Exception
* This class does not support this action but it must implement it, because
* it is extending \ArrayObject.
*/
public function unserialize($data): void {
throw new \Exception('This ' . __CLASS__ . ' does not support this action but it must implement it, because it is extending \ArrayObject.');
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment