Iterable was not considered a subtype of array|object, and thus
also not a subtype of mixed.
. Fixed bug #80345 (PHPIZE configuration has outdated PHP_RELEASE_VERSION).
(cmb)
. Fixed bug #72964 (White space not unfolded for CC/Bcc headers). (cmb)
+ . Fixed bug #80391 (Iterable not covariant to mixed). (Nikita)
- Tidy:
. Fixed bug #77594 (ob_tidyhandler is never reset). (cmb)
--- /dev/null
+--TEST--
+Iterable not covariant to mixed
+--FILE--
+<?php
+
+class A {
+ public function method1(): mixed {}
+ public function method2(): array|object {}
+ public function method3(iterable $x) {}
+ public function method4(iterable $x) {}
+}
+
+class B extends A {
+ public function method1(): iterable {}
+ public function method2(): iterable {}
+ public function method3(mixed $x) {}
+ public function method4(array|object $x) {}
+}
+
+?>
+===DONE===
+--EXPECT--
+===DONE===
static zend_bool zend_type_contains_traversable(zend_type type) {
zend_type *single_type;
+ if (ZEND_TYPE_FULL_MASK(type) & MAY_BE_OBJECT) {
+ return 1;
+ }
+
ZEND_TYPE_FOREACH(type, single_type) {
if (ZEND_TYPE_HAS_NAME(*single_type)
&& zend_string_equals_literal_ci(ZEND_TYPE_NAME(*single_type), "Traversable")) {