Reputation: 51
I'm trying to use local composer package in Laravel (8.0) - based on How to develop a simple Laravel package locally
I'm using simonschaufi/laravel-dkim
/packages/simonschaufi/laravel-dkim
"repositories": {
"laravel-dkim": {
"type": "path",
"url": "/packages/simonschaufi/laravel-dkim",
"options": {
"symlink": true
}
}
},
"require": {
"simonschaufi/laravel-dkim": "@dev"
},
"config": {
"preferred-install": "source",
"sort-packages": true,
"optimize-autoloader": true
},
"minimum-stability": "dev",
"prefer-stable": true
Unfortunately, after composer update
still get original package (instead the local one)
Do You know what is wrong ????
Upvotes: 1
Views: 3531
Reputation: 3
try changing "url": "/packages/simonschaufi/laravel-dkim",
.to "url": "fullPath/packages/simonschaufi/laravel-dkim"
,
It worked for me.
Upvotes: 0
Reputation: 51
Based on help from Simon Schaufelberger:
the problem was because I used old version of Composer (1.8.4). After composer update (to 1.10.13) local package was installed correctly :)
The correct code in composer file is:
"repositories": [
{
"type": "path",
"url": "./packages/*"
}
],
Files should be in directory /packages/laravel-dkim
Upvotes: 1
Reputation: 39
Try changing the repositories key to:
"repositories": [
{
"type": "path",
"url": "/packages/simonschaufi/laravel-dkim"
}
],
Other potential problem could be the require:
"require": {
"simonschaufi/laravel-dkim": "dev-master"
},
Also the require seems a little small? Do you have a duplicate key? Also double check the local path to the package.
Upvotes: 1