About yii-2 framework-Install with composer windows

Yii2
What is Yii Best for?

-Yii is a generic Web programming framework, meaning that it can be used for developing all kinds of Web applications using PHP. Because of its component-based architecture and sophisticated caching support, it is especially suitable for developing large-scale applications such as portals, forums, content management systems (CMS), e-commerce projects, RESTful Web services, and so on.

-How does Yii Compare with Other Frameworks?

-If you're already familiar with another framework, you may appreciate knowing how Yii compares:

-Like most PHP frameworks, Yii implements the MVC (Model-View-Controller) architectural pattern and promotes code organization based on that pattern.

-Yii takes the philosophy that code should be written in a simple yet elegant way. Yii will never try to over-design things mainly for the purpose of strictly following some design pattern.

-Yii is a full-stack framework providing many proven and ready-to-use features: query builders and ActiveRecord for both relational and NoSQL databases; RESTful API development support; multi-tier caching support; and more.

-Yii is extremely extensible. You can customize or replace nearly every piece of the core's code. You can also take advantage of Yii's solid extension architecture to use or develop redistributable extensions.

-High performance is always a primary goal of Yii.

--Requirements and Prerequisites

-Yii 2.0 requires PHP 5.4.0 or above. You can find more detailed requirements for individual features by running the requirement checker included in every Yii release.

-Using Yii requires basic knowledge of object-oriented programming (OOP), as Yii is a pure OOP-based framework. Yii 2.0 also makes use of the latest features of PHP, such as namespaces and traits. Understanding these concepts will help you more easily pick up Yii 2.0.

How to install yii-2 using composer follow below step for windows operating system

-Open Command prompt.

-Set Path of you php (Eg. D:\xampp\php\)

-php -r "eval('?>;'.file_get_contents('https://getcomposer.org/installer'));"

-After install create file composer.bat inside (D:\xampp\php\) put below code.

-@ECHO OFF

-SET SUBDIR=%~dp0

-php %SUBDIR%\composer.phar %*

-Now your composer is configure successfully type command to check version and commands: composer.

-Now install yii2-framework using composer type below command on your project directory path.

-(Eg. D:\xampp\htdocs\)

-composer create-project yiisoft/yii2-app-advanced advanced 2.0.8

-If you found below error.
Problem 1
    - yiisoft/yii2 2.0.8 requires bower-asset/jquery 2.2.*@stable | 2.1.*@stable | 1.11.*@stable -> no matching package found.
    - yiisoft/yii2 2.0.7 requires bower-asset/jquery 2.2.*@stable | 2.1.*@stable | 1.11.*@stable -> no matching package found.
    - yiisoft/yii2 2.0.6 requires bower-asset/jquery 2.1.*@stable | 1.11.*@stable -> no matching package found.
    - Installation request for yiisoft/yii2 >=2.0.6 -> satisfiable by yiisoft/yii2[2.0.6, 2.0.7, 2.0.8].
-Potential causes:
-A typo in the package name
-The package is not available in a stable-enough version according to your minimum-stability setting
   see  for more details.

-Type the below command.
-composer global require "fxp/composer-asset-plugin:~1.1.1"

-Try to install again.

-composer create-project yiisoft/yii2-app-advanced advanced 2.0.8

-If ask for github account token copy and paste your github token from github account.

-Now your Yii-2 framework install successful.

-You you can see advanced folder inside your htdocs.

1 comment:

  1. Thanks. This post is very informative and interesting.all the points are very useful. Thanks for sharing such a nice post.

    also read
    Yii Web App development Company

    ReplyDelete

Powered by Blogger.