Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Introduce and use an ItemMetadataInterface #409

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

Closed
wants to merge 1 commit into from

Conversation

sroze
Copy link
Contributor

@sroze sroze commented Feb 18, 2016

ATM, the class ItemMetadata is final but without any interface. This PR introduce an ItemMetadataInterface.

@sroze sroze force-pushed the v2-item-metadata-interfaces branch from 2b2044d to f4f4b38 Compare February 18, 2016 15:02
@dunglas
Copy link
Member

dunglas commented Feb 18, 2016

Well, it was done on purpose to not introduce an interface here:

Metadata are value objects used only by the API. It's like the Request class in Symfony HttpFoundation. Introducing an interface will lock us like in symfony/symfony#17114 when we will need to introduce new attributes to those classes.

A VO should not have an interface IMO. It should be used as is. If someone need to add extra properties in its app, he sould introduce a its own VO (and he can easily embed our metadata by composition).

@sroze sroze changed the title Introduce an use an ItemMetadataInterface Introduce and use an ItemMetadataInterface Feb 18, 2016
@sroze
Copy link
Contributor Author

sroze commented Feb 18, 2016

Well, that's a fair answer, I don't have the use case ATM anyway 😉

@sroze sroze closed this Feb 18, 2016
@sroze sroze deleted the v2-item-metadata-interfaces branch February 18, 2016 15:46
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

Successfully merging this pull request may close these issues.

2 participants