Skip to content

Commit 6b5cdf0

Browse files
author
Pantea Marius-ciclistu
committed
1 parent 2f9f369 commit 6b5cdf0

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/Models/BaseModel.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -689,7 +689,7 @@ public function save(array $options = []): bool
689689
- updating event can do changes so, $this->getDirtyForUpdate() and $this->syncChanges() will call
690690
$this->getDirty(),
691691
- updated/saved events can do changes so, $this->syncOriginal() will call $this->getAttributes() */
692-
if (!$this->getEventDispatcher()->hasListeners($this::class . '.updating')) {
692+
if (!$this->getEventDispatcher()->hasListeners('eloquent.updating: ' . $this::class)) {
693693
$this->tmpDirtyIfAttributesAreSyncedFromCashedCasts = $dirty;
694694
unset($dirty);
695695
}
@@ -737,7 +737,7 @@ protected function finishSave(array $options): void
737737
{
738738
if (
739739
isset($this->tmpDirtyIfAttributesAreSyncedFromCashedCasts)
740-
&& $this->getEventDispatcher()->hasListeners($this::class . '.saved')
740+
&& $this->getEventDispatcher()->hasListeners('eloquent.saved: ' . $this::class)
741741
) {
742742
$this->tmpDirtyIfAttributesAreSyncedFromCashedCasts = null;
743743
}
@@ -783,7 +783,7 @@ protected function performUpdate(Builder $query): bool
783783

784784
if (
785785
isset($this->tmpDirtyIfAttributesAreSyncedFromCashedCasts)
786-
&& $this->getEventDispatcher()->hasListeners($this::class . '.updated')
786+
&& $this->getEventDispatcher()->hasListeners('eloquent.updated: ' . $this::class)
787787
) {
788788
$this->tmpDirtyIfAttributesAreSyncedFromCashedCasts = null;
789789
}

src/Models/ExcessiveSetOptimizerOnSaveTrait.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ public function save(array $options = []): bool
154154
- updating event can do changes so, $this->getDirtyForUpdate() and $this->syncChanges() will call
155155
$this->getDirty(),
156156
- updated/saved events can do changes so, $this->syncOriginal() will call $this->getAttributes() */
157-
if (!$this->getEventDispatcher()->hasListeners($this::class . '.updating')) {
157+
if (!$this->getEventDispatcher()->hasListeners('eloquent.updating: ' . $this::class)) {
158158
$this->tmpDirtyIfAttributesAreSyncedFromCashedCasts = $dirty;
159159
unset($dirty);
160160
}
@@ -202,7 +202,7 @@ protected function finishSave(array $options): void
202202
{
203203
if (
204204
isset($this->tmpDirtyIfAttributesAreSyncedFromCashedCasts)
205-
&& $this->getEventDispatcher()->hasListeners($this::class . '.saved')
205+
&& $this->getEventDispatcher()->hasListeners('eloquent.saved: ' . $this::class)
206206
) {
207207
$this->tmpDirtyIfAttributesAreSyncedFromCashedCasts = null;
208208
}
@@ -248,7 +248,7 @@ protected function performUpdate(Builder $query): bool
248248

249249
if (
250250
isset($this->tmpDirtyIfAttributesAreSyncedFromCashedCasts)
251-
&& $this->getEventDispatcher()->hasListeners($this::class . '.updated')
251+
&& $this->getEventDispatcher()->hasListeners('eloquent.updated: ' . $this::class)
252252
) {
253253
$this->tmpDirtyIfAttributesAreSyncedFromCashedCasts = null;
254254
}

0 commit comments

Comments
 (0)