Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

johndoee's avatar

Problem 1 - phpunit/phpunit[6.0.0, ..., 6.5.14] require php ^7.0 -> your php version (8.1.4) does not satisfy that requirement. - Root composer.json requires phpunit/phpunit ~6.0 -> satisfiable by phpunit/phpunit[6.0.0, ..., 6.5.14].

i try to run old laravel app, my php v is 8.1 so cannot run composer update ,install ,

composer install --ignore-platform-reqs

it also not work , my composer json file

{
    "name": "laravel/laravel",
    "description": "The Laravel Framework.",
    "keywords": ["framework", "laravel"],
    "license": "MIT",
    "type": "project",
    "require": {
        "php": "^7.0||^8.1.4",
        "coingate/coingate-php": "^2.0",
        "fideloper/proxy": "~3.3",
        "hesto/multi-auth": "^2.0",
        "intervention/image": "^2.4",
        "laravel/framework": "5.5.*",
        "laravel/tinker": "~1.0",
        "nwidart/laravel-modules": "^2.7",
        "stripe/stripe-php": "^6.0"
    },
    "require-dev": {
        "filp/whoops": "~2.0",
        "fzaninotto/faker": "~1.4",
        "mockery/mockery": "~1.0",
        "phpunit/phpunit": "~6.0",
        "symfony/thanks": "^1.0"
    },
    "autoload": {
        "classmap": [
            "database/seeds",
            "database/factories"
        ],
        "psr-4": {
            "App\": "app/",
            "Modules\": "Modules/"
        }
    },
    "autoload-dev": {
        "psr-4": {
            "Tests\": "tests/"
        },
        "files" :["app/Http/helpers/helpers.php"]
    },
    "extra": {
        "laravel": {
            "dont-discover": [
            ]
        }
    },
    "scripts": {
        "post-root-package-install": [
            "@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
        ],
        "post-create-project-cmd": [
            "@php artisan key:generate"
        ],
        "post-autoload-dump": [
            "Illuminate\Foundation\ComposerScripts::postAutoloadDump",
            "@php artisan package:discover"
        ]
    },
    "config": {
        "preferred-install": "dist",
        "sort-packages": true,
        "optimize-autoloader": true
    }
}


how can i fix this issue,

  Problem 1
    - phpunit/phpunit[6.0.0, ..., 6.5.14] require php ^7.0 -> your php version (8.1.4) does not satisfy that requirement.
    - Root composer.json requires phpunit/phpunit ~6.0 -> satisfiable by phpunit/phpunit[6.0.0, ..., 6.5.14].

0 likes
2 replies
03giant@gmail.com's avatar

I believe in the config section you need to add the lesser php version your using so the dependencies will resolve using the version specified in the config section. No guarantee the app won't have issues thought. Perhaps spin up an instance with php 6?

Please or to participate in this conversation.