Skip to content

feat: boot the orchestrated application outside PHPUnit - #10777

Open
paulbalandan wants to merge 1 commit into
codeigniter4:4.8from
paulbalandan:orchestrator-console-boot
Open

paulbalandan wants to merge 1 commit into
codeigniter4:4.8from
paulbalandan:orchestrator-console-boot

Conversation

@paulbalandan

Copy link
Copy Markdown
Member

Description
A package that is not run through PHPUnit, such as a script or a static analysis bootstrap file, cannot use framework functions like env() or service(), because only boot() loads a framework bootstrap, and that one is the test bootstrap. This follows up on #10727.

New changes:

  • bootConsole() boots the framework in the current process through system/util_bootstrap.php. It uses a skeleton of its own, build/orchestrator-console by default, so it does not share one with a running test suite. The skeleton is built only when it is missing or incomplete, and bootConsole(rebuild: true) rebuilds it. build() writes a completion marker as its last step, so a build that was killed is redone.
  • boot() throws when called after bootConsole() on the same instance.
  • getPathConstants() returns the constants that boot() defines, and getFrameworkPath() is now public, so a caller can load another bootstrap file against the skeleton without rebuilding them.
  • getPath() is now final. A subclass overrides the new getSkeletonPath() instead, and getPath() appends -console and the ORCHESTRATOR_TEST_TOKEN or TEST_TOKEN suffix to it.
  • util_bootstrap.php guards VENDORPATH and COMPOSER_PATH with defined(), like the other constants, so that a caller can define them first.

Checklist:

  • Securely signed commits
  • Component(s) with PHPDoc blocks, only if necessary or adds value (without duplication)
  • Unit testing, with >80% coverage
  • User guide updated
  • Conforms to style guide

@carson-codeigniter4 carson-codeigniter4 Bot added the 4.8 PRs that target the `4.8` branch. label Nov 18, 2026
@paulbalandan
paulbalandan force-pushed the orchestrator-console-boot branch 3 times, most recently from d95f99e to f346be7 Compare November 18, 2026 07:24
@paulbalandan
paulbalandan force-pushed the orchestrator-console-boot branch from f346be7 to e1e6b88 Compare November 18, 2026 07:27

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

4.8 PRs that target the `4.8` branch.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant