Add after save callback#86
Conversation
|
Tests needed for the new feature. |
|
Where can I find the .sqlite file ? |
|
What sqlite file? If you are referring to the test suite it uses an in memory sqlite db by default, no file. |
|
Thank you for the information. |
|
@it-mob |
|
@saeideng |
|
I added the tests but I don't understand the error of PHPSTAN during the CI tests |
|
probably something that fixed in phpstan and now should not be this error in ignore list |
|
Thank you for the answer. I pushed my changes |
|
Hello, |
|
Sorry for the delay, I'll review the changes soon. |
| $event = $this->dispatchEvent('Model.afterSave', compact('resource', 'options')); | ||
|
|
||
| if ($event->isStopped()) { | ||
| return $event->result; |
There was a problem hiding this comment.
Please change this to $event->getResult().
|
Thank you for the answer. |
|
Hello, I just made a new commit with before & after delete callbacks but I have errors with Travis. Thank you. |
|
Hello, |
|
Sorry, I had forgotten about this. NVM the phpcs issue. I can take care of it. But I am now leaning towards targeting this enhancement to the |
When an API returns a different result than the submitted data, we use "AfterSave" callback to catch this result