Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add hooks in attributes updated Before+After #270

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

qhess34
Copy link

@qhess34 qhess34 commented Jan 28, 2021

No description provided.

@qhess34
Copy link
Author

qhess34 commented Jan 28, 2021

FIXED ! (bad vim configuration)

@infrastation
Copy link
Member

Thank you. So what would happen when the hook function runs fine and returns 0?

@qhess34
Copy link
Author

qhess34 commented Feb 1, 2021

Hello,
I've updated the PR, I've changed the condition with an isset to handle the issue that you told me.

@infrastation
Copy link
Member

Thank you. I have cleaned and rebased this branch.

@infrastation infrastation self-assigned this Feb 1, 2021
@infrastation
Copy link
Member

Please see the change I have just added, this way if someone later needs to extend the code that updates attributes rather than their values, there will be no clash. Whilst looking there, I had realized that this would be the only case of having two hooks in a function (one before and one after), in which case it may be simpler just to call the whole function through callHook(). Let me think about it.

@qhess34
Copy link
Author

qhess34 commented Feb 2, 2021

Yes, you are right, those hooks work only on attribue value update so it's ok for me.

@qhess34
Copy link
Author

qhess34 commented Mar 1, 2021

Hello,
Could you tell me if this change will be merge as is in the next release ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants