corcel / corcel

Use WordPress backend with Laravel or any PHP application

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add support for Laravel 10

Baune8D opened this issue · comments

  • Corcel Version: 6.0.0
  • Framework Name & Version: Laravel 10.0.3
  • PHP Version: 8.2
  • Database Driver & Version:

Description:

Screenshot 2023-02-18 at 23 08 47

Steps To Reproduce:

I'm trying to use this package in my Laravel 10 project, but I'm encountering an error related to compatibility. I believe there is a conflict between the requirements of package and Laravel 10. Can you please help me resolve this issue?

{
    "require": {
        "php": "^8.1",
        "laravel/framework": "^10.0",
        "jgrossi/corcel": "^6.0"
    },
    "minimum-stability": "dev",
    "prefer-stable": true
}

root@9b930a79d8df:/var/www/html/cmposer# composer i
No composer.lock file present. Updating dependencies to latest instead of installing from lock file. See https://getcomposer.org/install for more information.
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Conclusion: don't install laravel/framework v10.0.0 (conflict analysis result)
    - Conclusion: don't install laravel/framework v10.0.1 (conflict analysis result)
    - Conclusion: don't install laravel/framework v10.0.2 (conflict analysis result)
    - Conclusion: don't install laravel/framework v10.0.3 (conflict analysis result)
    - jgrossi/corcel[v6.0.0, ..., 6.0.x-dev] require illuminate/support ^9.0 -> satisfiable by illuminate/support[v9.0.0-beta.1, ..., 9.x-dev].
    - Only one of these can be installed: illuminate/support[v9.0.0-beta.1, ..., 9.x-dev], laravel/framework[v10.0.0, ..., 10.x-dev]. laravel/framework replaces illuminate/support and thus cannot coexist with it.
    - Root composer.json requires laravel/framework ^10.0 -> satisfiable by laravel/framework[v10.0.0, ..., 10.x-dev].
    - Root composer.json requires jgrossi/corcel ^6.0 -> satisfiable by jgrossi/corcel[v6.0.0, 6.0.x-dev].

Mine is:

jgrossi/corcel[v6.0.0, ..., 6.0.x-dev] require illuminate/support ^9.0 -> satisfiable by illuminate/support[v9.0.0-beta.1, ..., 9.x-dev].
    - jgrossi/corcel[v5.1.0, ..., v5.1.1] require illuminate/support ^8.0 -> satisfiable by illuminate/support[v8.0.0, ..., 8.x-dev].
    - Only one of these can be installed: illuminate/support[dev-master, v4.0.0-BETA2, ..., 4.2.x-dev, v5.3.0, ..., 5.8.x-dev, v6.0.0, ..., 6.x-dev, v7.0.0, ..., 7.x-dev, v8.0.0, ..., 8.x-dev, v9.0.0-beta.1, ..., 9.x-dev, v10.0.0, ..., 10.x-dev], laravel/framework[v10.0.0, ..., 10.x-dev]. laravel/framework replaces illuminate/support and thus cannot coexist with it.

I made a fast fork for this, add this to your composer.json

    "repositories": {
        "corcel-for-laravel-10" : {
            "url": "https://github.com/Stevemoretz/corcel.git",
            "type": "git"
        }
    }

Now install it, remember this is not tested I just made it possible to get installed that's all, here's all I did:

Stevemoretz@89b7e62

There is also a problem with method belongsToMany:
Declaration of Corcel\Model::belongsToMany($related, $table = null, $foreignKey = null, $otherKey = null, $relation = null) must be compatible with Illuminate\Database\Eloquent\Model::belongsToMany($related, $table = null, $foreignPivotKey = null, $relatedPivotKey = null, $parentKey = null, $relatedKey = null, $relation = null).

Same issue as @adam-aido . Unable to use laravel 10

Ugly fix that's working for me, in my composer.json:
"laravel/framework": "10.8 as 9.5"

Ugly fix that's working for me, in my composer.json: "laravel/framework": "10.8 as 9.5"

That is not a fix. This will break plenty of things in the working environment.

@adam-aido I know it's not a fix, of course, but it's working for our project that only has a clash with this library and nothing else.

@jgrossi Is this package abandoned?!!
Because I see multiple PR to support Laravel 10, like #632 #636

support to laravel 10 added ✅ on v7.0.0