Skip to content

Add starter kit detection - #71

Merged
pushpak1300 merged 3 commits into
1.xfrom
starter-kit-detection
Aug 31, 2026
Merged

pushpak1300 merged 3 commits into
1.xfrom
starter-kit-detection

Conversation

@pushpak1300

@pushpak1300 pushpak1300 commented Aug 31, 2026 •

Copy link
Copy Markdown
Member

There is currently no way to tell which starter kit a project was built from. Roster reports packages, stacks, frontends, agents, and editors, but a consumer that wants to behave differently for a given starter kit has nothing to read.

This adds starterKit(), which reads the kit a project declares in its root composer.json.

Starter kits declare themselves under extra.laravel.starter-kit:

composer.json:

{
    "extra": {
        "laravel": {
            "starter-kit": "vue-starter-kit"
        }
    }
}

Consumers read the declared string:

use Laravel\Roster\Facades\Project;

// The declared string, exactly as written in composer.json.
Project::starterKit(); // 'vue-starter-kit'

// Null when composer.json is missing, is malformed, has no declaration,
// or declares a value that is not a non-empty string.
Project::starterKit(); // null

@pushpak1300
pushpak1300 marked this pull request as ready for review August 31, 2026 11:37
Comment thread src/ProjectScan.php Resolved
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@pushpak1300
pushpak1300 merged commit c2fd592 into 1.x Aug 31, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants