Skip to content

Commit

Permalink
Merge pull request #2015 from ldaspt/fix-php-8.2-deprecation-parent-i…
Browse files Browse the repository at this point in the history
…n-callable

Fix php8.2 deprecation - Use of "parent" in callables is deprecated
  • Loading branch information
gechetspr authored Dec 10, 2024
2 parents b35918b + 0ad882e commit bbb64a8
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions templates/Builder/Om/baseObjectMethodHook.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
public function preSave(?ConnectionInterface $con = null): bool
{
<?php if ($hasBaseClass) : ?>
if (is_callable('parent::preSave')) {
if (is_callable([parent::class, 'preSave'])) {
return parent::preSave($con);
}
<?php endif?>
Expand All @@ -25,7 +25,7 @@ public function preSave(?ConnectionInterface $con = null): bool
public function postSave(?ConnectionInterface $con = null): void
{
<?php if ($hasBaseClass) : ?>
if (is_callable('parent::postSave')) {
if (is_callable([parent::class, 'postSave'])) {
parent::postSave($con);
}
<?php endif?>
Expand All @@ -41,7 +41,7 @@ public function postSave(?ConnectionInterface $con = null): void
public function preInsert(?ConnectionInterface $con = null): bool
{
<?php if ($hasBaseClass) : ?>
if (is_callable('parent::preInsert')) {
if (is_callable([parent::class, 'preInsert'])) {
return parent::preInsert($con);
}
<?php endif?>
Expand All @@ -58,7 +58,7 @@ public function preInsert(?ConnectionInterface $con = null): bool
public function postInsert(?ConnectionInterface $con = null): void
{
<?php if ($hasBaseClass) : ?>
if (is_callable('parent::postInsert')) {
if (is_callable([parent::class, 'postInsert'])) {
parent::postInsert($con);
}
<?php endif?>
Expand All @@ -74,7 +74,7 @@ public function postInsert(?ConnectionInterface $con = null): void
public function preUpdate(?ConnectionInterface $con = null): bool
{
<?php if ($hasBaseClass) : ?>
if (is_callable('parent::preUpdate')) {
if (is_callable([parent::class, 'preUpdate'])) {
return parent::preUpdate($con);
}
<?php endif?>
Expand All @@ -91,7 +91,7 @@ public function preUpdate(?ConnectionInterface $con = null): bool
public function postUpdate(?ConnectionInterface $con = null): void
{
<?php if ($hasBaseClass) : ?>
if (is_callable('parent::postUpdate')) {
if (is_callable([parent::class, 'postUpdate'])) {
parent::postUpdate($con);
}
<?php endif?>
Expand All @@ -107,7 +107,7 @@ public function postUpdate(?ConnectionInterface $con = null): void
public function preDelete(?ConnectionInterface $con = null): bool
{
<?php if ($hasBaseClass) : ?>
if (is_callable('parent::preDelete')) {
if (is_callable([parent::class, 'preDelete'])) {
return parent::preDelete($con);
}
<?php endif?>
Expand All @@ -124,7 +124,7 @@ public function preDelete(?ConnectionInterface $con = null): bool
public function postDelete(?ConnectionInterface $con = null): void
{
<?php if ($hasBaseClass) : ?>
if (is_callable('parent::postDelete')) {
if (is_callable([parent::class, 'postDelete'])) {
parent::postDelete($con);
}
<?php endif?>
Expand Down

0 comments on commit bbb64a8

Please sign in to comment.