[Laravel 8.x] Composerのパッケージ作成手順しようと思ったが…

composer.json

{
    "name": "laravel/laravel",
    "type": "project",
    "description": "The Laravel Framework.",
    "keywords": [
        "framework",
        "laravel"
    ],
// 省略

composer.jsonから、name -> “laravel/laravel” となっていることがわかる。

composer.json

"autoload": {
        "psr-4": {
            "App\\": "app/",
            "Database\\Factories\\": "database/factories/",
            "Database\\Seeders\\": "database/seeders/",
            "Laravel\\Laravel\\" : "app/Providers/" // 追加
        }
    },


    "extra": {
        "laravel": {
            "dont-discover": [],
            "providers": [
                "Laravel\\Laravel\\HogeServiceProvider"
            ]
        }
    },
[/code]

$ php artisan make:provider HogeServiceProvider
app/Providers/HogeServiceProvider.php

namespace Laravel\Laravel; // 修正
use Illuminate\Support\ServiceProvider;

class HogeServiceProvider extends ServiceProvider
{
    public function register()
    {}
    public function boot()
    {
        //
        dump("What's up Laravel!");
    }
}

composer.json

"repositories": [
        {
            "type": "path",
            "url" : "packages/username/hoge",
            "symlink": true
        }
    ],
    "require": {
        // 省略
        "hpscript/hoge": "dev-master"
    },

$ composer update

[RuntimeException]
The `url` supplied for the path (packages/username/hoge) repository does not exist

うーん、なんかちゃうな。。
packageの作り方を良く理解してないようだ。