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 EntityInterface to FileEntity #26

Closed
LKS90 opened this issue Jun 17, 2015 · 4 comments
Closed

Add EntityInterface to FileEntity #26

LKS90 opened this issue Jun 17, 2015 · 4 comments

Comments

@LKS90
Copy link
Contributor

LKS90 commented Jun 17, 2015

There is an exception about FileEntityNormalizer::getEntityUri($entity) not matching the parent class: ContentEntityNormalizer::getEntityUri(EntityInterface $entity)

Adding EntityInterface to the FileEntityNormalizer method isn't enough though, since FileEntity doesn't implement the EntityInterface yet.

@arildm
Copy link
Contributor

arildm commented Jun 17, 2015

Hm, yes, I just added the EntityInterface typehint to the method in fe3ebb8, making the test pass. FileEntity implements that interface but not directly.
FileEntity ⇾ File ⇾ FileInterface ⇾ ContentEntityInterface ⇾ FieldableEntityInterface ⇾ EntityInterface

@arildm arildm closed this as completed Jun 17, 2015
@LKS90
Copy link
Contributor Author

LKS90 commented Jun 17, 2015

Then you should get an exception about FileEntity not implementing the EntityInterface in the tests.

@LKS90
Copy link
Contributor Author

LKS90 commented Jun 17, 2015

No errors about that on the travis-ci build, nevermind then:

https://travis-ci.org/md-systems/file_entity/jobs/67208511

@Berdir
Copy link
Member

Berdir commented Jun 17, 2015

The fix looks fine. FileEntity can not not implement that interface, it extends from a class that does. It's more likely that the parent method there was changed and that broke it. That also means that the related core patches for bringing this into core need to be updated if they haven't been already.

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