Skip to content

Commit bbb64a8

Browse files
authored
Merge pull request #2015 from ldaspt/fix-php-8.2-deprecation-parent-in-callable
Fix php8.2 deprecation - Use of "parent" in callables is deprecated
2 parents b35918b + 0ad882e commit bbb64a8

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

templates/Builder/Om/baseObjectMethodHook.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
public function preSave(?ConnectionInterface $con = null): bool
99
{
1010
<?php if ($hasBaseClass) : ?>
11-
if (is_callable('parent::preSave')) {
11+
if (is_callable([parent::class, 'preSave'])) {
1212
return parent::preSave($con);
1313
}
1414
<?php endif?>
@@ -25,7 +25,7 @@ public function preSave(?ConnectionInterface $con = null): bool
2525
public function postSave(?ConnectionInterface $con = null): void
2626
{
2727
<?php if ($hasBaseClass) : ?>
28-
if (is_callable('parent::postSave')) {
28+
if (is_callable([parent::class, 'postSave'])) {
2929
parent::postSave($con);
3030
}
3131
<?php endif?>
@@ -41,7 +41,7 @@ public function postSave(?ConnectionInterface $con = null): void
4141
public function preInsert(?ConnectionInterface $con = null): bool
4242
{
4343
<?php if ($hasBaseClass) : ?>
44-
if (is_callable('parent::preInsert')) {
44+
if (is_callable([parent::class, 'preInsert'])) {
4545
return parent::preInsert($con);
4646
}
4747
<?php endif?>
@@ -58,7 +58,7 @@ public function preInsert(?ConnectionInterface $con = null): bool
5858
public function postInsert(?ConnectionInterface $con = null): void
5959
{
6060
<?php if ($hasBaseClass) : ?>
61-
if (is_callable('parent::postInsert')) {
61+
if (is_callable([parent::class, 'postInsert'])) {
6262
parent::postInsert($con);
6363
}
6464
<?php endif?>
@@ -74,7 +74,7 @@ public function postInsert(?ConnectionInterface $con = null): void
7474
public function preUpdate(?ConnectionInterface $con = null): bool
7575
{
7676
<?php if ($hasBaseClass) : ?>
77-
if (is_callable('parent::preUpdate')) {
77+
if (is_callable([parent::class, 'preUpdate'])) {
7878
return parent::preUpdate($con);
7979
}
8080
<?php endif?>
@@ -91,7 +91,7 @@ public function preUpdate(?ConnectionInterface $con = null): bool
9191
public function postUpdate(?ConnectionInterface $con = null): void
9292
{
9393
<?php if ($hasBaseClass) : ?>
94-
if (is_callable('parent::postUpdate')) {
94+
if (is_callable([parent::class, 'postUpdate'])) {
9595
parent::postUpdate($con);
9696
}
9797
<?php endif?>
@@ -107,7 +107,7 @@ public function postUpdate(?ConnectionInterface $con = null): void
107107
public function preDelete(?ConnectionInterface $con = null): bool
108108
{
109109
<?php if ($hasBaseClass) : ?>
110-
if (is_callable('parent::preDelete')) {
110+
if (is_callable([parent::class, 'preDelete'])) {
111111
return parent::preDelete($con);
112112
}
113113
<?php endif?>
@@ -124,7 +124,7 @@ public function preDelete(?ConnectionInterface $con = null): bool
124124
public function postDelete(?ConnectionInterface $con = null): void
125125
{
126126
<?php if ($hasBaseClass) : ?>
127-
if (is_callable('parent::postDelete')) {
127+
if (is_callable([parent::class, 'postDelete'])) {
128128
parent::postDelete($con);
129129
}
130130
<?php endif?>

0 commit comments

Comments
 (0)