No duplicates 🥲.
What happened?
Affected version: v2.15.0 (and 2.x-dev)
File: src/Select/QueryBuilder.php, line 193-210
The problem:
private function targetFunc(string $call): callable
{
// ...
return [$this->query, $call];
}
The method declares callable as its return type but returns [$this->query,
$call]. On PHP 8.3, this throws a TypeError because PHP's stricter type
enforcement no longer accepts all [$object, $method] arrays as callable
without validation at the return type check.
Stack trace:
TypeError: Cycle\ORM\Select\QueryBuilder::targetFunc(): Return value must be
of type callable, array returned
File: src/Select/QueryBuilder.php:209
...
Triggered by any ->where() call through a Repository's select().
Correct Fix?: Change the return type from callable to array:
private function targetFunc(string $call): array
Version
ORM v2.15.0 & (2.x dev)
PHP v8.3.6
No duplicates 🥲.
What happened?
Affected version: v2.15.0 (and 2.x-dev)
File: src/Select/QueryBuilder.php, line 193-210
The problem:
The method declares callable as its return type but returns [$this->query,
$call]. On PHP 8.3, this throws a TypeError because PHP's stricter type
enforcement no longer accepts all [$object, $method] arrays as callable
without validation at the return type check.
Triggered by any
->where()call through a Repository'sselect().Correct Fix?: Change the return type from callable to array:
private function targetFunc(string $call):
arrayVersion
ORM v2.15.0 & (2.x dev) PHP v8.3.6