Skip to content

Commit dbb12d0

Browse files
mentalstringthePanz
authored andcommitted
Drop use of non-canonical cast names
In PHP 8.5, use of non-canonical cast names has been deprecated (boolean) -> (bool) (integer) -> (int) (double) -> (float) (binary) -> (string)
1 parent d867510 commit dbb12d0

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

lib/Doctrine/Query/Abstract.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,7 @@ public function setOption($name, $value)
355355
*/
356356
public function setAutoFree($value = true)
357357
{
358-
$this->_autoFree = (boolean) $value;
358+
$this->_autoFree = (bool) $value;
359359

360360
return $this;
361361
}

lib/Doctrine/Record.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2589,15 +2589,15 @@ public function linkInDb($alias, $ids)
25892589
$localFieldDef = $rel->getAssociationTable()->getColumnDefinition($localFieldName);
25902590

25912591
if ($localFieldDef['type'] == 'integer') {
2592-
$identifier = (integer) $identifier;
2592+
$identifier = (int) $identifier;
25932593
}
25942594

25952595
$foreignFieldName = $rel->getForeignFieldName();
25962596
$foreignFieldDef = $rel->getAssociationTable()->getColumnDefinition($foreignFieldName);
25972597

25982598
if ($foreignFieldDef['type'] == 'integer') {
25992599
foreach ($ids as $i => $id) {
2600-
$ids[$i] = (integer) $id;
2600+
$ids[$i] = (int) $id;
26012601
}
26022602
}
26032603

lib/Doctrine/Table.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2374,7 +2374,7 @@ public function prepareValue($fieldName, $value, $typeHint = null)
23742374
return explode(',', $value);
23752375
break;
23762376
case 'boolean':
2377-
return (boolean) $value;
2377+
return (bool) $value;
23782378
break;
23792379
case 'array':
23802380
case 'object':

lib/Doctrine/Validator/Unsigned.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ public function validate($value)
5050
return false;
5151
}
5252

53-
if ((double) $value >= 0)
53+
if ((float) $value >= 0)
5454
{
5555
return true;
5656
}

0 commit comments

Comments
 (0)