Skip to content

[NFR]: Handoff to crest local #27

Closed
Closed

Description

@niden

There are two install roles:

  • Global (composer global require phalcon/crest): runs new, up, down and install. These commands need no project.
  • Per project (require --dev phalcon/crest, run as vendor/bin/crest): runs the project commands, such as make:*, route:list and container:list. They need the project's autoloader and the project's Phalcon, which a global crest cannot load.

The hand-off connects the two roles. When you type crest make:action ... in a project with the global crest, the global crest finds the project's vendor/bin/crest and runs it with the same arguments. It then returns that exit code. You type crest everywhere, and the correct crest runs.

In code, it needs these parts:

  1. Find the project: search up from the working directory (or --directory) and look for vendor/bin/crest.
  2. Sort the commands: decide which are host commands (the global crest runs them) and which are project commands (it passes them on).
  3. Pass the command on: run the project crest with the same arguments and terminal, much as ShellRunner does now.
  4. Stop loops: if the running crest is already the project's crest, it must not pass the command to itself.
  5. Give a clear error: if there is no project crest, tell the user to run composer install or add phalcon/crest as a dev dependency.
  6. Update the docs: they must stop telling users to type vendor/bin/crest.

Activity

  1. self-assigned this
    on Sep 26, 2026
  2. added
    enhancement
    on Sep 26, 2026
  3. added theissue type on Sep 26, 2026
  4. niden commented on Sep 28, 2026

    @niden
    SponsorMemberAuthor

    Resolved in #35

  5. moved this from Implemented to Released in Phalcon v5on Oct 13, 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