Skip to content
Snippets Groups Projects
Verified Commit ea9cc753 authored by Dave Long's avatar Dave Long
Browse files

Issue #3425337 by mondrake: Fix root namespace classes DebugClassLoader...

Issue #3425337 by mondrake: Fix root namespace classes DebugClassLoader forward compatibility warnings
parent 03b8070a
No related branches found
No related tags found
No related merge requests found
Showing
with 92 additions and 186 deletions
...@@ -115,8 +115,7 @@ protected function checkListHasItemWithContent(array $scaffold_files) { ...@@ -115,8 +115,7 @@ protected function checkListHasItemWithContent(array $scaffold_files) {
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
#[\ReturnTypeWillChange] public function getIterator(): \ArrayIterator {
public function getIterator() {
return new \ArrayIterator($this->scaffoldFilesByProject); return new \ArrayIterator($this->scaffoldFilesByProject);
} }
......
...@@ -19,10 +19,6 @@ ...@@ -19,10 +19,6 @@
%Method "Twig\\TokenParser\\TokenParserInterface::[^"]+" might add "[^"]+" as a native return type declaration in the future. Do the same in (child class|implementation) "[^"]+" now to avoid errors or add an explicit @return annotation to suppress this message% %Method "Twig\\TokenParser\\TokenParserInterface::[^"]+" might add "[^"]+" as a native return type declaration in the future. Do the same in (child class|implementation) "[^"]+" now to avoid errors or add an explicit @return annotation to suppress this message%
%Method "WebDriver\\Service\\CurlServiceInterface::[^"]+" might add "[^"]+" as a native return type declaration in the future. Do the same in implementation "[^"]+" now to avoid errors or add an explicit @return annotation to suppress this message% %Method "WebDriver\\Service\\CurlServiceInterface::[^"]+" might add "[^"]+" as a native return type declaration in the future. Do the same in implementation "[^"]+" now to avoid errors or add an explicit @return annotation to suppress this message%
# Skip root namespace native DebugClassLoader forward compatibility warnings.
# These mostly refer to PHP native classes, could be fixed for PHP 8.1.
%Method "[^\\]+::\w+\(\)" might add "[^"]+" as a native return type declaration in the future. Do the same in (child class|implementation) "[^"]+" now to avoid errors or add an explicit @return annotation to suppress this message%
# The following deprecation is listed for Twig 2 compatibility when unit # The following deprecation is listed for Twig 2 compatibility when unit
# testing using \Symfony\Component\ErrorHandler\DebugClassLoader. # testing using \Symfony\Component\ErrorHandler\DebugClassLoader.
%The "Twig\\Environment::getTemplateClass\(\)" method is considered internal\. It may change without further notice\. You should not extend it from "Drupal\\Core\\Template\\TwigEnvironment"\.% %The "Twig\\Environment::getTemplateClass\(\)" method is considered internal\. It may change without further notice\. You should not extend it from "Drupal\\Core\\Template\\TwigEnvironment"\.%
......
...@@ -47,8 +47,7 @@ public function __construct(StaticReflectionParser $staticReflectionParser) ...@@ -47,8 +47,7 @@ public function __construct(StaticReflectionParser $staticReflectionParser)
/** /**
* {@inheritDoc} * {@inheritDoc}
*/ */
#[\ReturnTypeWillChange] public function getName(): string
public function getName()
{ {
return $this->staticReflectionParser->getClassName(); return $this->staticReflectionParser->getClassName();
} }
...@@ -56,8 +55,7 @@ public function getName() ...@@ -56,8 +55,7 @@ public function getName()
/** /**
* {@inheritDoc} * {@inheritDoc}
*/ */
#[\ReturnTypeWillChange] public function getDocComment(): string|FALSE
public function getDocComment()
{ {
return $this->staticReflectionParser->getDocComment(); return $this->staticReflectionParser->getDocComment();
} }
...@@ -65,8 +63,7 @@ public function getDocComment() ...@@ -65,8 +63,7 @@ public function getDocComment()
/** /**
* {@inheritDoc} * {@inheritDoc}
*/ */
#[\ReturnTypeWillChange] public function getNamespaceName(): string
public function getNamespaceName()
{ {
return $this->staticReflectionParser->getNamespaceName(); return $this->staticReflectionParser->getNamespaceName();
} }
...@@ -94,8 +91,7 @@ public function hasClassAttribute(string $attribute) ...@@ -94,8 +91,7 @@ public function hasClassAttribute(string $attribute)
/** /**
* {@inheritDoc} * {@inheritDoc}
*/ */
#[\ReturnTypeWillChange] public function getMethod($name): \ReflectionMethod
public function getMethod($name)
{ {
throw new ReflectionException('Method not implemented'); throw new ReflectionException('Method not implemented');
} }
...@@ -103,8 +99,7 @@ public function getMethod($name) ...@@ -103,8 +99,7 @@ public function getMethod($name)
/** /**
* {@inheritDoc} * {@inheritDoc}
*/ */
#[\ReturnTypeWillChange] public function getProperty($name): \ReflectionProperty
public function getProperty($name)
{ {
throw new ReflectionException('Method not implemented'); throw new ReflectionException('Method not implemented');
} }
...@@ -120,8 +115,7 @@ public static function export($argument, $return = false) ...@@ -120,8 +115,7 @@ public static function export($argument, $return = false)
/** /**
* {@inheritDoc} * {@inheritDoc}
*/ */
#[\ReturnTypeWillChange] public function getConstant($name): mixed
public function getConstant($name)
{ {
throw new ReflectionException('Method not implemented'); throw new ReflectionException('Method not implemented');
} }
...@@ -129,8 +123,7 @@ public function getConstant($name) ...@@ -129,8 +123,7 @@ public function getConstant($name)
/** /**
* {@inheritDoc} * {@inheritDoc}
*/ */
#[\ReturnTypeWillChange] public function getConstructor(): ?\ReflectionMethod
public function getConstructor()
{ {
throw new ReflectionException('Method not implemented'); throw new ReflectionException('Method not implemented');
} }
...@@ -138,8 +131,7 @@ public function getConstructor() ...@@ -138,8 +131,7 @@ public function getConstructor()
/** /**
* {@inheritDoc} * {@inheritDoc}
*/ */
#[\ReturnTypeWillChange] public function getDefaultProperties(): array
public function getDefaultProperties()
{ {
throw new ReflectionException('Method not implemented'); throw new ReflectionException('Method not implemented');
} }
...@@ -147,8 +139,7 @@ public function getDefaultProperties() ...@@ -147,8 +139,7 @@ public function getDefaultProperties()
/** /**
* {@inheritDoc} * {@inheritDoc}
*/ */
#[\ReturnTypeWillChange] public function getEndLine(): int|FALSE
public function getEndLine()
{ {
throw new ReflectionException('Method not implemented'); throw new ReflectionException('Method not implemented');
} }
...@@ -156,8 +147,7 @@ public function getEndLine() ...@@ -156,8 +147,7 @@ public function getEndLine()
/** /**
* {@inheritDoc} * {@inheritDoc}
*/ */
#[\ReturnTypeWillChange] public function getExtension(): ?\ReflectionExtension
public function getExtension()
{ {
throw new ReflectionException('Method not implemented'); throw new ReflectionException('Method not implemented');
} }
...@@ -165,8 +155,7 @@ public function getExtension() ...@@ -165,8 +155,7 @@ public function getExtension()
/** /**
* {@inheritDoc} * {@inheritDoc}
*/ */
#[\ReturnTypeWillChange] public function getExtensionName(): string|FALSE
public function getExtensionName()
{ {
throw new ReflectionException('Method not implemented'); throw new ReflectionException('Method not implemented');
} }
...@@ -174,8 +163,7 @@ public function getExtensionName() ...@@ -174,8 +163,7 @@ public function getExtensionName()
/** /**
* {@inheritDoc} * {@inheritDoc}
*/ */
#[\ReturnTypeWillChange] public function getFileName(): string|FALSE
public function getFileName()
{ {
throw new ReflectionException('Method not implemented'); throw new ReflectionException('Method not implemented');
} }
...@@ -183,8 +171,7 @@ public function getFileName() ...@@ -183,8 +171,7 @@ public function getFileName()
/** /**
* {@inheritDoc} * {@inheritDoc}
*/ */
#[\ReturnTypeWillChange] public function getInterfaceNames(): array
public function getInterfaceNames()
{ {
throw new ReflectionException('Method not implemented'); throw new ReflectionException('Method not implemented');
} }
...@@ -192,8 +179,7 @@ public function getInterfaceNames() ...@@ -192,8 +179,7 @@ public function getInterfaceNames()
/** /**
* {@inheritDoc} * {@inheritDoc}
*/ */
#[\ReturnTypeWillChange] public function getInterfaces(): array
public function getInterfaces()
{ {
throw new ReflectionException('Method not implemented'); throw new ReflectionException('Method not implemented');
} }
...@@ -201,8 +187,7 @@ public function getInterfaces() ...@@ -201,8 +187,7 @@ public function getInterfaces()
/** /**
* {@inheritDoc} * {@inheritDoc}
*/ */
#[\ReturnTypeWillChange] public function getMethods($filter = null): array
public function getMethods($filter = null)
{ {
throw new ReflectionException('Method not implemented'); throw new ReflectionException('Method not implemented');
} }
...@@ -210,8 +195,7 @@ public function getMethods($filter = null) ...@@ -210,8 +195,7 @@ public function getMethods($filter = null)
/** /**
* {@inheritDoc} * {@inheritDoc}
*/ */
#[\ReturnTypeWillChange] public function getModifiers(): int
public function getModifiers()
{ {
throw new ReflectionException('Method not implemented'); throw new ReflectionException('Method not implemented');
} }
...@@ -219,8 +203,7 @@ public function getModifiers() ...@@ -219,8 +203,7 @@ public function getModifiers()
/** /**
* {@inheritDoc} * {@inheritDoc}
*/ */
#[\ReturnTypeWillChange] public function getParentClass(): \ReflectionClass|FALSE
public function getParentClass()
{ {
throw new ReflectionException('Method not implemented'); throw new ReflectionException('Method not implemented');
} }
...@@ -228,8 +211,7 @@ public function getParentClass() ...@@ -228,8 +211,7 @@ public function getParentClass()
/** /**
* {@inheritDoc} * {@inheritDoc}
*/ */
#[\ReturnTypeWillChange] public function getProperties($filter = null): array
public function getProperties($filter = null)
{ {
throw new ReflectionException('Method not implemented'); throw new ReflectionException('Method not implemented');
} }
...@@ -237,8 +219,7 @@ public function getProperties($filter = null) ...@@ -237,8 +219,7 @@ public function getProperties($filter = null)
/** /**
* {@inheritDoc} * {@inheritDoc}
*/ */
#[\ReturnTypeWillChange] public function getShortName(): string
public function getShortName()
{ {
throw new ReflectionException('Method not implemented'); throw new ReflectionException('Method not implemented');
} }
...@@ -246,8 +227,7 @@ public function getShortName() ...@@ -246,8 +227,7 @@ public function getShortName()
/** /**
* {@inheritDoc} * {@inheritDoc}
*/ */
#[\ReturnTypeWillChange] public function getStartLine(): int|FALSE
public function getStartLine()
{ {
throw new ReflectionException('Method not implemented'); throw new ReflectionException('Method not implemented');
} }
...@@ -255,8 +235,7 @@ public function getStartLine() ...@@ -255,8 +235,7 @@ public function getStartLine()
/** /**
* {@inheritDoc} * {@inheritDoc}
*/ */
#[\ReturnTypeWillChange] public function getStaticProperties(): ?array
public function getStaticProperties()
{ {
throw new ReflectionException('Method not implemented'); throw new ReflectionException('Method not implemented');
} }
...@@ -264,8 +243,7 @@ public function getStaticProperties() ...@@ -264,8 +243,7 @@ public function getStaticProperties()
/** /**
* {@inheritDoc} * {@inheritDoc}
*/ */
#[\ReturnTypeWillChange] public function getStaticPropertyValue($name, $default = ''): mixed
public function getStaticPropertyValue($name, $default = '')
{ {
throw new ReflectionException('Method not implemented'); throw new ReflectionException('Method not implemented');
} }
...@@ -273,8 +251,7 @@ public function getStaticPropertyValue($name, $default = '') ...@@ -273,8 +251,7 @@ public function getStaticPropertyValue($name, $default = '')
/** /**
* {@inheritDoc} * {@inheritDoc}
*/ */
#[\ReturnTypeWillChange] public function getTraitAliases(): array
public function getTraitAliases()
{ {
throw new ReflectionException('Method not implemented'); throw new ReflectionException('Method not implemented');
} }
...@@ -282,8 +259,7 @@ public function getTraitAliases() ...@@ -282,8 +259,7 @@ public function getTraitAliases()
/** /**
* {@inheritDoc} * {@inheritDoc}
*/ */
#[\ReturnTypeWillChange] public function getTraitNames(): array
public function getTraitNames()
{ {
throw new ReflectionException('Method not implemented'); throw new ReflectionException('Method not implemented');
} }
...@@ -291,8 +267,7 @@ public function getTraitNames() ...@@ -291,8 +267,7 @@ public function getTraitNames()
/** /**
* {@inheritDoc} * {@inheritDoc}
*/ */
#[\ReturnTypeWillChange] public function getTraits(): array
public function getTraits()
{ {
throw new ReflectionException('Method not implemented'); throw new ReflectionException('Method not implemented');
} }
...@@ -300,8 +275,7 @@ public function getTraits() ...@@ -300,8 +275,7 @@ public function getTraits()
/** /**
* {@inheritDoc} * {@inheritDoc}
*/ */
#[\ReturnTypeWillChange] public function hasConstant($name): bool
public function hasConstant($name)
{ {
throw new ReflectionException('Method not implemented'); throw new ReflectionException('Method not implemented');
} }
...@@ -309,8 +283,7 @@ public function hasConstant($name) ...@@ -309,8 +283,7 @@ public function hasConstant($name)
/** /**
* {@inheritDoc} * {@inheritDoc}
*/ */
#[\ReturnTypeWillChange] public function hasMethod($name): bool
public function hasMethod($name)
{ {
throw new ReflectionException('Method not implemented'); throw new ReflectionException('Method not implemented');
} }
...@@ -318,8 +291,7 @@ public function hasMethod($name) ...@@ -318,8 +291,7 @@ public function hasMethod($name)
/** /**
* {@inheritDoc} * {@inheritDoc}
*/ */
#[\ReturnTypeWillChange] public function hasProperty($name): bool
public function hasProperty($name)
{ {
throw new ReflectionException('Method not implemented'); throw new ReflectionException('Method not implemented');
} }
...@@ -327,8 +299,7 @@ public function hasProperty($name) ...@@ -327,8 +299,7 @@ public function hasProperty($name)
/** /**
* {@inheritDoc} * {@inheritDoc}
*/ */
#[\ReturnTypeWillChange] public function implementsInterface($interface): bool
public function implementsInterface($interface)
{ {
throw new ReflectionException('Method not implemented'); throw new ReflectionException('Method not implemented');
} }
...@@ -336,8 +307,7 @@ public function implementsInterface($interface) ...@@ -336,8 +307,7 @@ public function implementsInterface($interface)
/** /**
* {@inheritDoc} * {@inheritDoc}
*/ */
#[\ReturnTypeWillChange] public function inNamespace(): bool
public function inNamespace()
{ {
throw new ReflectionException('Method not implemented'); throw new ReflectionException('Method not implemented');
} }
...@@ -345,8 +315,7 @@ public function inNamespace() ...@@ -345,8 +315,7 @@ public function inNamespace()
/** /**
* {@inheritDoc} * {@inheritDoc}
*/ */
#[\ReturnTypeWillChange] public function isAbstract(): bool
public function isAbstract()
{ {
throw new ReflectionException('Method not implemented'); throw new ReflectionException('Method not implemented');
} }
...@@ -354,8 +323,7 @@ public function isAbstract() ...@@ -354,8 +323,7 @@ public function isAbstract()
/** /**
* {@inheritDoc} * {@inheritDoc}
*/ */
#[\ReturnTypeWillChange] public function isCloneable(): bool
public function isCloneable()
{ {
throw new ReflectionException('Method not implemented'); throw new ReflectionException('Method not implemented');
} }
...@@ -363,8 +331,7 @@ public function isCloneable() ...@@ -363,8 +331,7 @@ public function isCloneable()
/** /**
* {@inheritDoc} * {@inheritDoc}
*/ */
#[\ReturnTypeWillChange] public function isFinal(): bool
public function isFinal()
{ {
throw new ReflectionException('Method not implemented'); throw new ReflectionException('Method not implemented');
} }
...@@ -372,8 +339,7 @@ public function isFinal() ...@@ -372,8 +339,7 @@ public function isFinal()
/** /**
* {@inheritDoc} * {@inheritDoc}
*/ */
#[\ReturnTypeWillChange] public function isInstance($object): bool
public function isInstance($object)
{ {
throw new ReflectionException('Method not implemented'); throw new ReflectionException('Method not implemented');
} }
...@@ -381,8 +347,7 @@ public function isInstance($object) ...@@ -381,8 +347,7 @@ public function isInstance($object)
/** /**
* {@inheritDoc} * {@inheritDoc}
*/ */
#[\ReturnTypeWillChange] public function isInstantiable(): bool
public function isInstantiable()
{ {
throw new ReflectionException('Method not implemented'); throw new ReflectionException('Method not implemented');
} }
...@@ -390,8 +355,7 @@ public function isInstantiable() ...@@ -390,8 +355,7 @@ public function isInstantiable()
/** /**
* {@inheritDoc} * {@inheritDoc}
*/ */
#[\ReturnTypeWillChange] public function isInterface(): bool
public function isInterface()
{ {
throw new ReflectionException('Method not implemented'); throw new ReflectionException('Method not implemented');
} }
...@@ -399,8 +363,7 @@ public function isInterface() ...@@ -399,8 +363,7 @@ public function isInterface()
/** /**
* {@inheritDoc} * {@inheritDoc}
*/ */
#[\ReturnTypeWillChange] public function isInternal(): bool
public function isInternal()
{ {
throw new ReflectionException('Method not implemented'); throw new ReflectionException('Method not implemented');
} }
...@@ -408,8 +371,7 @@ public function isInternal() ...@@ -408,8 +371,7 @@ public function isInternal()
/** /**
* {@inheritDoc} * {@inheritDoc}
*/ */
#[\ReturnTypeWillChange] public function isIterateable(): bool
public function isIterateable()
{ {
throw new ReflectionException('Method not implemented'); throw new ReflectionException('Method not implemented');
} }
...@@ -417,8 +379,7 @@ public function isIterateable() ...@@ -417,8 +379,7 @@ public function isIterateable()
/** /**
* {@inheritDoc} * {@inheritDoc}
*/ */
#[\ReturnTypeWillChange] public function isSubclassOf($class): bool
public function isSubclassOf($class)
{ {
throw new ReflectionException('Method not implemented'); throw new ReflectionException('Method not implemented');
} }
...@@ -426,8 +387,7 @@ public function isSubclassOf($class) ...@@ -426,8 +387,7 @@ public function isSubclassOf($class)
/** /**
* {@inheritDoc} * {@inheritDoc}
*/ */
#[\ReturnTypeWillChange] public function isTrait(): bool
public function isTrait()
{ {
throw new ReflectionException('Method not implemented'); throw new ReflectionException('Method not implemented');
} }
...@@ -435,8 +395,7 @@ public function isTrait() ...@@ -435,8 +395,7 @@ public function isTrait()
/** /**
* {@inheritDoc} * {@inheritDoc}
*/ */
#[\ReturnTypeWillChange] public function isUserDefined(): bool
public function isUserDefined()
{ {
throw new ReflectionException('Method not implemented'); throw new ReflectionException('Method not implemented');
} }
...@@ -444,8 +403,7 @@ public function isUserDefined() ...@@ -444,8 +403,7 @@ public function isUserDefined()
/** /**
* {@inheritDoc} * {@inheritDoc}
*/ */
#[\ReturnTypeWillChange] public function newInstanceArgs(array $args = []): ?object
public function newInstanceArgs(array $args = [])
{ {
throw new ReflectionException('Method not implemented'); throw new ReflectionException('Method not implemented');
} }
...@@ -453,8 +411,7 @@ public function newInstanceArgs(array $args = []) ...@@ -453,8 +411,7 @@ public function newInstanceArgs(array $args = [])
/** /**
* {@inheritDoc} * {@inheritDoc}
*/ */
#[\ReturnTypeWillChange] public function newInstanceWithoutConstructor(): object
public function newInstanceWithoutConstructor()
{ {
throw new ReflectionException('Method not implemented'); throw new ReflectionException('Method not implemented');
} }
...@@ -462,8 +419,7 @@ public function newInstanceWithoutConstructor() ...@@ -462,8 +419,7 @@ public function newInstanceWithoutConstructor()
/** /**
* {@inheritDoc} * {@inheritDoc}
*/ */
#[\ReturnTypeWillChange] public function setStaticPropertyValue($name, $value): void
public function setStaticPropertyValue($name, $value)
{ {
throw new ReflectionException('Method not implemented'); throw new ReflectionException('Method not implemented');
} }
...@@ -471,8 +427,7 @@ public function setStaticPropertyValue($name, $value) ...@@ -471,8 +427,7 @@ public function setStaticPropertyValue($name, $value)
/** /**
* {@inheritDoc} * {@inheritDoc}
*/ */
#[\ReturnTypeWillChange] public function getConstants(?int $filter = null): array
public function getConstants(?int $filter = null)
{ {
throw new ReflectionException('Method not implemented'); throw new ReflectionException('Method not implemented');
} }
...@@ -480,8 +435,7 @@ public function getConstants(?int $filter = null) ...@@ -480,8 +435,7 @@ public function getConstants(?int $filter = null)
/** /**
* {@inheritDoc} * {@inheritDoc}
*/ */
#[\ReturnTypeWillChange] public function newInstance(mixed ...$args): object
public function newInstance(mixed ...$args)
{ {
throw new ReflectionException('Method not implemented'); throw new ReflectionException('Method not implemented');
} }
......
...@@ -23,8 +23,7 @@ public function __construct($path, $regex) { ...@@ -23,8 +23,7 @@ public function __construct($path, $regex) {
/** /**
* Implements \RegexIterator::accept(). * Implements \RegexIterator::accept().
*/ */
#[\ReturnTypeWillChange] public function accept(): bool {
public function accept() {
/** @var \SplFileInfo $file_info */ /** @var \SplFileInfo $file_info */
$file_info = $this->getInnerIterator()->current(); $file_info = $this->getInnerIterator()->current();
return $file_info->isFile() && preg_match($this->getRegex(), $file_info->getFilename()); return $file_info->isFile() && preg_match($this->getRegex(), $file_info->getFilename());
......
...@@ -142,8 +142,7 @@ public function removeInstanceId($instance_id) { ...@@ -142,8 +142,7 @@ public function removeInstanceId($instance_id) {
$this->remove($instance_id); $this->remove($instance_id);
} }
#[\ReturnTypeWillChange] public function getIterator(): \ArrayIterator {
public function getIterator() {
$instances = []; $instances = [];
foreach ($this->getInstanceIds() as $instance_id) { foreach ($this->getInstanceIds() as $instance_id) {
$instances[$instance_id] = $this->get($instance_id); $instances[$instance_id] = $this->get($instance_id);
...@@ -154,8 +153,7 @@ public function getIterator() { ...@@ -154,8 +153,7 @@ public function getIterator() {
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
#[\ReturnTypeWillChange] public function count(): int {
public function count() {
return count($this->instanceIds); return count($this->instanceIds);
} }
......
...@@ -41,16 +41,14 @@ public function __toString() { ...@@ -41,16 +41,14 @@ public function __toString() {
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
#[\ReturnTypeWillChange] public function count(): int {
public function count() {
return mb_strlen($this->string); return mb_strlen($this->string);
} }
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
#[\ReturnTypeWillChange] public function jsonSerialize(): string {
public function jsonSerialize() {
return $this->__toString(); return $this->__toString();
} }
......
...@@ -114,8 +114,7 @@ public function onChange($name) { ...@@ -114,8 +114,7 @@ public function onChange($name) {
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
#[\ReturnTypeWillChange] public function getIterator(): \ArrayIterator {
public function getIterator() {
return new \ArrayIterator($this->getElements()); return new \ArrayIterator($this->getElements());
} }
......
...@@ -90,8 +90,7 @@ public function __construct($conjunction) { ...@@ -90,8 +90,7 @@ public function __construct($conjunction) {
* size of its conditional array minus one, because one element is the * size of its conditional array minus one, because one element is the
* conjunction. * conjunction.
*/ */
#[\ReturnTypeWillChange] public function count(): int {
public function count() {
return count($this->conditions) - 1; return count($this->conditions) - 1;
} }
......
...@@ -179,8 +179,7 @@ protected function getInsertPlaceholderFragment(array $nested_insert_values, arr ...@@ -179,8 +179,7 @@ protected function getInsertPlaceholderFragment(array $nested_insert_values, arr
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
#[\ReturnTypeWillChange] public function count(): int {
public function count() {
return count($this->insertValues); return count($this->insertValues);
} }
......
...@@ -687,8 +687,7 @@ public function getTranslatableFields($include_computed = TRUE) { ...@@ -687,8 +687,7 @@ public function getTranslatableFields($include_computed = TRUE) {
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
#[\ReturnTypeWillChange] public function getIterator(): \ArrayIterator {
public function getIterator() {
return new \ArrayIterator($this->getFields()); return new \ArrayIterator($this->getFields());
} }
......
...@@ -69,8 +69,7 @@ public function onChange($property_name) { ...@@ -69,8 +69,7 @@ public function onChange($property_name) {
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
#[\ReturnTypeWillChange] public function getIterator(): \ArrayIterator {
public function getIterator() {
if (isset($this->entity)) { if (isset($this->entity)) {
return $this->getConfigTypedData()->getIterator(); return $this->getConfigTypedData()->getIterator();
} }
......
...@@ -162,8 +162,7 @@ public function applyDefaultValue($notify = TRUE) { ...@@ -162,8 +162,7 @@ public function applyDefaultValue($notify = TRUE) {
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
#[\ReturnTypeWillChange] public function getIterator(): \ArrayIterator {
public function getIterator() {
return $this->entity instanceof \IteratorAggregate ? $this->entity->getIterator() : new \ArrayIterator([]); return $this->entity instanceof \IteratorAggregate ? $this->entity->getIterator() : new \ArrayIterator([]);
} }
......
...@@ -58,16 +58,14 @@ public function __toString() { ...@@ -58,16 +58,14 @@ public function __toString() {
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
#[\ReturnTypeWillChange] public function jsonSerialize(): string {
public function jsonSerialize() {
return $this->__toString(); return $this->__toString();
} }
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
#[\ReturnTypeWillChange] public function count(): int {
public function count() {
return mb_strlen($this->__toString()); return mb_strlen($this->__toString());
} }
......
...@@ -43,40 +43,35 @@ public function __construct(\SessionHandlerInterface $wrapped_session_handler, $ ...@@ -43,40 +43,35 @@ public function __construct(\SessionHandlerInterface $wrapped_session_handler, $
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
#[\ReturnTypeWillChange] public function close(): bool {
public function close() {
return $this->wrappedSessionHandler->close(); return $this->wrappedSessionHandler->close();
} }
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
#[\ReturnTypeWillChange] public function destroy($session_id): bool {
public function destroy($session_id) {
return $this->wrappedSessionHandler->destroy($session_id); return $this->wrappedSessionHandler->destroy($session_id);
} }
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
#[\ReturnTypeWillChange] public function gc($max_lifetime): int|FALSE {
public function gc($max_lifetime) {
return $this->wrappedSessionHandler->gc($max_lifetime); return $this->wrappedSessionHandler->gc($max_lifetime);
} }
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
#[\ReturnTypeWillChange] public function open($save_path, $session_id): bool {
public function open($save_path, $session_id) {
return $this->wrappedSessionHandler->open($save_path, $session_id); return $this->wrappedSessionHandler->open($save_path, $session_id);
} }
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
#[\ReturnTypeWillChange] public function read($session_id): string|FALSE {
public function read($session_id) {
$value = $this->wrappedSessionHandler->read($session_id); $value = $this->wrappedSessionHandler->read($session_id);
$this->readSessions[$session_id] = $value; $this->readSessions[$session_id] = $value;
return $value; return $value;
...@@ -85,8 +80,7 @@ public function read($session_id) { ...@@ -85,8 +80,7 @@ public function read($session_id) {
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
#[\ReturnTypeWillChange] public function write($session_id, $session_data): bool {
public function write($session_id, $session_data) {
// Only write the session when it has been modified. // Only write the session when it has been modified.
if (isset($this->readSessions[$session_id]) && $this->readSessions[$session_id] === $session_data) { if (isset($this->readSessions[$session_id]) && $this->readSessions[$session_id] === $session_data) {
return TRUE; return TRUE;
......
...@@ -90,18 +90,17 @@ public function __construct($attributes = []) { ...@@ -90,18 +90,17 @@ public function __construct($attributes = []) {
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
#[\ReturnTypeWillChange] public function offsetGet($name): mixed {
public function offsetGet($name) {
if (isset($this->storage[$name])) { if (isset($this->storage[$name])) {
return $this->storage[$name]; return $this->storage[$name];
} }
return NULL;
} }
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
#[\ReturnTypeWillChange] public function offsetSet($name, $value): void {
public function offsetSet($name, $value) {
$this->storage[$name] = $this->createAttributeValue($name, $value); $this->storage[$name] = $this->createAttributeValue($name, $value);
} }
...@@ -154,16 +153,14 @@ protected function createAttributeValue($name, $value) { ...@@ -154,16 +153,14 @@ protected function createAttributeValue($name, $value) {
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
#[\ReturnTypeWillChange] public function offsetUnset($name): void {
public function offsetUnset($name) {
unset($this->storage[$name]); unset($this->storage[$name]);
} }
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
#[\ReturnTypeWillChange] public function offsetExists($name): bool {
public function offsetExists($name) {
return isset($this->storage[$name]); return isset($this->storage[$name]);
} }
...@@ -358,8 +355,7 @@ public function __clone() { ...@@ -358,8 +355,7 @@ public function __clone() {
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
#[\ReturnTypeWillChange] public function getIterator(): \ArrayIterator {
public function getIterator() {
return new \ArrayIterator($this->storage); return new \ArrayIterator($this->storage);
} }
...@@ -376,8 +372,7 @@ public function storage() { ...@@ -376,8 +372,7 @@ public function storage() {
* @return string * @return string
* The safe string content. * The safe string content.
*/ */
#[\ReturnTypeWillChange] public function jsonSerialize(): string {
public function jsonSerialize() {
return (string) $this; return (string) $this;
} }
......
...@@ -35,16 +35,14 @@ class AttributeArray extends AttributeValueBase implements \ArrayAccess, \Iterat ...@@ -35,16 +35,14 @@ class AttributeArray extends AttributeValueBase implements \ArrayAccess, \Iterat
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
#[\ReturnTypeWillChange] public function offsetGet($offset): mixed {
public function offsetGet($offset) {
return $this->value[$offset]; return $this->value[$offset];
} }
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
#[\ReturnTypeWillChange] public function offsetSet($offset, $value): void {
public function offsetSet($offset, $value) {
if (isset($offset)) { if (isset($offset)) {
$this->value[$offset] = $value; $this->value[$offset] = $value;
} }
...@@ -56,16 +54,14 @@ public function offsetSet($offset, $value) { ...@@ -56,16 +54,14 @@ public function offsetSet($offset, $value) {
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
#[\ReturnTypeWillChange] public function offsetUnset($offset): void {
public function offsetUnset($offset) {
unset($this->value[$offset]); unset($this->value[$offset]);
} }
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
#[\ReturnTypeWillChange] public function offsetExists($offset): bool {
public function offsetExists($offset) {
return isset($this->value[$offset]); return isset($this->value[$offset]);
} }
...@@ -81,8 +77,7 @@ public function __toString() { ...@@ -81,8 +77,7 @@ public function __toString() {
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
#[\ReturnTypeWillChange] public function getIterator(): \ArrayIterator {
public function getIterator() {
return new \ArrayIterator($this->value); return new \ArrayIterator($this->value);
} }
......
...@@ -118,8 +118,7 @@ public function isEmpty() { ...@@ -118,8 +118,7 @@ public function isEmpty() {
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
#[\ReturnTypeWillChange] public function offsetExists($offset): bool {
public function offsetExists($offset) {
$this->ensureComputedValue(); $this->ensureComputedValue();
return parent::offsetExists($offset); return parent::offsetExists($offset);
} }
...@@ -127,8 +126,7 @@ public function offsetExists($offset) { ...@@ -127,8 +126,7 @@ public function offsetExists($offset) {
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
#[\ReturnTypeWillChange] public function getIterator(): \ArrayIterator {
public function getIterator() {
$this->ensureComputedValue(); $this->ensureComputedValue();
return parent::getIterator(); return parent::getIterator();
} }
...@@ -136,8 +134,7 @@ public function getIterator() { ...@@ -136,8 +134,7 @@ public function getIterator() {
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
#[\ReturnTypeWillChange] public function count(): int {
public function count() {
$this->ensureComputedValue(); $this->ensureComputedValue();
return parent::count(); return parent::count();
} }
......
...@@ -314,8 +314,7 @@ public function addConstraint($constraint_name, $options = NULL) { ...@@ -314,8 +314,7 @@ public function addConstraint($constraint_name, $options = NULL) {
* This is for BC support only. * This is for BC support only.
* @todo: Remove in https://www.drupal.org/node/1928868. * @todo: Remove in https://www.drupal.org/node/1928868.
*/ */
#[\ReturnTypeWillChange] public function offsetExists($offset): bool {
public function offsetExists($offset) {
// PHP's array access does not work correctly with isset(), so we have to // PHP's array access does not work correctly with isset(), so we have to
// bake isset() in here. See https://bugs.php.net/bug.php?id=41727. // bake isset() in here. See https://bugs.php.net/bug.php?id=41727.
return array_key_exists($offset, $this->definition) && isset($this->definition[$offset]); return array_key_exists($offset, $this->definition) && isset($this->definition[$offset]);
...@@ -327,8 +326,7 @@ public function offsetExists($offset) { ...@@ -327,8 +326,7 @@ public function offsetExists($offset) {
* This is for BC support only. * This is for BC support only.
* @todo: Remove in https://www.drupal.org/node/1928868. * @todo: Remove in https://www.drupal.org/node/1928868.
*/ */
#[\ReturnTypeWillChange] public function &offsetGet($offset): mixed {
public function &offsetGet($offset) {
if (!isset($this->definition[$offset])) { if (!isset($this->definition[$offset])) {
$this->definition[$offset] = NULL; $this->definition[$offset] = NULL;
} }
...@@ -341,8 +339,7 @@ public function &offsetGet($offset) { ...@@ -341,8 +339,7 @@ public function &offsetGet($offset) {
* This is for BC support only. * This is for BC support only.
* @todo: Remove in https://www.drupal.org/node/1928868. * @todo: Remove in https://www.drupal.org/node/1928868.
*/ */
#[\ReturnTypeWillChange] public function offsetSet($offset, $value): void {
public function offsetSet($offset, $value) {
$this->definition[$offset] = $value; $this->definition[$offset] = $value;
} }
...@@ -352,8 +349,7 @@ public function offsetSet($offset, $value) { ...@@ -352,8 +349,7 @@ public function offsetSet($offset, $value) {
* This is for BC support only. * This is for BC support only.
* @todo: Remove in https://www.drupal.org/node/1928868. * @todo: Remove in https://www.drupal.org/node/1928868.
*/ */
#[\ReturnTypeWillChange] public function offsetUnset($offset): void {
public function offsetUnset($offset) {
unset($this->definition[$offset]); unset($this->definition[$offset]);
} }
......
...@@ -170,8 +170,7 @@ public function first() { ...@@ -170,8 +170,7 @@ public function first() {
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
#[\ReturnTypeWillChange] public function offsetExists($offset): bool {
public function offsetExists($offset) {
// We do not want to throw exceptions here, so we do not use get(). // We do not want to throw exceptions here, so we do not use get().
return isset($this->list[$offset]); return isset($this->list[$offset]);
} }
...@@ -179,24 +178,21 @@ public function offsetExists($offset) { ...@@ -179,24 +178,21 @@ public function offsetExists($offset) {
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
#[\ReturnTypeWillChange] public function offsetUnset($offset): void {
public function offsetUnset($offset) {
$this->removeItem($offset); $this->removeItem($offset);
} }
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
#[\ReturnTypeWillChange] public function offsetGet($offset): mixed {
public function offsetGet($offset) {
return $this->get($offset); return $this->get($offset);
} }
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
#[\ReturnTypeWillChange] public function offsetSet($offset, $value): void {
public function offsetSet($offset, $value) {
if (!isset($offset)) { if (!isset($offset)) {
// The [] operator has been used. // The [] operator has been used.
$this->appendItem($value); $this->appendItem($value);
...@@ -235,16 +231,14 @@ public function getItemDefinition() { ...@@ -235,16 +231,14 @@ public function getItemDefinition() {
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
#[\ReturnTypeWillChange] public function getIterator(): \ArrayIterator {
public function getIterator() {
return new \ArrayIterator($this->list); return new \ArrayIterator($this->list);
} }
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
#[\ReturnTypeWillChange] public function count(): int {
public function count() {
return count($this->list); return count($this->list);
} }
......
...@@ -183,8 +183,7 @@ public function toArray() { ...@@ -183,8 +183,7 @@ public function toArray() {
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
#[\ReturnTypeWillChange] public function getIterator(): \ArrayIterator {
public function getIterator() {
return new \ArrayIterator($this->getProperties()); return new \ArrayIterator($this->getProperties());
} }
......
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