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

Comments

Projects
3 participants
@zsilbi
Copy link

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 niden added this to To do in 4.0 Release via automation Feb 9, 2019

@niden niden added the Bug - High label Feb 9, 2019

@niden

This comment has been minimized.

Copy link
Member

niden commented Feb 9, 2019

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

@scrnjakovic

This comment has been minimized.

Copy link
Contributor

scrnjakovic commented Feb 9, 2019

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

This comment has been minimized.

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 referenced this issue Feb 9, 2019

Merged

Phalcon\Message MetaData #13817

3 of 3 tasks complete

@niden niden moved this from To do to Done in 4.0 Release Feb 10, 2019

@niden

This comment has been minimized.

Copy link
Member

niden commented Feb 10, 2019

Resolved and merged

@niden niden closed this Feb 10, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.