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

mohammadkhallaf's avatar

when run ``` composer install --ignore-platform-reqs```

PHP Fatal error:  During inheritance of ArrayAccess: Uncaught ErrorException: Return type of Illuminate\Support\Collection::offsetExists($key) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in C:\xampp\htdocs\portaljob\vendor\laravel\framework\src\Illuminate\Support\Collection.php:1739
0 likes
5 replies
Sinnbeck's avatar

Then make sure your platform requirements are correct and just run composer install

mohammadkhallaf's avatar

@Sinnbeck im trying to upgrade from laravel 5.6 to 9 how to do that

{
    "name": "laravel/laravel",
    "description": "The Laravel Framework.",
    "keywords": ["framework", "laravel"],
    "license": "MIT",
    "type": "project",
    "require": {
        "php": ">=7.1.3",
        "doctrine/dbal": "v2.5.13",
        "fideloper/proxy": "~4.0",
        "intervention/image": "^2.4",
        "laravel/framework": "5.6.*",
        "laravel/tinker": "~1.0",
        "laravelcollective/html": "~5.0",
        "unisharp/laravel-ckeditor": "^4.7",
        "unisharp/laravel-filemanager": "~1.8"
    },
    "require-dev": {
        "filp/whoops": "~2.0",
        "nunomaduro/collision": "~1.1",
        "fzaninotto/faker": "~1.4",
        "mockery/mockery": "~1.0",
        "phpunit/phpunit": "~7.0",
        "symfony/thanks": "^1.0"
    },
    "autoload": {
        "classmap": [
            "database/seeds",
            "database/factories"
        ],
        "psr-4": {
            "App\": "app/"
        }
    },
    "autoload-dev": {
        "psr-4": {
            "Tests\": "tests/"
        }
    },
    "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,
        "allow-plugins": {
            "symfony/thanks": true
        }
    },
    "minimum-stability": "dev",
    "prefer-stable": true
}

Sinnbeck's avatar

@mohammadkhallaf Yes :) But before laravel 6, all versions are "major" versions. So 5.7 and 5.8 are full upgrades as well :)

1 like

Please or to participate in this conversation.