Search code examples
phplaravelcomposer-phpphp-8

Error in packages while installing with PHP 8 using composer


I want to run laravel application which I had clone from my Gitlab repository. However, while running composer update command throwing me below error.

Environment:

php -v: PHP 8.0.1

composer --version: 2.0.9

I understand that PHP 8 doesn't provide support all the packages yet. But still looking for minimal working solution to run my project on local machine.

I tried the following article from laravel. But was not able to install 'fakerphp/faker` also.

  Problem 1
    - tymon/jwt-auth[1.0.0-alpha.2, ..., 1.0.0-rc.4.1] require php ^5.5.9 || ^7.0 -> your php version (8.0.1; overridden via config.platform, same as actual) does not satisfy that requirement.
    - tymon/jwt-auth[1.0.0-rc.5, ..., 1.0.2] require php ^5.5.9|^7.0 -> your php version (8.0.1; overridden via config.platform, same as actual) does not satisfy that requirement.
    - doctrine/inflector[v1.2.0, ..., 1.2.x-dev] require php ^7.0 -> your php version (8.0.1; overridden via config.platform, same as actual) does not satisfy that requirement.
    - doctrine/inflector[v1.3.0, ..., 1.3.x-dev] require php ^7.1 -> your php version (8.0.1; overridden via config.platform, same as actual) does not satisfy that requirement.
    - doctrine/inflector[1.4.0, ..., 1.4.1, 2.0.0, ..., 2.0.1] require php ^7.2 -> your php version (8.0.1; overridden via config.platform, same as actual) does not satisfy that requirement.
    - tymon/jwt-auth 1.0.x-dev is an alias of tymon/jwt-auth dev-develop and thus requires it to be installed too.
    - Conclusion: don't install tymon/jwt-auth dev-develop (conflict analysis result)


composer.json


    "require": {
        "php": "^7.4|^8.0",
        "ext-zip": "*",
        "consoletvs/charts": "^7.1",
        "facade/ignition": "^2.5",
        "fideloper/proxy": "^4.0",
        "guzzlehttp/guzzle": "^7.2",
        "intervention/image": "^2.5",
        "laravel/framework": "^8.14",
        "laravel/passport": "^10.0",
        "laravel/tinker": "^2.5",
        "laravel/ui": "^3.1",
        "phpoffice/phpspreadsheet": "^1.16",
        "sentry/sentry-laravel": "^2.3",
        "tymon/jwt-auth": "^1.0",
        "zanysoft/laravel-zip": "^1.0"
    },

I even deleted my composer.lock and tried running composer install but still getting error.


Solution

  • I would like to give credit to @RWD for pointing out the exact issue.

    After removing "tymon/jwt-auth": "^1.0 package. It is updating.

    PHP 8 Doesn't provide support yet.