* 'master' of github.com:yiisoft/yii2: typo fixed extension list file location. doc fix. moved extension list under yiisoft. updated read me. updated license information. reorganized extension directories. Adjusted jui directories. moved mutex back from extensions. Changed the exit status to normal. Specify the exact type of the exception. Small typos PhpDoc comment Missing return statement Changed php-diff dependency to use code from master (they haven't tagged changes we need yet) Added ability to get all GET, POST, PUT, DELETE or PATCH parameters to Request Add batchInsert method to yii\db\Migration Fixes #1117: added support to map a single view directory to multiple themed view directories. Fixes #1116.tags/2.0.0-beta
@ -1,44 +1,65 @@
|
||||
Yii 2.0 Public Preview - Composer Installer |
||||
=========================================== |
||||
|
||||
Thank you for choosing Yii - a high-performance component-based PHP framework. |
||||
|
||||
If you are looking for a production-ready PHP framework, please use |
||||
[Yii v1.1](https://github.com/yiisoft/yii). |
||||
|
||||
Yii 2.0 is still under heavy development. We may make significant changes |
||||
without prior notices. **Yii 2.0 is not ready for production use yet.** |
||||
Yii 2 Composer Installer |
||||
======================== |
||||
|
||||
[![Build Status](https://secure.travis-ci.org/yiisoft/yii2.png)](http://travis-ci.org/yiisoft/yii2) |
||||
|
||||
This is the yii2 composer installer. |
||||
This is the composer installer for Yii 2 extensions. It implements a new composer package type named `yii2-extension`, |
||||
which should be used by all Yii 2 extensions if they are distributed as composer packages. |
||||
|
||||
|
||||
Installation |
||||
------------ |
||||
Usage |
||||
----- |
||||
|
||||
This extension offers you enhanced Composer handling for your yii2-project. It will therefore require you to use Composer. |
||||
To use Yii 2 composer installer, simply set `type` to be `yii2-extension` in your `composer.json`, |
||||
like the following: |
||||
|
||||
```json |
||||
{ |
||||
"type": "yii2-extension", |
||||
"require": { |
||||
"yiisoft/yii2": "*" |
||||
}, |
||||
... |
||||
} |
||||
``` |
||||
php composer.phar require yiisoft/yii2-composer "*" |
||||
``` |
||||
|
||||
*Note: You might have to run `php composer.phar selfupdate` before using this extension.* |
||||
|
||||
|
||||
Usage & Documentation |
||||
--------------------- |
||||
|
||||
This extension allows you to hook to certain composer events and automate preparing your Yii2 application for further usage. |
||||
|
||||
After the package is installed, the `composer.json` file has to be modified to enable this extension. |
||||
|
||||
To see it in action take a look at the example apps in the repository: |
||||
|
||||
- [Basic](https://github.com/suralc/yii2/blob/master/apps/basic/composer.json#L27) |
||||
- [Advanced](https://github.com/suralc/yii2/blob/extensions-readme/apps/advanced/composer.json) |
||||
|
||||
However it might be useful to read through the official composer [documentation](http://getcomposer.org/doc/articles/scripts.md) |
||||
to understand what this extension can do for you and what it can't. |
||||
You may specify a bootstrap class in the `extra` section. The `init()` method of the class will be executed each time |
||||
the Yii 2 application is responding to a request. For example, |
||||
|
||||
```json |
||||
{ |
||||
"type": "yii2-extension", |
||||
..., |
||||
"extra": { |
||||
"bootstrap": "yii\\jui\\Extension" |
||||
} |
||||
} |
||||
``` |
||||
|
||||
You can also use this as a template to create your own composer additions to ease development and deployment of your app. |
||||
The `Installer` class also implements a static method `setPermission()` that can be called after |
||||
a Yii 2 projected is installed, through the `post-create-project-cmd` composer script. |
||||
The method will set specified directories or files to be writable or executable, depending on |
||||
the corresponding parameters set in the `extra` section of the `composer.json` file. |
||||
For example, |
||||
|
||||
```json |
||||
{ |
||||
"name": "yiisoft/yii2-app-basic", |
||||
"type": "project", |
||||
... |
||||
"scripts": { |
||||
"post-create-project-cmd": [ |
||||
"yii\\composer\\Installer::setPermission" |
||||
] |
||||
}, |
||||
"extra": { |
||||
"writable": [ |
||||
"runtime", |
||||
"web/assets" |
||||
], |
||||
"executable": [ |
||||
"yii" |
||||
] |
||||
} |
||||
} |
||||
``` |
||||
|
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 212 B After Width: | Height: | Size: 212 B |
Before Width: | Height: | Size: 208 B After Width: | Height: | Size: 208 B |
Before Width: | Height: | Size: 335 B After Width: | Height: | Size: 335 B |
Before Width: | Height: | Size: 207 B After Width: | Height: | Size: 207 B |
Before Width: | Height: | Size: 262 B After Width: | Height: | Size: 262 B |
Before Width: | Height: | Size: 262 B After Width: | Height: | Size: 262 B |
Before Width: | Height: | Size: 332 B After Width: | Height: | Size: 332 B |
Before Width: | Height: | Size: 280 B After Width: | Height: | Size: 280 B |
Before Width: | Height: | Size: 6.8 KiB After Width: | Height: | Size: 6.8 KiB |
Before Width: | Height: | Size: 4.4 KiB After Width: | Height: | Size: 4.4 KiB |
Before Width: | Height: | Size: 6.8 KiB After Width: | Height: | Size: 6.8 KiB |
Before Width: | Height: | Size: 6.8 KiB After Width: | Height: | Size: 6.8 KiB |
Before Width: | Height: | Size: 4.4 KiB After Width: | Height: | Size: 4.4 KiB |
@ -1,32 +0,0 @@
|
||||
The Yii framework is free software. It is released under the terms of |
||||
the following BSD License. |
||||
|
||||
Copyright © 2008-2013 by Yii Software LLC (http://www.yiisoft.com) |
||||
All rights reserved. |
||||
|
||||
Redistribution and use in source and binary forms, with or without |
||||
modification, are permitted provided that the following conditions |
||||
are met: |
||||
|
||||
* Redistributions of source code must retain the above copyright |
||||
notice, this list of conditions and the following disclaimer. |
||||
* Redistributions in binary form must reproduce the above copyright |
||||
notice, this list of conditions and the following disclaimer in |
||||
the documentation and/or other materials provided with the |
||||
distribution. |
||||
* Neither the name of Yii Software LLC nor the names of its |
||||
contributors may be used to endorse or promote products derived |
||||
from this software without specific prior written permission. |
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
||||
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS |
||||
FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE |
||||
COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, |
||||
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, |
||||
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; |
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER |
||||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT |
||||
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN |
||||
ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE |
||||
POSSIBILITY OF SUCH DAMAGE. |