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

Different MessageInterfaces in Models and Validation #13114

Closed
grigoriy-ivanov opened this issue Oct 8, 2017 · 2 comments
Closed

Different MessageInterfaces in Models and Validation #13114

grigoriy-ivanov opened this issue Oct 8, 2017 · 2 comments
Assignees
Labels
enhancement Enhancement to the framework
Milestone

Comments

@grigoriy-ivanov
Copy link

Phalcon has two different MessageInterfaces:
Phalcon\Validation\MessageInterface, Phalcon\Mvc\Model\MessageInterface with same code.

I think will be perfect to create Phalcon Messages component Phalcon\Messages:

Phalcon\Messages\MessageInterface for message
Phalcon\Messages\GroupInterface for a collection of Messages with filter/map/etc. methods

@sergeyklay sergeyklay added this to the 4.0.0 milestone Oct 8, 2017
@sergeyklay sergeyklay added the enhancement Enhancement to the framework label Oct 21, 2017
@stale
Copy link

stale bot commented Apr 16, 2018

Thank you for contributing to this issue. As it has been 90 days since the last activity, we are automatically closing the issue. This is often because the request was already solved in some way and it just wasn't updated or it's no longer applicable. If that's not the case, please feel free to either reopen this issue or open a new one. We will be more than happy to look at it again! You can read more here: https://blog.phalconphp.com/post/github-closing-old-issues

@stale stale bot added the stale Stale issue - automatically closed label Apr 16, 2018
@sergeyklay sergeyklay reopened this May 2, 2018
@stale stale bot removed the stale Stale issue - automatically closed label May 2, 2018
@niden niden mentioned this issue Oct 17, 2018
3 tasks
@niden niden self-assigned this Oct 17, 2018
sergeyklay pushed a commit that referenced this issue Oct 19, 2018
* [#13114] - Added messages component and relevant interface

* [#13114] - Added message exception

* [#13114] - Added messages collection (renamed from group)

* [#13114] - Removed message objects from validation

* [#13114] - Removed the group class in favor of the messages one

* [#13114] - Replace of Group with Messages object

* [#13114] - Removed model messageinterface; Refactored model message; Corrected use reference

* [#13114] - Corrected class extend

* [#13114] - Test corrections

* [#13114] - Corrected methods/objects

* [#13114] - More test corrections

* [#13114] - Fixing tests

* [#13114] - Corrected order in adding messages with a model

* [#13114] - Correcting more tests

* [#13114] - Removed the Mvc\Model\Message class - using the Messages\Message

* [#13114] - Updated the changelog

* [#13114] - Added JsonSerializable interface in Message and Messages

* [#13114] - Corrected noobie typo

* [#13114] - More noobie typos

* [#13114] - Changed the variable type

* [#13114] - Forgot the implements :/

* [#13114] - Corrected test

* [#13114] - Changed the var type

* [#13114] - Array initialization that was missing
@niden
Copy link
Member

niden commented Oct 19, 2018

This has been implemented in 4.x

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

No branches or pull requests

3 participants