Giter VIP home page Giter VIP logo

laravel-riot-api's People

Contributors

blood72 avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

safakocamanoglu

laravel-riot-api's Issues

Proxy is not compatible with named arguments

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));
}

Laravel 9 support

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.

Setup Error

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.