Skip to content

[NFR]: Close the open items before the 1.0 release #42

Closed

Description

@niden

Goal: fix all the items that earlier work left open, before the 1.0 release. After this issue, no known item stays open, except the items that wait for other issues (#11, #13, #14).

The generated docker project

  • docker compose down (also crest down and ./crest down) waits 10 seconds. php -S is PID 1 in the container and does not stop on SIGTERM, so docker kills it after the timeout.
  • Commands that run in the container print container paths, not host paths. For example, make:action prints Created /srv/src/Action/.... The docker hand-off of a global crest does the same.

The one-line setup (resources/setup.sh)

  • The errors of crest new show the path in the one-off container, for example /app/my-app exists and is not empty.
  • curl ... | sh -s -- my-app --help gives sed: can't read my-app/.env, exit status 2, and no help. new writes its usage to stdout, and the script hides stdout.
  • When ./crest up or ./crest install fails (for example, port 8080 is in use), the script gives no hint to continue (cd my-app, ./crest up, ./crest install).
  • The README does not show how to use another port: curl ... | APP_PORT=9000 sh -s -- my-app.
  • With rootless docker (user namespaces), chown -R to the host user and group can give the project to a subordinate UID. Check this, then fix it or document it.
  • README: "The project goes into the working directory" can be read two ways. Change it to "into the folder <name> in the working directory".
  • SetupScriptTest::testBashRunsTheSetup: the comment says that /bin/sh is bash on Fedora and macOS, but the test runs bash in its default mode. Correct the comment.
  • Add a test for a run with a terminal on stdin. util-linux script -qec ... /dev/null can do this. It is in the development container and on the Ubuntu runners.

crest init

  • Propose each path from the folder that exists in the project, else the default, and ask for each path. An empty answer accepts the proposal, and --no-interaction accepts all of them. Today init moves the default paths into the psr-4 folder, and does not check that the folders exist.
  • When init proposes a front controller, the user cannot choose none: an empty answer accepts the proposal.
  • When the user gives a different namespace, the front controller proposal keeps the namespace that init found.
  • When the input ends during a question, the error no answer; input ended shows on the same line as the question. Write a new line before the error.

crest.php and config:show

  • With 'runtime' => ['type' => 'host', 'service' => '...'], crest ignores the service with no message, and crest install uses app. Use the service, or give an error.
  • A docker service in crest.php does not get the name check that new and init use.
  • config:show does not show bootstrap and runtime.

The hand-off with a custom vendor-dir or bin-dir (replaces #34)

  • A project with "config": {"vendor-dir": "lib"} (or a custom bin-dir) in composer.json gets the hand-off. Today it gets no hand-off, or the error "has no vendor/bin/crest".
  • The COMPOSER_VENDOR_DIR environment variable works too.
  • Start the crest of the project through the composer proxy (<bin-dir>/crest). If the hand-off runs <vendor-dir>/phalcon/crest/bin/crest directly, a symlinked path repository loads the autoloader of the dev checkout, and the hand-off loops.

Code, tests and tooling

  • Mutation testing: 3 mutants escape (MSI 99.84%). The rule is MSI 100. Kill each one with a test, or change the code:
    • src/Console/Kernel.php:123 (IncrementInteger): $tokens[0] in the --version check.
    • src/HandOff.php:202 (SpreadOneItem): ...$paths->rest in forContainer(), when the tokens name no command.
    • src/HandOff.php:273 (GreaterThan): the protocol compare in mismatch().
  • ServeCommandTest::testServeAgreesWithTheGeneratedContainer runs new without a chdir into the scratch folder. A mutant that ignores --directory can then write app/ into the repository.
  • ServeCommand: the class docblock has a bad line wrap ("the project's vendor/: the server runs").
  • resources/octocov.yml and resources/octocov.pr.yml: octocov skips the codeToTestRatio globs (../src/**/*.php, ../tests/**/*.php) with no message. Fix the globs.
  • .github/workflows/main.yml: the comment above the coverage job says "Infection runs locally for now (composer infection ...)". Infection is not in require-dev, so composer infection needs composer require --dev infection/infection first. Correct the comment.

Done when

  • All the items above are fixed, with a test for each code change.
  • composer cs, composer analyze, composer cs-fixer and the tests pass. Mutation testing gives MSI 100. Coverage does not drop.
  • The README, docs/index.md and CHANGELOG.md are updated.
  • The pull request closes [NFR]: Hand-off with a custom vendor-dir or bin-dir #34.

Activity

  1. self-assigned this
    on Oct 12, 2026
  2. added
    enhancement
    on Oct 12, 2026
  3. added theissue type on Oct 12, 2026
  4. niden commented on Oct 13, 2026

    @niden
    SponsorMemberAuthor

    Resolved in #43

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