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

Related model messages #13811

Closed
zsilbi opened this issue Feb 9, 2019 · 4 comments
Closed

Related model messages #13811

zsilbi opened this issue Feb 9, 2019 · 4 comments

Comments

@zsilbi
Copy link
Member

zsilbi commented Feb 9, 2019

There is no way to tell the source of the messages at the moment.

Previously Phalcon\Mvc\Model\Message contained information about its origin.
Now both getModel() and setModel() methods are missing from Phalcon\Message. but setModel() is still in use here:

message->setModel(record);

Maybe extending Message with these methods in a new Message/Model class could solve this issue.

Details

  • Phalcon version: v4.0.0-alpha.2
@niden
Copy link
Member

niden commented Feb 9, 2019

Thanks for reporting this. I will get on it shortly.

@scrnjakovic
Copy link
Contributor

That part of the code will throw an error as soon as it is hit. It's a bug.

As for the source part, having another class extending Phalcon\Messages\Message and implementing said method will throw us back to Phalcon\Validation\Message and Phalcon\Mvc\Model\Message situation.

@niden
Copy link
Member

niden commented Feb 9, 2019

Maybe instead of setModel we can use setMetadata so that the particular method can be reused for other situations in the framework

@zsilbi zsilbi mentioned this issue Feb 9, 2019
3 tasks
@niden
Copy link
Member

niden commented Feb 10, 2019

Resolved and merged

@niden niden closed this as completed Feb 10, 2019
@niden niden added the 4.0 label Jun 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants