forked from shanjie001/yii2
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 1468bd4
Showing
1,949 changed files
with
275,476 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Autodetect text files | ||
* text=auto | ||
|
||
# ...Unless the name matches the following overriding patterns | ||
|
||
# Definitively text files | ||
*.php text | ||
*.css text | ||
*.js text | ||
*.txt text | ||
*.md text | ||
*.xml text | ||
*.json text | ||
*.bat text | ||
*.sql text | ||
*.xml text | ||
*.yml text | ||
|
||
# Ensure those won't be messed up with | ||
*.png binary | ||
*.jpg binary | ||
*.gif binary | ||
*.ttf binary |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# phpstorm project files | ||
.idea | ||
|
||
# netbeans project files | ||
nbproject | ||
|
||
# zend studio for eclipse project files | ||
.buildpath | ||
.project | ||
.settings | ||
|
||
# windows thumbnail cache | ||
Thumbs.db | ||
|
||
# composer vendor dir | ||
/vendor | ||
# cubrid install dir | ||
/cubrid | ||
|
||
# composer itself is not needed | ||
composer.phar | ||
|
||
# composer.lock in applications is ignored since it's automatically created by composer when application is installed | ||
/apps/*/composer.lock | ||
|
||
# Mac DS_Store Files | ||
.DS_Store | ||
|
||
# phpunit itself is not needed | ||
phpunit.phar | ||
# local phpunit config | ||
/phpunit.xml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
imports: | ||
- php | ||
|
||
tools: | ||
external_code_coverage: | ||
timeout: 2100 # Timeout in seconds. | ||
# disable copy paste detector and similarity analyzer as they have no real value | ||
# and a huge bunch of false-positives | ||
php_sim: false | ||
php_cpd: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
language: php | ||
|
||
php: | ||
- 5.4 | ||
- 5.5 | ||
- 5.6 | ||
- hhvm | ||
- hhvm-nightly | ||
|
||
env: | ||
- CUBRID_VERSION=9.3.0/CUBRID-9.3.0.0206 CUBRID_PDO_VERSION=9.3.0.0001 | ||
|
||
# run build against hhvm but allow them to fail | ||
# http://docs.travis-ci.com/user/build-configuration/#Rows-That-are-Allowed-To-Fail | ||
matrix: | ||
fast_finish: true | ||
allow_failures: | ||
- php: hhvm-nightly | ||
|
||
services: | ||
- redis-server | ||
- memcached | ||
- elasticsearch | ||
- mongodb | ||
|
||
# faster builds on new travis setup not using sudo | ||
sudo: false | ||
|
||
# cache vendor dirs | ||
cache: | ||
directories: | ||
# - cubrid # caching cubrid breaks the build on a regular basis and has nearly no speedup | ||
- vendor | ||
- $HOME/.composer/cache | ||
|
||
# try running against postgres 9.3 | ||
addons: | ||
postgresql: "9.3" | ||
|
||
install: | ||
- travis_retry composer self-update && composer --version | ||
- travis_retry composer global require "fxp/composer-asset-plugin:1.0.0-beta4" | ||
- export PATH="$HOME/.composer/vendor/bin:$PATH" | ||
# core framework: | ||
- travis_retry composer install --prefer-dist --no-interaction | ||
- tests/unit/data/travis/mongodb-setup.sh | ||
# TODO: APC currently fails composer. https://github.com/composer/composer/issues/3405 | ||
# - tests/unit/data/travis/apc-setup.sh | ||
- tests/unit/data/travis/memcache-setup.sh | ||
- tests/unit/data/travis/cubrid-setup.sh | ||
# print elasticsearch version | ||
- curl http://localhost:9200 | ||
# codeception | ||
- travis_retry composer global require "codeception/codeception=2.0.*" "codeception/specify=*" "codeception/verify=*" | ||
# basic and advanced application: | ||
- tests/unit/data/travis/setup-apps.sh | ||
|
||
before_script: | ||
- echo 'elasticsearch version ' && curl http://localhost:9200/ | ||
- mysql -e 'CREATE DATABASE yiitest;'; | ||
- psql -U postgres -c 'CREATE DATABASE yiitest;'; | ||
- tests/unit/data/travis/sphinx-setup.sh | ||
- mongo yii2test --eval 'db.addUser("travis", "test");' | ||
# basic and advanced application: | ||
- tests/unit/data/travis/init-apps.sh | ||
|
||
script: | ||
- vendor/bin/phpunit --verbose --coverage-clover=coverage.clover --exclude-group mssql,oci,wincache,xcache,zenddata | ||
- | | ||
if (php --version | grep -i HipHop > /dev/null); then | ||
echo "Skipping basic application tests on HHVM" | ||
else | ||
cd apps/basic/web | ||
php -S localhost:8080 > /dev/null 2>&1 & | ||
cd ../tests | ||
codecept run | ||
fi | ||
- | | ||
if (php --version | grep -i HipHop > /dev/null); then | ||
echo "Skipping advanced application tests on HHVM" | ||
else | ||
cd apps/advanced | ||
php -S localhost:8080 > /dev/null 2>&1 & | ||
cd tests | ||
codecept run | ||
fi | ||
after_script: | ||
- cd ../../.. | ||
- travis_retry wget https://scrutinizer-ci.com/ocular.phar | ||
- php ocular.phar code-coverage:upload --format=php-clover coverage.clover |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
Contributing to Yii2 | ||
==================== | ||
|
||
- [Report an issue](docs/internals/report-an-issue.md) | ||
- [Translate documentation or messages](docs/internals/translation-workflow.md) | ||
- [Contribute to the core code or fix bugs](docs/internals/getting-started.md) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
The Yii framework is free software. It is released under the terms of | ||
the following BSD License. | ||
|
||
Copyright © 2008 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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
Yii PHP Framework Version 2 | ||
=========================== | ||
|
||
Thank you for choosing Yii 2 - a modern PHP framework designed for professional Web development. | ||
|
||
Yii 2 is a complete rewrite of its previous version Yii 1.1 which is one of the most popular PHP frameworks. | ||
Yii 2 inherits the main spirit behind Yii for being simple, fast and highly extensible. | ||
Yii 2 requires PHP 5.4 and embraces the best practices and protocols found in modern Web application development. | ||
|
||
|
||
[![Latest Stable Version](https://poser.pugx.org/yiisoft/yii2/v/stable.png)](https://packagist.org/packages/yiisoft/yii2) | ||
[![Total Downloads](https://poser.pugx.org/yiisoft/yii2/downloads.png)](https://packagist.org/packages/yiisoft/yii2) | ||
[![Reference Status](https://www.versioneye.com/php/yiisoft:yii2/reference_badge.svg)](https://www.versioneye.com/php/yiisoft:yii2/references) | ||
[![Build Status](https://secure.travis-ci.org/yiisoft/yii2.png)](http://travis-ci.org/yiisoft/yii2) | ||
[![Dependency Status](https://www.versioneye.com/php/yiisoft:yii2/dev-master/badge.png)](https://www.versioneye.com/php/yiisoft:yii2/dev-master) | ||
[![HHVM Status](http://hhvm.h4cc.de/badge/yiisoft/yii2-dev.png)](http://hhvm.h4cc.de/package/yiisoft/yii2-dev) | ||
[![Code Coverage](https://scrutinizer-ci.com/g/yiisoft/yii2/badges/coverage.png?s=31d80f1036099e9d6a3e4d7738f6b000b3c3d10e)](https://scrutinizer-ci.com/g/yiisoft/yii2/) | ||
[![Scrutinizer Quality Score](https://scrutinizer-ci.com/g/yiisoft/yii2/badges/quality-score.png?s=b1074a1ff6d0b214d54fa5ab7abbb90fc092471d)](https://scrutinizer-ci.com/g/yiisoft/yii2/) | ||
[![Code Climate](https://codeclimate.com/github/yiisoft/yii2.png)](https://codeclimate.com/github/yiisoft/yii2) | ||
|
||
DIRECTORY STRUCTURE | ||
------------------- | ||
|
||
``` | ||
apps/ ready-to-use application templates | ||
advanced/ a template suitable for building sophisticated Web applications | ||
basic/ a template suitable for building simple Web applications | ||
benchmark/ an application demonstrating the performance of Yii | ||
build/ internally used build tools | ||
docs/ documentation | ||
extensions/ extensions | ||
framework/ core framework code | ||
tests/ tests of the core framework code | ||
``` | ||
|
||
|
||
REQUIREMENTS | ||
------------ | ||
|
||
The minimum requirement by Yii is that your Web server supports PHP 5.4. | ||
|
||
|
||
DOCUMENTATION | ||
------------- | ||
|
||
Yii 2.0 has a [Definitive Guide](http://www.yiiframework.com/doc-2.0/guide-index.html) and | ||
a [Class Reference](http://www.yiiframework.com/doc-2.0/index.html) which cover every detail of Yii. | ||
|
||
There is also a [PDF version](http://stuff.cebe.cc/yii2-guide.pdf) of the Definitive Guide | ||
and a [Definitive Guide Mirror](http://stuff.cebe.cc/yii2docs/) which update every 15 minutes. | ||
|
||
For 1.1 users, you may refer to [Upgrading from Yii 1.1](docs/guide/intro-upgrade-from-v1.md) | ||
to have a general idea of what has changed in 2.0. | ||
|
||
|
||
HOW TO PARTICIPATE | ||
------------------ | ||
|
||
**Your participation to Yii 2 development is very welcome!** | ||
|
||
You may participate in the following ways: | ||
|
||
* [Report issues](https://github.com/yiisoft/yii2/issues) | ||
* [Give us feedback or start a design discussion](http://www.yiiframework.com/forum/index.php/forum/42-design-discussions-for-yii-20/) | ||
* Fix issues, develop features, write/polish documentation | ||
- Before you start, please adopt an existing issue (labelled with "ready for adoption") or start a new one to avoid duplicated efforts. | ||
- Please submit a merge request after you finish development. | ||
|
||
In order to make it easier we've prepared [special `yii2-dev` Composer package](https://github.com/yiisoft/yii2/blob/master/docs/internals/getting-started.md). | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"directory" : "vendor/bower" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# yii console command | ||
/yii | ||
|
||
# phpstorm project files | ||
.idea | ||
|
||
# netbeans project files | ||
nbproject | ||
|
||
# zend studio for eclipse project files | ||
.buildpath | ||
.project | ||
.settings | ||
|
||
# windows thumbnail cache | ||
Thumbs.db | ||
|
||
# composer vendor dir | ||
/vendor | ||
|
||
# composer itself is not needed | ||
composer.phar | ||
|
||
# Mac DS_Store Files | ||
.DS_Store | ||
|
||
# phpunit itself is not needed | ||
phpunit.phar | ||
# local phpunit config | ||
/phpunit.xml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
The Yii framework is free software. It is released under the terms of | ||
the following BSD License. | ||
|
||
Copyright © 2008 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. |
Oops, something went wrong.