blood72 / laravel-riot-api Goto Github PK
View Code? Open in Web Editor NEWRiot API wrapper for Laravel
License: MIT License
Riot API wrapper for Laravel
License: MIT License
Hi,
There is an issue where the __call
forwarding made by the proxy is not compatible with PHP 8's named arguments:
$matches = LeagueAPI::getMatchIdsByPUUID(
puuid: $summoner->puuid,
start: 0,
count: 1
);
I think a fix would be as easy as to filtering null
values from $parameters
:
public function __call($method, $parameters)
{
if (method_exists($this->api, $method)) {
$this->modifyParameters($method, $parameters);
}
- return $this->api->$method(...$parameters);
+ return $this->api->$method(...array_filter($parameters));
}
Trying to install this package to my Laravel 9 project, sadly it's not supported due to wrong version dependencies.
Laravel v9.4.1 (PHP v8.0.16)
Using version ^4.1 for blood72/laravel-riot-api
./composer.json has been updated
Running composer update blood72/laravel-riot-api
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.
Problem 1
- dolejska-daniel/riot-api-datadragon v1.0.0 requires symfony/console ^5 -> found symfony/console[v5.0.0-BETA1, ..., 5.4.x-dev] but the package is fixed to v6.0.5 (lock file version) by a partial update and that version does not
match. Make sure you list it as an argument for the update command.
- blood72/laravel-riot-api v4.1.0 requires dolejska-daniel/riot-api ^5.0.0 -> satisfiable by dolejska-daniel/riot-api[v5.0.0-alpha].
- dolejska-daniel/riot-api v5.0.0-alpha requires dolejska-daniel/riot-api-datadragon ^1 -> satisfiable by dolejska-daniel/riot-api-datadragon[v1.0.0].
- Root composer.json requires blood72/laravel-riot-api ^4.1 -> satisfiable by blood72/laravel-riot-api[v4.1.0].
Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.
You can also try re-running composer require with an explicit version constraint, e.g. "composer require blood72/laravel-riot-api:*" to figure out if any version is installable, or "composer require blood72/laravel-riot-api:^2.1" if
you know which you need.
Installation failed, reverting ./composer.json and ./composer.lock to their original content.
match-v4 is being deprecated on June 14th, 2021.
As a result, compatibility checks should be prepared in advance with the dolejska-daniel/riot-api
version up.
dolejska-daniel/riot-api-league#1
https://developer.riotgames.com/apis#match-v5
When I run composer for installation I get argument error
composer require blood72/laravel-riot-api
Terminal error code start
@php artisan package:discover --ansi
TypeError
Argument 1 passed to RiotAPI\DataDragonAPI\DataDragonAPI::initByRegion() must be of the type string, null given, called in D:\AppServ\www\test\vendor\blood72\laravel-riot-api\src\Rio
tAPIServiceProvider.php on line 88
at D:\AppServ\www\test\vendor\dolejska-daniel\riot-api\src\DataDragonAPI\DataDragonAPI.php:227
223| * @param array $customSettings
224| *
225| * @throws RequestException
226| */
-> 227| public static function initByRegion( string $region_name, array $customSettings = [] )
228| {
229| $region_name = strtolower($region_name);
230| $data = file_get_contents(self::getDataDragonUrl() . "/realms/$region_name.json");
231| if ($data == false)
1 D:\AppServ\www\test\vendor\blood72\laravel-riot-api\src\RiotAPIServiceProvider.php:88
RiotAPI\DataDragonAPI\DataDragonAPI::initByRegion([])
2 D:\AppServ\www\test\vendor\blood72\laravel-riot-api\src\RiotAPIServiceProvider.php:40
Blood72\RiotAPI\RiotAPIServiceProvider::resolveDataDragonAPI()
Script @php artisan package:discover --ansi handling the post-autoload-dump event returned with error code 1
Installation failed, reverting ./composer.json to its original content.
Terminal error code finish
I'm new to Laravel yet, couldn't find a valid method to run the package. Thank you in advance for your help
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.