Petro Gromovo
Petro Gromovo

Reputation: 2241

How to add repository with plugin I need to edit in composer.json?

On laravel 11 site I have vyuldashev/nova-permission installed, so composer.json have :

"require": {
    "php": "^8.2",
    "laravel/framework": "^10.10",
    "laravel/nova": "4.27.12",
    "vyuldashev/nova-permission": "^3.2",
    ...
    "repositories": [
        {
            "type": "composer",
            "url": "https://nova.laravel.com"
        }
    ],

and I need manually edit it's content of nova-permission package :

I modified composer.json as :

    ...
    "vyuldashev/nova-permission": "^3.2",
},
"repositories": [
    {
        "type": "path",
        "url": "./components/nova-permission",
        "options": {

            "symlink": true
        }
    },
    {
        "type": "composer",
        "url": "https://nova.laravel.com"
    }
],

But I got error :

composer update
...

Problem 1
- Root composer.json requires vyuldashev/nova-permission ^3.2, it is satisfiable by vyuldashev/nova-permission[v3.2.0] from composer repo (https://repo.packagist.org) but vyuldashev/nova-permission[dev-master (alias of dev-main), dev-main] from path repo (./components/nova-permission) has higher repository priority. The packages from the higher priority repository do not match your constraint and are therefore not installable. That repository is canonical so the lower priority repo's packages are not installable. See https://getcomposer.org/repoprio for details and assistance.

How can I add this package inside of my components subdirectory ?

Upvotes: 0

Views: 31

Answers (0)

Related Questions