vinkla / laravel-hashids

A Hashids bridge for Laravel
MIT License
2k stars 173 forks source link

Release 5.2 breaks Laravel 5.7 support #108

Closed netpok closed 5 years ago

netpok commented 5 years ago

The release 5.2 drops Laravel 5.7 support (related to #107) without any apparent reason, the only change I could see is the version requirement. It would be better to add support (5.7.* || 5.8.*) for both platforms (and probably LTS one too).

If this is not possible than it should be mentioned on the main page because the composer require vinkla/hashids command will fail on earlier Laravel versions.

vinkla commented 5 years ago

It shouldn’t fail. Composer will handle the different versions.

rodurma commented 5 years ago

My PHP version. I''m using Laravel Homestead 7

$ php --version
PHP 7.3.1-1+ubuntu18.04.1+deb.sury.org+1 (cli) (built: Jan 13 2019 10:19:33) ( NTS )

My Laravel version

$ php artisan --version
Laravel Framework 5.7.28

Composer require

$ composer require vinkla/hashids
Using version ^5.2 for vinkla/hashids
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Conclusion: remove laravel/framework v5.7.28
    - Conclusion: don't install laravel/framework v5.7.28
    - vinkla/hashids 5.2.0 requires illuminate/support 5.8.* -> satisfiable by laravel/framework[5.8.x-dev], illuminate/support[5.8.x-dev, v5.8.0, v5.8.2, v5.8.3, v5.8.4].
    - vinkla/hashids 5.2.x-dev requires illuminate/support 5.8.* -> satisfiable by laravel/framework[5.8.x-dev], illuminate/support[5.8.x-dev, v5.8.0, v5.8.2, v5.8.3, v5.8.4].
    - Can only install one of: laravel/framework[5.8.x-dev, v5.7.28].
    - don't install illuminate/support 5.8.x-dev|don't install laravel/framework v5.7.28
    - don't install illuminate/support v5.8.0|don't install laravel/framework v5.7.28
    - don't install illuminate/support v5.8.2|don't install laravel/framework v5.7.28
    - don't install illuminate/support v5.8.3|don't install laravel/framework v5.7.28
    - don't install illuminate/support v5.8.4|don't install laravel/framework v5.7.28
    - Installation request for laravel/framework (locked at v5.7.28, required as 5.7.*) -> satisfiable by laravel/framework[v5.7.28].
    - Installation request for vinkla/hashids ^5.2 -> satisfiable by vinkla/hashids[5.2.0, 5.2.x-dev].

Installation failed, reverting ./composer.json to its original content.
GrahamCampbell commented 5 years ago

composer require "vinkla/hashids:^7.1"

GrahamCampbell commented 5 years ago

Composer just resolves the latest version, instead of checking which is compatible.