sonata-project / SonataMediaBundle

Symfony SonataMediaBundle
https://docs.sonata-project.org/projects/SonataMediaBundle
MIT License
451 stars 495 forks source link

Weird failing test on 2.3 lowest deps #819

Closed soullivaneuh closed 9 years ago

soullivaneuh commented 9 years ago

See: https://travis-ci.org/sonata-project/SonataMediaBundle/jobs/72112494#L699

Can't reproduce it on my local.

@rande any idea?

phansys commented 9 years ago

@Soullivaneuh, maybe this is related to PSR-7, since a response is represented by a message that implements MessageInterface and there isn't any getContent() method.

phansys commented 9 years ago

BTW, I can't reproduce the issue in my local env, but after some debug I think it has nothing to do with PSR-7 since I didn't found any usage of it. Buzz has the method well defined: MessageInterface::getContent().

phansys commented 9 years ago

@Soullivaneuh, I can reproduce the issue locally now, so I'll work on it. When I'll have some news I'll ping you.

soullivaneuh commented 9 years ago

Thanks @phansys. I'll do some searches on my side too.

soullivaneuh commented 9 years ago

What did you make to be able for reproducing?

phansys commented 9 years ago

git checkout 2.3. I was trying on master before (I though you mean 2.3 just for the symfony reqs).

phansys commented 9 years ago

Buzz 0.3 has not MessageInterface: https://github.com/kriswallsmith/Buzz/tree/v0.3/lib/Buzz/Message

SonataMediaBundle (2.3) $ composer show -i kriswallsmith/buzz
name     : kriswallsmith/buzz
descrip. : Lightweight HTTP client
keywords : http client
versions : * v0.3
type     : library
license  : MIT License (MIT) (OSI approved) https://spdx.org/licenses/MIT.html#licenseText
source   : [git] https://github.com/kriswallsmith/Buzz.git 0b72b0215e9ecb8e0d754ba392b6c1872a832b7c
dist     : [zip] https://api.github.com/repos/kriswallsmith/Buzz/zipball/0b72b0215e9ecb8e0d754ba392b6c1872a832b7c 0b72b0215e9ecb8e0d754ba392b6c1872a832b7c
names    : kriswallsmith/buzz

autoload
psr-0
Buzz => lib/

requires
php >=5.3.0
phansys commented 9 years ago

Should we bump the version constraint to kriswallsmith/buzz: ~0.6 or update the tests accordingly to the corresponding class?

soullivaneuh commented 9 years ago

@phansys could you provide a PR with the corrected composer.json?

soullivaneuh commented 9 years ago

Bumping version looks better.

Do not work neither with 0.4 and 0.5?

phansys commented 9 years ago

No at all, MessageInterface was introduced at 0.6.

soullivaneuh commented 9 years ago

Let's go for version bumping so.

phansys commented 9 years ago

Note that if we replace the mocks for Buzz\Message\MessageInterface with Buzz\Message\AbstractMessage, the issue is gone since AbstractMessage is present in all resolved versions.

soullivaneuh commented 9 years ago

Feel free to make the best proposition. ;-)