laravel / lumen-framework

The Laravel Lumen Framework.
https://lumen.laravel.com
MIT License
1.47k stars 418 forks source link

Upgrade Lumen framework to 7 #1077

Closed KlausAndrade closed 4 years ago

KlausAndrade commented 4 years ago

Description:

Trying to upgrade Lumen framework to ^7.0

Steps To Reproduce:

I followed the upgrade guide, did the changes. if I change the composer.json to have Laravel/lumen: "^7.0" it returns an error:

Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - laravel/lumen-framework v7.0.5 requires illuminate/testing ^7.0 -> no matching package found.
    - laravel/lumen-framework v7.0.4 requires illuminate/testing ^7.0 -> no matching package found.
    - laravel/lumen-framework v7.1.2 requires illuminate/testing ^7.0 -> no matching package found.
    - laravel/lumen-framework v7.1.1 requires illuminate/testing ^7.0 -> no matching package found.
    - laravel/lumen-framework v7.0.0 requires illuminate/testing ^7.0 -> no matching package found.
    - laravel/lumen-framework v7.1.0 requires illuminate/testing ^7.0 -> no matching package found.
    - laravel/lumen-framework v7.0.1 requires illuminate/testing ^7.0 -> no matching package found.
    - laravel/lumen-framework v7.0.3 requires illuminate/testing ^7.0 -> no matching package found.
    - laravel/lumen-framework v7.0.2 requires illuminate/testing ^7.0 -> no matching package found.
    - Installation request for laravel/lumen-framework ^7.0 -> satisfiable by laravel/lumen-framework[v7.0.2, v7.0.3, v7.0.1, v7.1.0, v7.0.0, v7.1.1, v7.1.2, v7.0.4, v7.0.5].

Potential causes:
 - A typo in the package name
 - The package is not available in a stable-enough version according to your minimum-stability setting
   see <https://getcomposer.org/doc/04-schema.md#minimum-stability> for more details.
 - It's a private package and you forgot to add a custom repository to find it

Read <https://getcomposer.org/doc/articles/troubleshooting.md> for further common problems.
GrahamCampbell commented 4 years ago

The package exists and is available at https://packagist.org/packages/illuminate/testing. Please try clearing your composer cache and updating to the latest version of composer.

KlausAndrade commented 4 years ago

I tried the following steps: composer self-update composer clearcache composer update --no-cache

and got the same error

GrahamCampbell commented 4 years ago

Can you paste your entire composer.json please?

KlausAndrade commented 4 years ago

Here it is :)

{
    "name": "nomorehours/knowmore-api",
    "description": "Internal API end point to handle specific cases",
    "keywords": ["framework", "laravel", "lumen"],
    "license": "MIT",
    "type": "project",
    "repositories": [{
            "type": "composer",
            "url": "https://repo.packagist.com/nomorehours/"
        },
        {
            "packagist.org": false
        }
    ],
    "require": {
        "php": "^7.3",
        "laravel/lumen-framework": "^7.0",
        "vlucas/phpdotenv": "4.1.5",
        "dusterio/lumen-passport": "^0.2",
        "nordsoftware/lumen-cors": "^2.1",
        "league/flysystem-aws-s3-v3": "~1.0",
        "doctrine/dbal": "^2.5",
        "guzzlehttp/guzzle": "^6.2",
        "predis/predis": "~1.0",
        "illuminate/redis": "^5.6",
        "pusher/pusher-php-server": "^3.0",
        "stripe/stripe-php": "^7.0",
        "irazasyed/larasupport": "~1.0",
        "bugsnag/bugsnag-laravel": "^2.16",
        "psr/log": "^1.0",
        "irazasyed/telegram-bot-sdk": "^2.0",
        "nomorehours/nomore-base": "^1.0.4",
        "nomorehours/nomore-client-service": "^1.0.6",
        "nomorehours/nomore-guideline": "^1.0.4",
        "nomorepackage/api-bundle": "^1.3.4",
        "nomorepackage/zendeskclient": "^v1.0.7",
        "nomorepackage/zerobounce": "^1.0.0",
        "nesbot/carbon": "^2.32.0"
    },
    "require-dev": {
        "fzaninotto/faker": "~1.4",
        "phpunit/phpunit": "^8.0",
        "mockery/mockery": "~0.9",
        "filp/whoops": "~2.0"
    },
    "autoload": {
        "classmap": [
            "app/Helpers"
        ],
        "psr-4": {
            "App\\": "app/"
        },
        "files": [
            "app/Helpers/helper.php"
        ]
    },
    "autoload-dev": {
        "classmap": [
            "tests/",
            "database/"
        ],
        "psr-4": {
            "Tests\\": "tests/"
        }
    },
    "scripts": {
        "post-root-package-install": [
            "php -r \"copy('.env.example', '.env');\""
        ]
    }
}
GrahamCampbell commented 4 years ago

The first observation is that pinning vlucas/phpdotenv to an exact version is a bad idea. You should change this to "vlucas/phpdotenv": "^4.1.5", or delete that entry entirely since lumen 7 already requires the version of phpdotenv it needs.

GrahamCampbell commented 4 years ago

The problem is that illuminate/redis must be at version ^7.0.

GrahamCampbell commented 4 years ago

Also irazasyed/telegram-bot-sdk ^2.1 is not compatible with Lumen 7.

KlausAndrade commented 4 years ago

I'm trying to test it, but composer is stuck for minutes :/ will get back as soon as I get another fail or success