Webservice icon indicating copy to clipboard operation
Webservice copied to clipboard

Add after save callback

Open it-mob opened this issue 6 years ago • 15 comments

When an API returns a different result than the submitted data, we use "AfterSave" callback to catch this result

it-mob avatar Oct 14 '19 13:10 it-mob

Tests needed for the new feature.

ADmad avatar Oct 14 '19 14:10 ADmad

Where can I find the .sqlite file ?

it-mob avatar Oct 14 '19 14:10 it-mob

What sqlite file? If you are referring to the test suite it uses an in memory sqlite db by default, no file.

ADmad avatar Oct 14 '19 14:10 ADmad

Thank you for the information. I changed the URL of the sqlite file "webservice_test.sqlite" in the boostrap file with ":memory:" so that the tests start on Windows

it-mob avatar Oct 15 '19 06:10 it-mob

@it-mob Admad meant you have to add testCase like these https://github.com/UseMuffin/Webservice/tree/master/tests/TestCase so that this helps to ensure that this change works well now and in future

saeideng avatar Oct 15 '19 07:10 saeideng

@saeideng Yes sure. I'm working on it.

it-mob avatar Oct 15 '19 07:10 it-mob

I added the tests but I don't understand the error of PHPSTAN during the CI tests

it-mob avatar Oct 15 '19 12:10 it-mob

probably something that fixed in phpstan and now should not be this error in ignore list you can remove this error from /phpstan.neon file

saeideng avatar Oct 15 '19 20:10 saeideng

Thank you for the answer. I pushed my changes

it-mob avatar Oct 18 '19 08:10 it-mob

Hello, Do you expect something else from me so that my PR can be validated ?

it-mob avatar Nov 05 '19 15:11 it-mob

Sorry for the delay, I'll review the changes soon.

ADmad avatar Nov 05 '19 16:11 ADmad

Thank you for the answer. I just realized that the callbacks beforeDelete/afterDelete were missing. I will add them and update my PR soon

it-mob avatar Nov 06 '19 13:11 it-mob

Hello,

I just made a new commit with before & after delete callbacks but I have errors with Travis. I think the problem is the line break format (CRLF & CF) Can you help me solve this problem? (I work on Windows)

Thank you.

it-mob avatar Dec 18 '19 15:12 it-mob

Hello, I wanted to know if you're still expecting something from me about that PR. I tried again to fix the PHPCS problem but without success. Thank you

it-mob avatar May 20 '20 12:05 it-mob

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 cake-4.x branch (which is compatible with CakePHP 4) instead of master.

ADmad avatar May 20 '20 13:05 ADmad