Backend Development
PHP Tutorial
How to install Yii framework using Composer, composer installation yii framework_PHP tutorial
How to install Yii framework using Composer, composer installation yii framework_PHP tutorial
How to use Composer to install the Yii framework, composer to install the yii framework
The example in this article describes how to use Composer to install the Yii framework. Share it with everyone for your reference, the details are as follows:
It is now popular to use Composer to install PHP frameworks. Composer is a tool used by PHP to manage dependencies. Frameworks or services such as Yii, Laravel, Qiniu, etc. all use Composer as the preferred tool for installation.
The following is an example of downloading and installing the Yii framework to learn how to use Composer to install the PHP framework:
First go to Composer to download and install this tool.
Install Yii via Composer
This is the preferred method to install Yii2.0. If you don't have Composer installed yet, you can follow the instructions here to install it.
After installing Composer, run the following command to install the Composer Asset plug-in:
Copy code The code is as follows: php composer.phar global require "fxp/composer-asset-plugin:1.0.0"
Now select one of the application templates to start installing Yii 2.0. An application template is a package containing a skeleton web application written in Yii.
To install the basic application template, run the following command:
Copy code The code is as follows: php composer.phar create-project yiisoft/yii2-app-basic basic 2.0.4
To install the advanced application template, run the following command:
Copy code The code is as follows: php composer.phar create-project yiisoft/yii2-app-advanced advanced 2.0.4
Please note that you may be prompted to enter your GitHub username and password during the installation process. This is normal. Just enter them and continue.
Reprinted from: Xiaotan Blog http://www.tantengvip.com/2015/05/composer-php/
Readers who are interested in more Yii-related content can check out the special topics on this site: "Introduction to Yii Framework and Summary of Common Techniques", "Summary of Excellent PHP Development Framework", "Basic Tutorial for Getting Started with Smarty Templates", "php Date and Time" Usage Summary", "php object-oriented programming introductory tutorial", "php string (string) usage summary", "php mysql database operation introductory tutorial" and "php common database operation skills summary"
I hope this article will be helpful to everyone’s PHP program design based on the Yii framework.
Articles you may be interested in:
- PHP YII framework development tips: rules custom validation rules in models (models)
- Nginx configures PHP's Yii and CakePHP framework Examples of rewrite rules
- Yii's method of using the migrate command to execute sql statements
- YII Framework uses YIIC to quickly create YII applications. Detailed explanation of migrate usage examples
- YII Framework tutorial Detailed explanation of using YIIC to quickly create YII applications
- YII Framework tutorial’s internationalization implementation method
- YII Framework tutorial’s detailed explanation of cache usage
- YII Framework tutorial’s detailed explanation of security solutions
- Detailed explanation of log usage in YII Framework tutorial
- Detailed explanation of exception handling in YII Framework tutorial
- Examples of common rules in Yii rules
Hot AI Tools
Undress AI Tool
Undress images for free
AI Clothes Remover
Online AI tool for removing clothes from photos.
Undresser.AI Undress
AI-powered app for creating realistic nude photos
ArtGPT
AI image generator for creative art from text prompts.
Stock Market GPT
AI powered investment research for smarter decisions
Hot Article
Popular tool
Notepad++7.3.1
Easy-to-use and free code editor
SublimeText3 Chinese version
Chinese version, very easy to use
Zend Studio 13.0.1
Powerful PHP integrated development environment
Dreamweaver CS6
Visual web development tools
SublimeText3 Mac version
God-level code editing software (SublimeText3)
Hot Topics
20528
7
13637
4
How to generate QR code for PHP dynamic website development_PHP dynamic website QR code generation method [Tutorial]
Feb 04, 2026 am 10:48 AM
The most trouble-free PHP solution for dynamically generating QR codes is to use endroid/qr-code: it supports PHP7.4, PNG/SVG output, logo addition, color adjustment, and fault tolerance. It does not rely on GD (fallback compatible). Chinese requires UTF-8 encoding with high error correction or urlencode. WriteString() can be used in web pages to directly output image streams.
How to install dev development dependencies in Composer_Composer --dev parameter usage [Instructions]
Feb 05, 2026 pm 11:57 PM
--dev must be added, otherwise the package will be written to the require field, resulting in missing online --no-dev; --dev is written to require-dev, which is installed by default, and --no-dev is completely ignored; temporary enablement requires composerinstall --dev and the dependency exists in composer.json.
How to install ThinkPHP with composer_Steps to deploy TP framework using composer
Feb 12, 2026 am 06:27 AM
The ThinkPHP stable version should be clearly specified, such as using composercreate-projecttopthink/thinktp6^6.3 to install the TP6.3LTS version to avoid pulling non-production-ready beta versions because dev-master has switched to the TP8 preview version.
How to install and configure the environment for Laravel_Steps to quickly build a development environment for Laravel [Basics]
Feb 06, 2026 am 06:45 AM
The main reason why the Laravel project fails to start is that the PHP version/extension is not up to standard, the Web server configuration is incorrect, or the .env does not take effect; it is necessary to confirm that PHP ≥ 8.1 and enable extensions such as mbstring, DocumentRoot points to the public directory, and execute key:generate and config:clear.
Composer prompts that you need to enter Token_Solve Composer GitHub authorization problem [Avoid pits]
Feb 05, 2026 pm 11:18 PM
Composer requires the input of GitHubToken because GitHub will abandon password authentication starting in August 2021. Unauthenticated access to the API will trigger current limiting or denial. PersonalAccessToken needs to be configured and set through composerconfig-ggithub-oauth.github.com.
What is the use of Composer lock file_Analysis of the difference between Composer.lock and json [Popular Science]
Feb 05, 2026 pm 11:36 PM
composer.lock is an accurate snapshot of dependencies and must be submitted to Git; it records the exact version, hash value and complete dependency tree of each package, ensuring that composerinstall installs exactly the same dependencies in all environments, avoiding compatibility issues caused by version fluctuations.
Composer reports error recursion limit_Solution to Composer dependency level is too deep [Plan]
Feb 05, 2026 pm 11:06 PM
The "recursionlimitexceeded" error reported by Composer is a protection mechanism triggered by its dependency parser to prevent infinite recursion. The main reason is that there are circular references or too deep nesting in the dependency graph, which is common in require-dev loose constraints, path warehouse implicit cycles, and dev branch version testing.
How Composer synchronizes local and remote dependencies_Detailed explanation of Composer update strategy [Experience]
Feb 05, 2026 pm 11:30 PM
composerupdate will rewrite composer.lock and recalculate the dependency tree according to the rules instead of synchronizing the remote state; you should use install to restore the environment first, and use update with caution to avoid unmeasured changes.





