Repository navigation
Closed
Labels
enhancementNew feature or request
Description
Summary
Add crest init. It asks a few questions and writes crest.php in the project. After this change, crest.php is required: it marks a crest project and holds the project settings.
Why
- Existing projects (for example
vokuro-adr) have nocrest.php. Today crest guesses the settings fromcomposer.jsonand the folders. - One root rule: the project root is the folder with the nearest
crest.php. The hand-off and the host commands (serve,up,down,install) use this rule. - The hand-off ([NFR]: Handoff to crest local #27) runs the project crest with the host PHP. A v5 project has ext-phalcon only in its container, so project commands fail on the host.
- Moving a devtools project to crest:
initis the entry point. It can read what the project already has, so that the move needs few or no manual steps.
Scope
crest init- Proposes a value for each question, from the project: namespace (psr-4 in
composer.json), flavor, paths (existing folders), front controller, runtime (docker-compose.ymland its service name). --no-interactionaccepts all the proposals (for CI).--forceoverwrites an existingcrest.php.- Writes
crest.phpwith the same stub thatnewuses. - If the project does not require
phalcon/crest, it printscomposer require --dev phalcon/crest. - Reads the settings of a devtools project where it can. New keys or options for this are allowed.
- Proposes a value for each question, from the project: namespace (psr-4 in
crest.phpis required for the project commands. Without it, crest stops withno crest.php found; run 'crest init'. The inference fromcomposer.json(Config::infer()) is removed.- A
runtimekey:host, ordockerwith the compose service. Withdocker, a global crest runs project commands asdocker compose exec <service> vendor/bin/crest ....newwrites this key.
Out of scope
Facts about the machine are not stored. Crest checks them each time it runs: is Phalcon loaded, does vendor/ exist, is docker installed. composer.json stays the source for autoload and the Phalcon variant.
Done when
crest initwrites a workingcrest.phpforvokuro-adrand for a project fromcrest new.- Without
crest.php, project commands stop with thecrest inithint. - The hand-off,
serve,up,downandinstallfind the root the same way. - With
runtimeset to docker,crest route:listworks on a host without ext-phalcon (v5 project). - The docs are updated.
Related: #27 (hand-off), #16 (docs and release), X02 (published API), E09 (retire devtools).
Metadata
Metadata
Assignees
Labels
enhancementNew feature or request
Type
Projects
- StatusShow more project fieldsReleased
Activity
niden commentedon Oct 9, 2026
Resolved in #37