Skip to content

T28 crest init - #37

Merged
niden merged 10 commits into
masterfrom
T28-crest-init
Oct 9, 2026
Merged

niden merged 10 commits into
masterfrom
T28-crest-init

Conversation

@niden

@niden niden commented Oct 9, 2026 •

Copy link
Copy Markdown
Member

Hello!

In raising this pull request, I confirm the following:

  • I have checked that another pull request for this purpose does not exist
  • I wrote some tests for this PR
  • composer test, composer cs and composer analyze all pass
  • I have created a PR for the documentation about this change, if user facing

  • Added init: writes crest.php for an existing project. It proposes the values that it finds (namespace, front controller, runtime) and asks for each one. #28
  • Added the global option --no-interaction (-n): ask no questions and use the default answers. #28
  • Added the runtime key to crest.php: host, or docker with a compose service. With docker, a global crest runs project commands with docker compose exec, except serve, which runs on the host. #28
  • Added questions to new for the values that no option gives (namespace, PHP, Phalcon, runtime). #28
  • Added the options --runtime=host|docker and --service to new: they answer the runtime questions. #28
  • Changed crest.php to required. The project root is the folder of the --config file, or of the nearest crest.php, for all commands, the hand-off, serve, up, down and install. Without it, crest says run 'crest init'. #28
  • Changed config:show: a value that crest.php does not state has the origin default. #28
  • Changed the hand-off: a project with crest.php that does not require crest gets the composer require --dev phalcon/crest hint. #28
  • Changed new: crest.php states every path and the runtime. #28
  • Changed install: it uses the service of the runtime key. #28
  • Changed the project-config stub: its placeholders are namespace, bootstrap, paths and runtime. bootstrap and paths give whole lines. A copy that was published before this change stops new and init; publish it again. #28
  • Reserved the global option --no-interaction (-n). A contributed command that declares either one fails when it runs. #28
  • Removed the inference of the namespace and paths from composer.json when there is no crest.php. #28

Thanks

niden added 5 commits October 9, 2026 08:26
Assisted-by: Claude Code
Assisted-by: Claude Code
Assisted-by: Claude Code
Assisted-by: Claude Code
Assisted-by: Claude Code
@niden
niden requested a review from Jeckerson October 9, 2026 14:23
@niden niden self-assigned this Oct 9, 2026
@niden niden added the enhancement New feature or request label Oct 9, 2026
@github-actions

This comment has been minimized.

niden added 5 commits October 9, 2026 11:38
Assisted-by: Claude Code
Assisted-by: Claude Code
Assisted-by: Claude Code
Assisted-by: Claude Code
@github-actions

This comment has been minimized.

@github-actions

github-actions Bot commented Oct 9, 2026

Copy link
Copy Markdown

Code Metrics Report

master (da80806) T28-crest-init (20f5c66) +/-
Coverage 99.1% 99.5% +0.3%
Test Execution Time 1s 2s +1s
Details
  |                     | master (da80806) | T28-crest-init (20f5c66) |  +/-  |
  |---------------------|------------------|--------------------------|-------|
+ | Coverage            |            99.1% |                    99.5% | +0.3% |
  |   Files             |               50 |                       56 |    +6 |
  |   Lines             |             1186 |                     1430 |  +244 |
+ |   Covered           |             1176 |                     1423 |  +247 |
- | Test Execution Time |               1s |                       2s |   +1s |

Code coverage of files in pull request scope (99.1% → 99.8%, patch 99.7%)

Files Coverage +/- Patch Coverage Status
src/ADR/PhalconRouterResolver.php 87.5% +23.8% 0.0% modified
src/Command/ComposeCommand.php 100.0% 0.0% 100.0% modified
src/Command/Config/ShowCommand.php 100.0% 0.0% 100.0% modified
src/Command/InitCommand.php 100.0% +100.0% 100.0% added
src/Command/InstallCommand.php 100.0% 0.0% 100.0% modified
src/Command/NewCommand.php 100.0% 0.0% 100.0% modified
src/Command/Questions.php 100.0% +100.0% 100.0% added
src/Command/ServeCommand.php 100.0% 0.0% 100.0% modified
src/Commands.php 100.0% 0.0% 100.0% modified
src/Console/Kernel.php 100.0% 0.0% 100.0% modified
src/Console/Output.php 100.0% 0.0% 100.0% modified
src/HandOff.php 100.0% 0.0% 100.0% modified
src/Project/Config.php 100.0% 0.0% 100.0% modified
src/Project/Locator.php 100.0% 0.0% 100.0% modified
src/Project/Manifest.php 100.0% +100.0% 100.0% added
src/Project/Runtime.php 100.0% +100.0% 100.0% added
src/Project/Settings.php 100.0% +100.0% 100.0% added
src/Project/Survey.php 100.0% +100.0% 100.0% added

Reported by octocov

@niden
niden merged commit d31715e into master Oct 9, 2026
24 checks passed
@niden
niden deleted the T28-crest-init branch October 9, 2026 20:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant