wubinworks/app-bootstrap

Wubinworks App Bootstrap. This package is a component of Wubinworks App and utilizes the PHP-DI's container.

Maintainers

Package info

github.com/wubinworks/app-bootstrap

Homepage

Chat

Type:wubinworks-app-bootstrap

pkg:composer/wubinworks/app-bootstrap

Transparency log

Statistics

Installs: 1

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

1.0.0 2026-07-28 07:38 UTC

This package is not auto-updated.

Last update: 2026-07-29 06:40:11 UTC


README

(*)Note this package is a component(hard dependency) of Wubinworks App(currently Wubinworks Console App only) and utilizes the PHP-DI's container.

As this package name suggests, its main feature is to create the PHP-DI's container(PSR-11) and launch the AppInterface.

Requirements

Usage

\Wubinworks\AppBootstrap\AppInterface

All App types, such as HTTP, WebAPI, CLI, should implement this interface.

\Wubinworks\AppBootstrap\Container\ContainerInstanceHelper

A helper to get the \DI\Container instance statically.

You should stick with injecting \Psr\Container\ContainerInterface or \DI\Container. Use this class only if you cannot inject them or for debugging/testing purpose.

Injectable dependencies

\Wubinworks\AppBootstrap\App\Bootstrap

For creating PHP-DI's container. The PHP-DI's container can only be created once, so actually, this dependency is useless.

\Wubinworks\AppBootstrap\App\Bootstrap\ExtensionManager

For getting extensions by status. Status can be string enabled disabled or all.

Extensions are sorted by sortOrder in descending order. The smaller sortOrder, the higher priority, which means extension with smaller sortOrder can override extension with bigger sortOrder.

\Wubinworks\AppBootstrap\App\Bootstrap\State

For getting App state.

  • Check whether developer mode is enabled
  • Check whether container compilation is enabled

\Wubinworks\AppBootstrap\App\Config\Env

For getting the merged user environment configuration.

Read/merge environment configuration in this order:

  • <Project Root>/env-shared.php
  • <Project Root>/env.php

If you like this package or this package helped you, please share and give a ★☆star☆★, it's NOT hard!