I made my fork (https://github.com/digital-bird/LaravelShoppingcart) of someone's fork (https://github.com/hardevine/LaravelShoppingcart).
I want to use my fork in my Laravel project + I want to modify it in the future.
1) I removed the hardevine's fork from this project via composer remove hardevine/shoppingcart
2) Then I modified composer.json
in my fork with:
"name": "digital-bird/shoppingcart",
"hardevine/shoppingcart": "dev-master",
⬇️
"repositories": [
{
"type": "vcs",
"url": "https://github.com/digital-bird/LaravelShoppingcart"
}
],
so new package.json
of my fork looks like: https://github.com/digital-bird/LaravelShoppingcart/blob/master/composer.json
3) I pushed this to my fork's master branch
4) I went to my Laravel project and I typed:
composer require digital-bird/shoppingcart
I'm getting the big red error:
[InvalidArgumentException] Could not find a matching version of package digital-bird/shoppingcart. Check the package spelling, your version constraint and that the package is ava ilable in a stability which matches your minimum-stability (stable).
What am I doing wrong?
You should add this:
"repositories": [
{
"type": "vcs",
"url": "https://github.com/digital-bird/LaravelShoppingcart"
}
],
to composer.json
of your main Laravel project instead of your library. Also adding "hardevine/shoppingcart": "dev-master",
seems to be pointless and it probably will create some conflicts.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With