Open dave7280 opened 7 years ago
I'm having the same issue.
Hello i am having the same issue...
Please provide a solution
Try to download library then modify source code by removing annotation that it complain about:
@JMS\Type("AirbnbSDK\Response\Listing\Listing\Listing")
from
I didn't test, but maybe it's gonna work. I remember that i somehow solved it by modifying source.
Dont work for me. Who have a solution ? Thank you
This is a bit of a brutal hack, but it seems to have worked for me:
Find the following file:
https://github.com/JonnyD/AirbnbSDK/blob/master/src/AirbnbSDK/HttpClient/HttpClient.php
Replace line 124:
$response = $serializer->deserialize($contents, $deserializeTo, 'json');
with:
$response = json_decode($contents);
The issue seems to be with the framework that is parsing the otherwise healthy result that is coming back from AirBnB. The hack circumvents the whole framework and just does a simple translate from JSON to a PHP Object.
I'm not sure what wider implications this has, or whether I'll need to hack some other parts also to make everything work, but for now, the listings search works, and that was my primary objective. Happy coding!
Doctrine\Common\Annotations\AnnotationException Semantical Error The annotation "@JMS\Serializer\Annotation\Type" in property AirbnbSDK\Response\Listing\ListingResponse::$listing does not exist, or could not be auto-loaded.