widop / WidopHttpAdapterBundle

Issue HTTP requests for your Symfony2 project.
MIT License
8 stars 13 forks source link

Error since composer update #19

Closed timtailor closed 10 years ago

timtailor commented 10 years ago

Since a recent upgrade i am getting the following error in the egeloen/ivory-google-map Bundle (DistanceMatrix) It seems to be caused by widop/http-adapter 1.1.0 (when i copy the old version of widop/http-adapter it is working)

Does anyone else have problems as well?

Error message:

Warning: json_decode() expects parameter 1 to be string, object given in myproject\vendor\egeloen\google-map\src\Ivory\GoogleMap\Services\DistanceMatrix\DistanceMatrix.php line 175

egeloen commented 10 years ago

Closing as it is not related to this repository.

mrychlik commented 10 years ago

The problem is real and is due to a change in the type of the return value of the widop/http-adapter which happened in version 1.1. Unfortunately, going back to version 1.0 does not work either. I made changes which seem to fix the problem. See my forks: https://github.com/mrychlik

On Mon, Aug 4, 2014 at 1:59 PM, timtailor notifications@github.com wrote:

Since a recent upgrade i am getting the following error in the egeloen/ivory-google-map Bundle (DistanceMatrix) It seems to be caused by widop/http-adapter 1.1.0 (when i copy the old version of widop/http-adapter it is working)

Does anyone else have problems as well?

Error message:

Warning: json_decode() expects parameter 1 to be string, object given in myproject\vendor\egeloen\google-map\src\Ivory\GoogleMap\Services\DistanceMatrix\DistanceMatrix.php line 175

— Reply to this email directly or view it on GitHub https://github.com/widop/WidopHttpAdapterBundle/issues/19.

mrychlik commented 10 years ago

PS: To get the fix, you would need to use my forked versions at https://github.com/mrychlik The version dev-widop12 works for me. I am using the following bits in my composer.json:

"repositories": [

.... { "type": "vcs", "url": "https://github.com/mrychlik/ivory-google-map.git" }, { "type": "vcs", "url": "https://github.com/mrychlik/IvoryGoogleMapBundle.git" } ] "require": { .... "egeloen/google-map": "dev-widop12@dev", "egeloen/google-map-bundle": "dev-widop12@dev" ... } Best, --Marek Rychlik

On Mon, Aug 4, 2014 at 1:59 PM, timtailor notifications@github.com wrote:

Since a recent upgrade i am getting the following error in the egeloen/ivory-google-map Bundle (DistanceMatrix) It seems to be caused by widop/http-adapter 1.1.0 (when i copy the old version of widop/http-adapter it is working)

Does anyone else have problems as well?

Error message:

Warning: json_decode() expects parameter 1 to be string, object given in myproject\vendor\egeloen\google-map\src\Ivory\GoogleMap\Services\DistanceMatrix\DistanceMatrix.php line 175

— Reply to this email directly or view it on GitHub https://github.com/widop/WidopHttpAdapterBundle/issues/19.

egeloen commented 10 years ago

@mrychlik I know there is a BC break between 1.0.x to 1.1.x which now returns a response object instead of the plain response body as document in the UPGRADE file. Anyway, saying that downgrading to 1.0.x does not work is wrong as it works perfectly. Maybe you're confusing the bundle and the library because if you downgrade the widop/http-adapter-bundle to 1.0.x instead of the widop/http-adapter library, then it will not work (the BC break is not in the bundle but in the library and installing the bundle as 1.0.x will install the 1.1.x library).

mrychlik commented 10 years ago

The reason why the downgrade to 1.0.x did not work was that egeloen/google-map now uses Widop\HttpAdapter\HttpAdapterInterface but widop/http-adapter has no idea what that is before version 1.1. I am recalling from memory on something I did two weeks ago or so, so this eeds checking. In any case, assuming that version 1.1 is better, would it not be better to make the new software use it? Best regards, --Marek Rychlik

On Mon, Aug 4, 2014 at 7:13 PM, Eric GELOEN notifications@github.com wrote:

@mrychlik https://github.com/mrychlik I know there is a BC break between 1.0.x to 1.1.x which now returns a response object instead of the plain response body as document in the UPGRADE file. Anyway, saying that downgrading to 1.0.x does not work is wrong as it works perfectly. Maybe you're confusing the bundle and the library because if you downgrade the widop/http-adapter-bundle to 1.0.x instead of the widop/http-adapter library, then it will not work (the BC break is not in the bundle but in the library).

— Reply to this email directly or view it on GitHub https://github.com/widop/WidopHttpAdapterBundle/issues/19#issuecomment-51142123 .

egeloen commented 10 years ago

That's strange because the interface is part of the library since the 1.0.0 (See https://github.com/widop/http-adapter/blob/1.0.0/src/Widop/HttpAdapter/HttpAdapterInterface.php). Anyway, updating the google map library in order to use the 1.1.x release is the way to go.

timtailor commented 10 years ago

The fix mentioned by egeloen mentioned here https://github.com/egeloen/IvoryGoogleMapBundle/issues/119 works for me!