Skip to content

[NFR]: make:provider in an ADR project with a database: print only the provide() line #81

Closed

Description

@niden

In an ADR project, crest make:provider <name> prints a whole registerProviders() override for the front controller. A project from crest new --database already has this override, for DbProvider. When the user pastes the printed method, PHP stops with "cannot redeclare". Today only the docs ("The database") tell the user to add only the provide() line.

Scope

  • make:provider in an ADR project: when the front controller already overrides registerProviders(), the guidance prints only the provide() line to add to that method.
  • When the front controller has no override, the guidance stays as it is.
  • Docs: change the note in "The database" to match.

Open

  • How crest finds the override in the front controller.
  • What crest prints when it cannot read the front controller.

Done when

  • In a project from crest new --flavor=adr --database=sqlite, crest make:provider Mail prints only the provide() line.
  • In a project from crest new --flavor=adr with no database, it prints the whole override, as today.

Follow-up of #54.

Activity

  1. self-assigned this
    on Nov 21, 2026
  2. added
    enhancement
    on Nov 21, 2026
  3. added theissue type on Nov 21, 2026
  4. added 3 commits that reference this issue on Nov 22, 2026
  5. niden commented on Nov 22, 2026

    @niden
    SponsorMemberAuthor

    Resolved in #89

  6. moved this from Backlog to Implemented in Phalcon v5on Nov 22, 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