Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
/appPublic template
generated fromyiisoft/package-template

Yii3 web application template

License

NotificationsYou must be signed in to change notification settings

yiisoft/app

Yii

Yii3 web application

An application template for a new web project


Latest Stable VersionTotal DownloadsBuild statusCode Coveragestatic analysistype-coverage

Home page

The package is a classic web application template. If you need console only or API please start with correspondingtemplates:

Requirements

  • PHP 8.2 or higher.

Installation

Local installation

If you do not haveComposer, you may install it by following the instructionsatgetcomposer.org.

Create a project:

composer create-project yiisoft/app myprojectcd myproject

To run the app:

APP_ENV=dev ./yii serve

Now you should be able to access the application through the URL printed to console.Usually it ishttp://localhost:8080.

Installation with Docker

Warning

Docker compose version 2.24 or above is required.

Fork the repository, clone it, then:

cd myprojectmake composer update

To run the app:

make up

To stop the app:

make down

The application is available athttps://localhost.

Other make commands are available in theMakefile and can be listed with:

makehelp

Directory structure

The application template has the following structure:

assets/                 Asset bundle source files.config/                 Configuration files.    common/             Common configuration and DI definitions.    console/            Console-specific configuration.    environments/       Environment-specific configuration (dev/test/prod).    web/                Web-specific configuration.docker/                 Docker-specific files.public/                 Files publically accessible from the Internet.    assets/             Published/compiled assets.    index.php           Entry script.runtime/                Files generated during runtime.src/                    Application source code.    Console/            Console commands.    Shared/             Code shared between web and console applications.    Web/                Web-specific code (actions, handlers, layout).        Shared/         Shared web components.            Layout/     Layout components and templates.    Environment.php     Environment configuration class.tests/                  A set of Codeception tests for the application.    Console/            Console command tests.    Functional/         Functional tests.    Unit/               Unit tests.    Web/                Web actions tests.vendor/                 Installed Composer packages.Makefile                Config for make command.yii                     Console application entry point.

Testing

The template comes with ready to useCodeception configuration.To execute tests, in local installation run:

./vendor/bin/codecept buildAPP_ENV=test ./yii serve> ./runtime/yii.log2>&1&./vendor/bin/codecept run

For Docker:

make codecept buildmake codecept run

Static analysis

The code is statically analyzed withPsalm. To run static analysis:

./vendor/bin/psalm

or, using Docker:

make psalm

Support

If you need help or have a question, check outYii Community Resources.

License

The Yii3 web application template is free software. It is released under the terms of the BSD License.Please seeLICENSE for more information.

Maintained byYii Software.

Support the project

Open Collective

Follow updates

Official websiteTwitterTelegramFacebookSlack


[8]ページ先頭

©2009-2025 Movatter.jp