Yii3 Web 应用程序模板
Yii3 web application
An application template for a new web project The package is a classic web application template. If you need console only or API please start with corresponding templates:
If you do not have Composer, you may install it by following the instructions at getcomposer.org.
Create a project:
composer create-project yiisoft/app myproject
cd myproject[!NOTE] Ensure that Composer is executed with the same PHP version that will be used to run the application.
Copy the example environment file and adjust as needed:
cp .env.example .envTo run the app:
./yii serveNow you should be able to access the application through the URL printed to console.
Usually it is http://localhost:8080.
[!TIP] The
.envfile is for local development only and is excluded from version control. In production, configure environment variables via your server or container instead.
[!WARNING] Docker compose version 2.24 or above is required.
Fork the repository, clone it, then:
cd myproject
make composer updateTo run the app:
make upTo open the running app in your default browser:
make openTo stop the app:
make downThe application is available at http://localhost.
Other make commands are available in the Makefile and can be listed with:
make helpThe application template has the following structure:
…The template comes with ready to use Codeception configuration. To execute tests, in local installation run:
./vendor/bin/codecept build
APP_ENV=test ./yii serve > ./runtime/yii.log 2>&1 &
./vendor/bin/codecept runFor Docker:
make codecept build
make codecept runThe code is statically analyzed with Psalm. To run static analysis:
./vendor/bin/psalmor, using Docker:
make psalmIf you need help or have a question, check out Yii Community Resources.
The Yii3 web application template is free software. It is released under the terms of the BSD License.
Please see LICENSE for more information.
Maintained by Yii Software.
暂无开放 Issues,或尚未同步最近议题。