lmerotta-zz / phpokeapi

A PHP7.1 Wrapper for PokéAPI, with cache and lazy-loading
32 stars 17 forks source link

Project not working #12

Open TheEzraMiller opened 2 years ago

TheEzraMiller commented 2 years ago

Trying to run the given example in Readme:

<?php use PokeAPI\Client; $client = new Client(); // Returns a PokeAPI\Pokemon\Species instance $species = $client->species('bulbasaur'); // or $client->species(1);

Gets errors including a parsing error:

Deprecated: Return type of PhpCollection\AbstractMap::getIterator() should either be compatible with IteratorAggregate::getIterator(): Traversable, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in pokemon/vendor/phpcollection/phpcollection/src/PhpCollection/AbstractMap.php on line 295 Deprecated: Return type of PhpCollection\AbstractMap::count() should either be compatible with Countable::count(): int, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in pokemon/vendor/phpcollection/phpcollection/src/PhpCollection/AbstractMap.php on line 290 Parse error: syntax error, unexpected token "readonly" in pokemon/vendor/jms/serializer/src/JMS/Serializer/Metadata/Driver/AnnotationDriver.php on line 80