Skip to content
Snippets Groups Projects
Unverified Commit f06ad93f authored by Lee Rowlands's avatar Lee Rowlands
Browse files

Issue #3224523 by alexpott, longwave: [PHP 8.1] Add ReturnTypeWillChange attribute where necessary

parent 967e1677
No related branches found
No related tags found
13 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!1896Issue #2940605: Can only intentionally re-render an entity with references 20 times,!10223132456: Fix issue where views instances are emptied before an ajax request is complete,!872Draft: Issue #3221319: Race condition when creating menu links and editing content deletes menu links,!579Issue #2230909: Simple decimals fail to pass validation,!560Move callback classRemove outside of the loop,!555Issue #3202493,!512Issue #3207771: Menu UI node type form documentation points to non-existent function,!485Sets the autocomplete attribute for username/password input field on login form.,!449Issue #2784233: Allow multiple vocabularies in the taxonomy filter,!231Issue #2671162: summary text wysiwyg patch working fine on 9.2.0-dev,!43Resolve #3173180: Add UI for 'loading' html attribute to images,!30Issue #3182188: Updates composer usage to point at ./vendor/bin/composer
Showing
with 78 additions and 0 deletions
......@@ -115,6 +115,7 @@ protected function checkListHasItemWithContent(array $scaffold_files) {
/**
* {@inheritdoc}
*/
#[\ReturnTypeWillChange]
public function getIterator() {
return new \ArrayIterator($this->scaffoldFilesByProject);
}
......
......@@ -33,6 +33,7 @@ trait ReflectionClass
/**
* {@inheritDoc}
*/
#[\ReturnTypeWillChange]
public function getConstants(?int $filter = null)
{
throw new ReflectionException('Method not implemented');
......@@ -41,6 +42,7 @@ public function getConstants(?int $filter = null)
/**
* {@inheritDoc}
*/
#[\ReturnTypeWillChange]
public function newInstance(mixed ...$args)
{
throw new ReflectionException('Method not implemented');
......
......@@ -49,6 +49,7 @@ public function __construct(StaticReflectionParser $staticReflectionParser)
/**
* {@inheritDoc}
*/
#[\ReturnTypeWillChange]
public function getName()
{
return $this->staticReflectionParser->getClassName();
......@@ -57,6 +58,7 @@ public function getName()
/**
* {@inheritDoc}
*/
#[\ReturnTypeWillChange]
public function getDocComment()
{
return $this->staticReflectionParser->getDocComment();
......@@ -65,6 +67,7 @@ public function getDocComment()
/**
* {@inheritDoc}
*/
#[\ReturnTypeWillChange]
public function getNamespaceName()
{
return $this->staticReflectionParser->getNamespaceName();
......@@ -81,6 +84,7 @@ public function getUseStatements()
/**
* {@inheritDoc}
*/
#[\ReturnTypeWillChange]
public function getMethod($name)
{
throw new ReflectionException('Method not implemented');
......@@ -89,6 +93,7 @@ public function getMethod($name)
/**
* {@inheritDoc}
*/
#[\ReturnTypeWillChange]
public function getProperty($name)
{
throw new ReflectionException('Method not implemented');
......@@ -105,6 +110,7 @@ public static function export($argument, $return = false)
/**
* {@inheritDoc}
*/
#[\ReturnTypeWillChange]
public function getConstant($name)
{
throw new ReflectionException('Method not implemented');
......@@ -113,6 +119,7 @@ public function getConstant($name)
/**
* {@inheritDoc}
*/
#[\ReturnTypeWillChange]
public function getConstructor()
{
throw new ReflectionException('Method not implemented');
......@@ -121,6 +128,7 @@ public function getConstructor()
/**
* {@inheritDoc}
*/
#[\ReturnTypeWillChange]
public function getDefaultProperties()
{
throw new ReflectionException('Method not implemented');
......@@ -129,6 +137,7 @@ public function getDefaultProperties()
/**
* {@inheritDoc}
*/
#[\ReturnTypeWillChange]
public function getEndLine()
{
throw new ReflectionException('Method not implemented');
......@@ -137,6 +146,7 @@ public function getEndLine()
/**
* {@inheritDoc}
*/
#[\ReturnTypeWillChange]
public function getExtension()
{
throw new ReflectionException('Method not implemented');
......@@ -145,6 +155,7 @@ public function getExtension()
/**
* {@inheritDoc}
*/
#[\ReturnTypeWillChange]
public function getExtensionName()
{
throw new ReflectionException('Method not implemented');
......@@ -153,6 +164,7 @@ public function getExtensionName()
/**
* {@inheritDoc}
*/
#[\ReturnTypeWillChange]
public function getFileName()
{
throw new ReflectionException('Method not implemented');
......@@ -161,6 +173,7 @@ public function getFileName()
/**
* {@inheritDoc}
*/
#[\ReturnTypeWillChange]
public function getInterfaceNames()
{
throw new ReflectionException('Method not implemented');
......@@ -169,6 +182,7 @@ public function getInterfaceNames()
/**
* {@inheritDoc}
*/
#[\ReturnTypeWillChange]
public function getInterfaces()
{
throw new ReflectionException('Method not implemented');
......@@ -177,6 +191,7 @@ public function getInterfaces()
/**
* {@inheritDoc}
*/
#[\ReturnTypeWillChange]
public function getMethods($filter = null)
{
throw new ReflectionException('Method not implemented');
......@@ -185,6 +200,7 @@ public function getMethods($filter = null)
/**
* {@inheritDoc}
*/
#[\ReturnTypeWillChange]
public function getModifiers()
{
throw new ReflectionException('Method not implemented');
......@@ -193,6 +209,7 @@ public function getModifiers()
/**
* {@inheritDoc}
*/
#[\ReturnTypeWillChange]
public function getParentClass()
{
throw new ReflectionException('Method not implemented');
......@@ -201,6 +218,7 @@ public function getParentClass()
/**
* {@inheritDoc}
*/
#[\ReturnTypeWillChange]
public function getProperties($filter = null)
{
throw new ReflectionException('Method not implemented');
......@@ -209,6 +227,7 @@ public function getProperties($filter = null)
/**
* {@inheritDoc}
*/
#[\ReturnTypeWillChange]
public function getShortName()
{
throw new ReflectionException('Method not implemented');
......@@ -217,6 +236,7 @@ public function getShortName()
/**
* {@inheritDoc}
*/
#[\ReturnTypeWillChange]
public function getStartLine()
{
throw new ReflectionException('Method not implemented');
......@@ -225,6 +245,7 @@ public function getStartLine()
/**
* {@inheritDoc}
*/
#[\ReturnTypeWillChange]
public function getStaticProperties()
{
throw new ReflectionException('Method not implemented');
......@@ -233,6 +254,7 @@ public function getStaticProperties()
/**
* {@inheritDoc}
*/
#[\ReturnTypeWillChange]
public function getStaticPropertyValue($name, $default = '')
{
throw new ReflectionException('Method not implemented');
......@@ -241,6 +263,7 @@ public function getStaticPropertyValue($name, $default = '')
/**
* {@inheritDoc}
*/
#[\ReturnTypeWillChange]
public function getTraitAliases()
{
throw new ReflectionException('Method not implemented');
......@@ -249,6 +272,7 @@ public function getTraitAliases()
/**
* {@inheritDoc}
*/
#[\ReturnTypeWillChange]
public function getTraitNames()
{
throw new ReflectionException('Method not implemented');
......@@ -257,6 +281,7 @@ public function getTraitNames()
/**
* {@inheritDoc}
*/
#[\ReturnTypeWillChange]
public function getTraits()
{
throw new ReflectionException('Method not implemented');
......@@ -265,6 +290,7 @@ public function getTraits()
/**
* {@inheritDoc}
*/
#[\ReturnTypeWillChange]
public function hasConstant($name)
{
throw new ReflectionException('Method not implemented');
......@@ -273,6 +299,7 @@ public function hasConstant($name)
/**
* {@inheritDoc}
*/
#[\ReturnTypeWillChange]
public function hasMethod($name)
{
throw new ReflectionException('Method not implemented');
......@@ -281,6 +308,7 @@ public function hasMethod($name)
/**
* {@inheritDoc}
*/
#[\ReturnTypeWillChange]
public function hasProperty($name)
{
throw new ReflectionException('Method not implemented');
......@@ -289,6 +317,7 @@ public function hasProperty($name)
/**
* {@inheritDoc}
*/
#[\ReturnTypeWillChange]
public function implementsInterface($interface)
{
throw new ReflectionException('Method not implemented');
......@@ -297,6 +326,7 @@ public function implementsInterface($interface)
/**
* {@inheritDoc}
*/
#[\ReturnTypeWillChange]
public function inNamespace()
{
throw new ReflectionException('Method not implemented');
......@@ -305,6 +335,7 @@ public function inNamespace()
/**
* {@inheritDoc}
*/
#[\ReturnTypeWillChange]
public function isAbstract()
{
throw new ReflectionException('Method not implemented');
......@@ -313,6 +344,7 @@ public function isAbstract()
/**
* {@inheritDoc}
*/
#[\ReturnTypeWillChange]
public function isCloneable()
{
throw new ReflectionException('Method not implemented');
......@@ -321,6 +353,7 @@ public function isCloneable()
/**
* {@inheritDoc}
*/
#[\ReturnTypeWillChange]
public function isFinal()
{
throw new ReflectionException('Method not implemented');
......@@ -329,6 +362,7 @@ public function isFinal()
/**
* {@inheritDoc}
*/
#[\ReturnTypeWillChange]
public function isInstance($object)
{
throw new ReflectionException('Method not implemented');
......@@ -337,6 +371,7 @@ public function isInstance($object)
/**
* {@inheritDoc}
*/
#[\ReturnTypeWillChange]
public function isInstantiable()
{
throw new ReflectionException('Method not implemented');
......@@ -345,6 +380,7 @@ public function isInstantiable()
/**
* {@inheritDoc}
*/
#[\ReturnTypeWillChange]
public function isInterface()
{
throw new ReflectionException('Method not implemented');
......@@ -353,6 +389,7 @@ public function isInterface()
/**
* {@inheritDoc}
*/
#[\ReturnTypeWillChange]
public function isInternal()
{
throw new ReflectionException('Method not implemented');
......@@ -361,6 +398,7 @@ public function isInternal()
/**
* {@inheritDoc}
*/
#[\ReturnTypeWillChange]
public function isIterateable()
{
throw new ReflectionException('Method not implemented');
......@@ -369,6 +407,7 @@ public function isIterateable()
/**
* {@inheritDoc}
*/
#[\ReturnTypeWillChange]
public function isSubclassOf($class)
{
throw new ReflectionException('Method not implemented');
......@@ -377,6 +416,7 @@ public function isSubclassOf($class)
/**
* {@inheritDoc}
*/
#[\ReturnTypeWillChange]
public function isTrait()
{
throw new ReflectionException('Method not implemented');
......@@ -385,6 +425,7 @@ public function isTrait()
/**
* {@inheritDoc}
*/
#[\ReturnTypeWillChange]
public function isUserDefined()
{
throw new ReflectionException('Method not implemented');
......@@ -393,6 +434,7 @@ public function isUserDefined()
/**
* {@inheritDoc}
*/
#[\ReturnTypeWillChange]
public function newInstanceArgs(array $args = [])
{
throw new ReflectionException('Method not implemented');
......@@ -401,6 +443,7 @@ public function newInstanceArgs(array $args = [])
/**
* {@inheritDoc}
*/
#[\ReturnTypeWillChange]
public function newInstanceWithoutConstructor()
{
throw new ReflectionException('Method not implemented');
......@@ -409,6 +452,7 @@ public function newInstanceWithoutConstructor()
/**
* {@inheritDoc}
*/
#[\ReturnTypeWillChange]
public function setStaticPropertyValue($name, $value)
{
throw new ReflectionException('Method not implemented');
......
......@@ -33,6 +33,7 @@ public function __construct($path, $regex) {
/**
* Implements \FilterIterator::accept().
*/
#[\ReturnTypeWillChange]
public function accept() {
/** @var \SplFileInfo $file_info */
$file_info = $this->getInnerIterator()->current();
......
......@@ -142,6 +142,7 @@ public function removeInstanceId($instance_id) {
$this->remove($instance_id);
}
#[\ReturnTypeWillChange]
public function getIterator() {
$instances = [];
foreach ($this->getInstanceIds() as $instance_id) {
......@@ -153,6 +154,7 @@ public function getIterator() {
/**
* {@inheritdoc}
*/
#[\ReturnTypeWillChange]
public function count() {
return count($this->instanceIds);
}
......
......@@ -105,6 +105,7 @@ public function __toString() {
* @return int
* The length of the string.
*/
#[\ReturnTypeWillChange]
public function count() {
return mb_strlen($this->string);
}
......@@ -115,6 +116,7 @@ public function count() {
* @return string
* The safe string content.
*/
#[\ReturnTypeWillChange]
public function jsonSerialize() {
return $this->__toString();
}
......
......@@ -41,6 +41,7 @@ public function __toString() {
/**
* {@inheritdoc}
*/
#[\ReturnTypeWillChange]
public function count() {
return mb_strlen($this->string);
}
......@@ -48,6 +49,7 @@ public function count() {
/**
* {@inheritdoc}
*/
#[\ReturnTypeWillChange]
public function jsonSerialize() {
return $this->__toString();
}
......
......@@ -58,6 +58,7 @@ public function __toString() {
* @return int
* The length of the string.
*/
#[\ReturnTypeWillChange]
public function count() {
return mb_strlen($this->string);
}
......@@ -68,6 +69,7 @@ public function count() {
* @return string
* The safe string content.
*/
#[\ReturnTypeWillChange]
public function jsonSerialize() {
return $this->__toString();
}
......
......@@ -30,6 +30,7 @@ public function __construct(array $values, $message) {
/**
* {@inheritdoc}
*/
#[\ReturnTypeWillChange]
public function offsetExists($offset) {
@trigger_error($this->message, E_USER_DEPRECATED);
return parent::offsetExists($offset);
......@@ -38,6 +39,7 @@ public function offsetExists($offset) {
/**
* {@inheritdoc}
*/
#[\ReturnTypeWillChange]
public function offsetGet($offset) {
@trigger_error($this->message, E_USER_DEPRECATED);
return parent::offsetGet($offset);
......@@ -46,6 +48,7 @@ public function offsetGet($offset) {
/**
* {@inheritdoc}
*/
#[\ReturnTypeWillChange]
public function offsetSet($offset, $value) {
@trigger_error($this->message, E_USER_DEPRECATED);
parent::offsetSet($offset, $value);
......@@ -54,6 +57,7 @@ public function offsetSet($offset, $value) {
/**
* {@inheritdoc}
*/
#[\ReturnTypeWillChange]
public function offsetUnset($offset) {
@trigger_error($this->message, E_USER_DEPRECATED);
parent::offsetUnset($offset);
......@@ -62,6 +66,7 @@ public function offsetUnset($offset) {
/**
* {@inheritdoc}
*/
#[\ReturnTypeWillChange]
public function getIterator() {
@trigger_error($this->message, E_USER_DEPRECATED);
return parent::getIterator();
......@@ -86,6 +91,7 @@ public function serialize() {
/**
* {@inheritdoc}
*/
#[\ReturnTypeWillChange]
public function count() {
@trigger_error($this->message, E_USER_DEPRECATED);
return parent::count();
......
......@@ -114,6 +114,7 @@ public function onChange($name) {
/**
* {@inheritdoc}
*/
#[\ReturnTypeWillChange]
public function getIterator() {
return new \ArrayIterator($this->getElements());
}
......
......@@ -101,6 +101,7 @@ public function __construct($conjunction, $trigger_deprecation = TRUE) {
* size of its conditional array minus one, because one element is the
* conjunction.
*/
#[\ReturnTypeWillChange]
public function count() {
return count($this->conditions) - 1;
}
......
......@@ -179,6 +179,7 @@ protected function getInsertPlaceholderFragment(array $nested_insert_values, arr
/**
* {@inheritdoc}
*/
#[\ReturnTypeWillChange]
public function count() {
return count($this->insertValues);
}
......
......@@ -320,6 +320,7 @@ public function setFetchMode($mode, $a1 = NULL, $a2 = []) {
* @return mixed
* The current row formatted as requested.
*/
#[\ReturnTypeWillChange]
public function current() {
if (isset($this->currentRow)) {
switch ($this->fetchStyle) {
......@@ -379,6 +380,7 @@ public function current() {
/**
* {@inheritdoc}
*/
#[\ReturnTypeWillChange]
public function key() {
return $this->currentKey;
}
......@@ -386,6 +388,7 @@ public function key() {
/**
* {@inheritdoc}
*/
#[\ReturnTypeWillChange]
public function rewind() {
// Nothing to do: our DatabaseStatement can't be rewound.
}
......@@ -393,6 +396,7 @@ public function rewind() {
/**
* {@inheritdoc}
*/
#[\ReturnTypeWillChange]
public function next() {
if (!empty($this->data)) {
$this->currentRow = reset($this->data);
......@@ -407,6 +411,7 @@ public function next() {
/**
* {@inheritdoc}
*/
#[\ReturnTypeWillChange]
public function valid() {
return isset($this->currentRow);
}
......
......@@ -308,6 +308,7 @@ public function fetchAll($mode = NULL, $column_index = NULL, $constructor_argume
/**
* {@inheritdoc}
*/
#[\ReturnTypeWillChange]
public function getIterator() {
return new \ArrayIterator($this->fetchAll());
}
......
......@@ -64,6 +64,7 @@ public function __sleep() {
/**
* {@inheritdoc}
*/
#[\ReturnTypeWillChange]
public function __wakeup() {
// Tests in isolation potentially unserialize in the parent process.
$phpunit_bootstrap = isset($GLOBALS['__PHPUNIT_BOOTSTRAP']);
......
......@@ -658,6 +658,7 @@ public function getTranslatableFields($include_computed = TRUE) {
/**
* {@inheritdoc}
*/
#[\ReturnTypeWillChange]
public function getIterator() {
return new \ArrayIterator($this->getFields());
}
......
......@@ -69,6 +69,7 @@ public function onChange($property_name) {
/**
* {@inheritdoc}
*/
#[\ReturnTypeWillChange]
public function getIterator() {
if (isset($this->entity)) {
return $this->getConfigTypedData()->getIterator();
......
......@@ -160,6 +160,7 @@ public function applyDefaultValue($notify = TRUE) {
/**
* {@inheritdoc}
*/
#[\ReturnTypeWillChange]
public function getIterator() {
return $this->entity instanceof \IteratorAggregate ? $this->entity->getIterator() : new \ArrayIterator([]);
}
......
......@@ -65,6 +65,7 @@ public function getConjunction() {
/**
* {@inheritdoc}
*/
#[\ReturnTypeWillChange]
public function count() {
return count($this->conditions);
}
......
......@@ -115,6 +115,7 @@ public function acceptTests($flag = FALSE) {
/**
* {@inheritdoc}
*/
#[\ReturnTypeWillChange]
public function getChildren() {
$filter = parent::getChildren();
// Pass on the skipped folders list.
......@@ -127,6 +128,7 @@ public function getChildren() {
/**
* {@inheritdoc}
*/
#[\ReturnTypeWillChange]
public function accept() {
$name = $this->current()->getFilename();
// FilesystemIterator::SKIP_DOTS only skips '.' and '..', but not hidden
......
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