File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed
Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change 1818 "guzzlehttp/psr7" : " ^1.6" ,
1919 "php-http/client-implementation" : " ^1.0" ,
2020 "psr/http-client" : " ^1.0" ,
21- "psr/http-message" : " ^1.0"
21+ "psr/http-message" : " ^1.0" ,
22+ "symfony/serializer" : " ^5.2"
2223 },
2324 "require-dev" : {
2425 "php-http/mock-client" : " ^1.3" ,
Original file line number Diff line number Diff line change 22
33namespace Hussainweb \DrupalApi \Entity \Collection ;
44
5- use GuzzleHttp \Psr7 \Uri ;
65use Psr \Http \Message \ResponseInterface ;
6+ use Symfony \Component \Serializer \Encoder \JsonDecode ;
7+ use Symfony \Component \Serializer \Encoder \JsonEncoder ;
78
89abstract class EntityCollection implements \Iterator, \Countable
910{
@@ -31,7 +32,7 @@ final public function __construct($data)
3132 */
3233 public static function fromResponse (ResponseInterface $ response )
3334 {
34- return new static (json_decode (( string ) $ response ->getBody ()));
35+ return new static (( new JsonDecode ())-> decode (( string ) $ response ->getBody (), JsonEncoder:: FORMAT ));
3536 }
3637
3738 public function getSelfLink ()
You can’t perform that action at this time.
0 commit comments