yiisoft / yii-runner
Yii application runner
Fund package maintenance!
Opencollective
yiisoft
Installs: 58 628
Dependents: 7
Suggesters: 0
Security: 0
Stars: 11
Watchers: 12
Forks: 3
Open Issues: 6
Requires
- php: ^8.0
- psr/container: ^1.0|^2.0
- yiisoft/config: ^1.1
- yiisoft/definitions: ^1.0|^2.0|^3.0
- yiisoft/di: ^1.0
- yiisoft/yii-event: ^2.0
Requires (Dev)
- maglnet/composer-require-checker: ^4.2
- phpunit/phpunit: ^9.5
- rector/rector: ^0.15.3
- roave/infection-static-analysis-plugin: ^1.20
- spatie/phpunit-watcher: ^1.23
- vimeo/psalm: ^4.30|^5.4
- yiisoft/test-support: ^3.0
Suggests
- yiisoft/yii-runner-console: Allows to run console application
- yiisoft/yii-runner-http: Allows to run HTTP application
- yiisoft/yii-runner-roadrunner: Allows to run HTTP application for RoadRunner
This package is auto-updated.
Last update: 2023-02-24 07:28:32 UTC
README
Yii application runner
The package defines Yii application runner. A runner hides application initialization details making configuration process easier.
Requirements
- PHP 8.0 or higher.
Installation
The package could be installed with composer:
composer require yiisoft/yii-runner
General usage
Install one of the adapters:
Instantiate and run it in an entry script:
<?php declare(strict_types=1); use Yiisoft\Yii\Runner\Http\HttpApplicationRunner; require_once __DIR__ . '/autoload.php'; (new HttpApplicationRunner( rootPath: __DIR__, debug: $_ENV['YII_DEBUG'], environment: $_ENV['YII_ENV'] ))->run();
Testing
Unit testing
The package is tested with PHPUnit. To run tests:
./vendor/bin/phpunit
Mutation testing
The package tests are checked with Infection mutation framework with Infection Static Analysis Plugin. To run it:
./vendor/bin/roave-infection-static-analysis-plugin
Static analysis
The code is statically analyzed with Psalm. To run static analysis:
./vendor/bin/psalm
License
The Yii Runner is free software. It is released under the terms of the BSD License.
Please see LICENSE
for more information.
Maintained by Yii Software.