Skip to content

fix(frameworks): make a create command scaffold the major its definition is for #41

Description

@geodro

Picking an older major and getting the current release is a question that was answered and then ignored. lerd new asks which major to scaffold, resolves that major's definition, and hands its create command to composer, but every definition in the store carries the same unconstrained command. laravel/10.yaml, 11.yaml, 12.yaml and 13.yaml all say composer create-project --no-install --no-plugins --no-scripts laravel/laravel, so composer resolves the newest release whatever the answer was, and scaffolding Laravel 11 lands a Laravel 13 project. Symfony and CakePHP publish the same command across their majors too, so it is the whole store rather than one framework.

The definition the major selects still does real work, it decides the PHP range the scaffold runs under and the workers, env wiring and setup commands the project ends up with, which is why the mismatch is quiet: the site is configured as an 11 and the code on disk is a 13.

The fix belongs in the store rather than in Go. A create command that names its own major, composer create-project laravel/laravel:^11.0, makes the answer mean what it says, and each definition already knows which major it is. Worth doing across every framework that publishes more than one major, since the question is offered for all of them.

This reaches the dashboard as well now that the site wizard offers the same framework and version question the terminal does.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions