BenSampo / laravel-enum

Simple, extensible and powerful enumeration implementation for Laravel.
https://sampo.co.uk/blog/using-enums-in-laravel
MIT License
2k stars 164 forks source link

Can't install on php8.3.1 #346

Closed MmKargar closed 8 months ago

MmKargar commented 9 months ago

Hi there, thanks for great work!

php: 8.3.1
Laravel Framework 10.42.0
mehdi@mehdi:~/Works/firebase$ composer require bensampo/laravel-enum
./composer.json has been updated
Running composer update bensampo/laravel-enum
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - bensampo/laravel-enum[1.0.0, ..., 1.15.0] require illuminate/support ~5.1 -> found illuminate/support[v5.1.1, ..., v5.8.36] but these were not loaded, likely because it conflicts with another require.
    - bensampo/laravel-enum[1.16.0, ..., 1.18.2] require illuminate/support ~5.4 -> found illuminate/support[v5.4.0, ..., v5.8.36] but these were not loaded, likely because it conflicts with another require.
    - bensampo/laravel-enum[1.19, ..., v1.19.1] require illuminate/support 5.4.*|5.5.*|5.6.*|5.7.*|5.8.* -> found illuminate/support[v5.4.0, ..., v5.8.36] but these were not loaded, likely because it conflicts with another require.
    - bensampo/laravel-enum v1.20 requires illuminate/support 5.4.*|5.5.*|5.6.*|5.7.*|5.8.*|5.9.* -> found illuminate/support[v5.4.0, ..., v5.8.36] but these were not loaded, likely because it conflicts with another require.
    - bensampo/laravel-enum[v1.21, ..., v1.38.0] require php ~7.1 -> your php version (8.3.1) does not satisfy that requirement.
    - bensampo/laravel-enum[v2.0.0, ..., v2.2.0] require php ^7.2.5 -> your php version (8.3.1) does not satisfy that requirement.
    - bensampo/laravel-enum[v3.0.0, ..., v3.1.0] require php ^7.3 -> your php version (8.3.1) does not satisfy that requirement.
    - bensampo/laravel-enum[v3.2.0, ..., v3.4.2, v4.0.0, ..., v4.2.0] require illuminate/contracts ^8.0 -> found illuminate/contracts[v8.0.0, ..., v8.83.27] but these were not loaded, likely because it conflicts with another require.
    - bensampo/laravel-enum[v5.0.0, ..., v5.3.1, v6.0.0, ..., v6.2.2] require illuminate/contracts ^9 -> found illuminate/contracts[v9.0.0, ..., v9.52.16] but these were not loaded, likely because it conflicts with another require.
    - bensampo/laravel-enum[v6.3.0, ..., v6.8.0] require nikic/php-parser ^4.13 -> found nikic/php-parser[v4.13.0, ..., v4.18.0] but the package is fixed to v5.0.0 (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.
    - Root composer.json requires bensampo/laravel-enum * -> satisfiable by bensampo/laravel-enum[1.0.0, ..., v1.38.0, v2.0.0, v2.1.0, v2.2.0, v3.0.0, ..., v3.4.2, v4.0.0, v4.1.0, v4.2.0, v5.0.0, ..., v5.3.1, v6.0.0, ..., v6.8.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 bensampo/laravel-enum:*" to figure out if any version is installable, or "composer require bensampo/laravel-enum:^2.1" if you know which you need.
RVP04 commented 9 months ago

Yes true

DoBaoTrung commented 9 months ago

You can try it. composer require bensampo/laravel-enum --with-all-dependencies

alexv96 commented 8 months ago

The line I commented worked for me, using php 8.1.0 composer require bensampo/laravel-enum --with-all-dependencies

spawnia commented 8 months ago

Using this library is no longer recommended, especially for new projects. PHP 8.1 supports enums natively.

See https://github.com/BenSampo/laravel-enum/issues/332.