- Some more fixes for PHP8.5+

This commit is contained in:
Dave Mc Nicoll committed 2026-10-23 14:48:29 +00:00
1 parent 9507a1e596
commit 9855a00451
3 files changed
+5 -5

No files matched your search

+1 -1
View File
@@ -79,7 +79,7 @@ class MySQL implements AdapterInterface, MigrateInterface, SqlAdapterInterface {
$pdo->setAttribute(\PDO::ATTR_EMULATE_PREPARES, false); $pdo->setAttribute(\PDO::ATTR_EMULATE_PREPARES, false);
$pdo->setAttribute(\PDO::ATTR_AUTOCOMMIT, false); $pdo->setAttribute(\PDO::ATTR_AUTOCOMMIT, false);
$pdo->setAttribute(\PDO::ATTR_DEFAULT_FETCH_MODE, \PDO::FETCH_ASSOC); $pdo->setAttribute(\PDO::ATTR_DEFAULT_FETCH_MODE, \PDO::FETCH_ASSOC);
$pdo->setAttribute(\PDO::MYSQL_ATTR_USE_BUFFERED_QUERY, false); $pdo->setAttribute(\Pdo\Mysql::ATTR_USE_BUFFERED_QUERY, false);
} }
catch(\PDOException $ex){ catch(\PDOException $ex){
throw $ex; throw $ex;
+1 -1
View File
@@ -322,7 +322,7 @@ class EntityCollection extends \ArrayObject implements \JsonSerializable {
case is_string($value): case is_string($value):
$value = (string) $value; $value = (string) $value;
$list[$key] = $item->$value; $list[(string) $key] = $item->$value;
break; break;
} }
} }
+3 -3
View File
@@ -30,7 +30,7 @@ trait JoinBuilderTrait
$fields = (array) $fields; $fields = (array) $fields;
usort($fields, fn($e1, $e2) => str_contains($e1, '.') <=> str_contains($e2, '.')); usort($fields, fn($e1, $e2) => str_contains((string) $e1, '.') <=> str_contains((string) $e2, '.'));
# @TODO Apply fff annotation to this too ! # @TODO Apply fff annotation to this too !
foreach(array_filter($fields, fn($e) => $e && ! isset($this->joined[$e]) ) as $item) { foreach(array_filter($fields, fn($e) => $e && ! isset($this->joined[$e]) ) as $item) {
@@ -127,7 +127,7 @@ trait JoinBuilderTrait
return $this; return $this;
} }
protected function joinFieldObject(mixed $field, string $entityClass, string $alias = null) : \Stringable protected function joinFieldObject(mixed $field, string $entityClass, ?string $alias = null) : \Stringable
{ {
if ( ! is_object($field) ) { if ( ! is_object($field) ) {
return $entityClass::field($field, $alias); return $entityClass::field($field, $alias);
@@ -138,7 +138,7 @@ trait JoinBuilderTrait
} }
protected function joinFieldValue(mixed $value, string $alias = null) : mixed protected function joinFieldValue(mixed $value, ?string $alias = null) : mixed
{ {
if ( $value instanceof EntityField ) { if ( $value instanceof EntityField ) {
$value = clone $value; $value = clone $value;