wubinworks / app-bootstrap
Wubinworks App Bootstrap. This package is a component of Wubinworks App and utilizes the PHP-DI's container.
Package info
github.com/wubinworks/app-bootstrap
Type:wubinworks-app-bootstrap
pkg:composer/wubinworks/app-bootstrap
Requires
- monolog/monolog: ^2.11.0 || ^3.0
- php-di/php-di: ^6.3.5 || ^7.0
- wubinworks/magic-object: ^1.0.1
- wubinworks/php-di-code-generator: ^1.0
Requires (Dev)
- phpunit/phpunit: >=8.5.52
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
- PHP >= 7.2
- php-di/php-di >= 6.3.5
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!