Skip to content

[NFR]: MVC flavor #11

Closed
Closed

Description

@niden

Goal: the second flavor. Build an MVC application with crest, without writing the boilerplate by hand.

Flavor is a generator concern only. The console core never sees it. A command reads the flavor from crest.php in handle().

  • Flavor plumbing: Flavor::MVC default paths, namespaces, stub set
  • make:controller (devtools controller)
  • make:model from a live database schema (devtools model)
  • make:model --all (devtools all-models)
  • make:module (devtools module)
  • make:scaffold : model, controller and views from one table (devtools scaffold). Do this last.

make:model needs a database. Add database services to docker-compose.yml only then.

Rules (from the ADR generators)

  • A flavor can change the generated file, never the arguments. Different arguments means a different command.
  • No adapter classes. Stub::resolve($flavor, $name) already selects the stub.
  • Handlers are one command per flavor: make:action (ADR), make:controller (MVC), make:task (CLI).
  • Providers and middleware are flavor-scoped. MVC registers with DI, not with Phalcon\Container.

Also in this issue

  • Flavor guard on the ADR-only generators. Today make:responder in an MVC project fails with unknown path 'responder'. The message names a config key, not the real problem.
  • Move the command default path and command.stub to a set that all flavors share. A crest command is the same class in every flavor. It is in the ADR set now only because ADR is the only populated set.
  • crest init proposes the flavor from what the project has, and asks for it.
  • The path proposals of init use the default paths of that flavor. Until then init writes 'flavor' => 'adr'. [NFR]: Close the open items before the 1.0 release #42

Open

  • --template-engine=phtml|volt for the view stubs.
  • devtools model generation had 14 options: --namespace, --extends, --base-class, --abstract, --get-set, --camelize, --doc, --annotate, --mapcolumn, --relations, --fk, --schema, --excludefields, --output. Decide which stay. Do not port all of them.
  • devtools module generation had --config-type=ini|json|php|yaml.

Activity

  1. added
    enhancement
    on Sep 25, 2026
  2. self-assigned this
    on Sep 25, 2026
  3. added theissue type on Sep 25, 2026
  4. moved this from Backlog to In Progress in Phalcon v5on Oct 13, 2026
  5. niden commented on Nov 21, 2026

    @niden
    SponsorMemberAuthor

    Resolved

  6. moved this from In Progress to Implemented in Phalcon v5on Nov 21, 2026
  7. moved this from Implemented to Released in Phalcon v5on Nov 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancement

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions