Skip to content

Commit

Permalink
path fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
qiangxue committed Jan 11, 2014
1 parent 0c38655 commit ab47d58
Show file tree
Hide file tree
Showing 32 changed files with 50 additions and 50 deletions.
2 changes: 1 addition & 1 deletion apps/advanced/environments/dev/backend/web/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
defined('YII_ENV') or define('YII_ENV', 'dev');

require(__DIR__ . '/../../vendor/autoload.php');
require(__DIR__ . '/../../vendor/yiisoft/yii2/yii/Yii.php');
require(__DIR__ . '/../../vendor/yiisoft/yii2/Yii.php');

$config = yii\helpers\ArrayHelper::merge(
require(__DIR__ . '/../config/main.php'),
Expand Down
2 changes: 1 addition & 1 deletion apps/advanced/environments/dev/frontend/web/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
defined('YII_ENV') or define('YII_ENV', 'dev');

require(__DIR__ . '/../../vendor/autoload.php');
require(__DIR__ . '/../../vendor/yiisoft/yii2/yii/Yii.php');
require(__DIR__ . '/../../vendor/yiisoft/yii2/Yii.php');

$config = yii\helpers\ArrayHelper::merge(
require(__DIR__ . '/../config/main.php'),
Expand Down
2 changes: 1 addition & 1 deletion apps/advanced/environments/dev/yii
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ defined('YII_ENV') or define('YII_ENV', 'dev');
defined('STDIN') or define('STDIN', fopen('php://stdin', 'r'));

require(__DIR__ . '/vendor/autoload.php');
require(__DIR__ . '/vendor/yiisoft/yii2/yii/Yii.php');
require(__DIR__ . '/vendor/yiisoft/yii2/Yii.php');

$config = yii\helpers\ArrayHelper::merge(
require(__DIR__ . '/console/config/main.php'),
Expand Down
2 changes: 1 addition & 1 deletion apps/advanced/environments/prod/backend/web/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
defined('YII_ENV') or define('YII_ENV', 'prod');

require(__DIR__ . '/../../vendor/autoload.php');
require(__DIR__ . '/../../vendor/yiisoft/yii2/yii/Yii.php');
require(__DIR__ . '/../../vendor/yiisoft/yii2/Yii.php');

$config = yii\helpers\ArrayHelper::merge(
require(__DIR__ . '/../config/main.php'),
Expand Down
2 changes: 1 addition & 1 deletion apps/advanced/environments/prod/frontend/web/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
defined('YII_ENV') or define('YII_ENV', 'prod');

require(__DIR__ . '/../../vendor/autoload.php');
require(__DIR__ . '/../../vendor/yiisoft/yii2/yii/Yii.php');
require(__DIR__ . '/../../vendor/yiisoft/yii2/Yii.php');

$config = yii\helpers\ArrayHelper::merge(
require(__DIR__ . '/../config/main.php'),
Expand Down
2 changes: 1 addition & 1 deletion apps/advanced/environments/prod/yii
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ defined('YII_ENV') or define('YII_ENV', 'prod');
defined('STDIN') or define('STDIN', fopen('php://stdin', 'r'));

require(__DIR__ . '/vendor/autoload.php');
require(__DIR__ . '/vendor/yiisoft/yii2/yii/Yii.php');
require(__DIR__ . '/vendor/yiisoft/yii2/Yii.php');

$config = yii\helpers\ArrayHelper::merge(
require(__DIR__ . '/console/config/main.php'),
Expand Down
2 changes: 1 addition & 1 deletion apps/basic/tests/_bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

require_once(__DIR__ . '/../vendor/autoload.php');

require_once(__DIR__ . '/../vendor/yiisoft/yii2/yii/Yii.php');
require_once(__DIR__ . '/../vendor/yiisoft/yii2/Yii.php');

// set correct script paths
$_SERVER['SCRIPT_FILENAME'] = TEST_ENTRY_FILE;
Expand Down
2 changes: 1 addition & 1 deletion apps/basic/web/index-test.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
defined('YII_ENV') or define('YII_ENV', 'test');

require(__DIR__ . '/../vendor/autoload.php');
require(__DIR__ . '/../vendor/yiisoft/yii2/yii/Yii.php');
require(__DIR__ . '/../vendor/yiisoft/yii2/Yii.php');

$config = require(__DIR__ . '/../tests/acceptance/_config.php');

Expand Down
2 changes: 1 addition & 1 deletion apps/basic/web/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
defined('YII_ENV') or define('YII_ENV', 'dev');

require(__DIR__ . '/../vendor/autoload.php');
require(__DIR__ . '/../vendor/yiisoft/yii2/yii/Yii.php');
require(__DIR__ . '/../vendor/yiisoft/yii2/Yii.php');

$config = require(__DIR__ . '/../config/web.php');

Expand Down
2 changes: 1 addition & 1 deletion apps/basic/yii
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ defined('YII_DEBUG') or define('YII_DEBUG', true);
defined('STDIN') or define('STDIN', fopen('php://stdin', 'r'));

require(__DIR__ . '/vendor/autoload.php');
require(__DIR__ . '/vendor/yiisoft/yii2/yii/Yii.php');
require(__DIR__ . '/vendor/yiisoft/yii2/Yii.php');

$config = require(__DIR__ . '/config/console.php');

Expand Down
2 changes: 1 addition & 1 deletion apps/benchmark/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

defined('YII_DEBUG') or define('YII_DEBUG', false);

require(__DIR__ . '/protected/vendor/yiisoft/yii2/yii/Yii.php');
require(__DIR__ . '/protected/vendor/yiisoft/yii2/Yii.php');

$config = [
'id' => 'benchmark',
Expand Down
2 changes: 1 addition & 1 deletion build/build
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ defined('STDIN') or define('STDIN', fopen('php://stdin', 'r'));

define('YII_DEBUG', true);

require(__DIR__ . '/../framework/yii/Yii.php');
require(__DIR__ . '/../framework/Yii.php');

$application = new yii\console\Application([
'id' => 'yii-build',
Expand Down
4 changes: 2 additions & 2 deletions build/controllers/PhpDocController.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public function actionProperty($root = null)
$except = [];
if ($root === null) {
$root = dirname(dirname(YII_PATH));
$extensionPath = "$root/extensions/yii";
$extensionPath = "$root/extensions";
foreach (scandir($extensionPath) as $extension) {
if (ctype_alpha($extension) && is_dir($extensionPath . '/' . $extension)) {
Yii::setAlias("@yii/$extension", "$extensionPath/$extension");
Expand All @@ -55,7 +55,7 @@ public function actionProperty($root = null)
'/apps/',
'/build/',
'/docs/',
'/extensions/yii/composer/',
'/extensions/composer/',
'/tests/',
'/vendor/',
];
Expand Down
2 changes: 1 addition & 1 deletion docs/guide/authorization.md
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ Storing RBAC hierarchy in database is less efficient performancewise but is much
a good management UI for it so in case you need permissions structure that is managed by end user DB is your choice.

In order to get started you need to configure database connection in `db` component. After it is done [get `schema-*.sql`
file for your database](https://github.com/yiisoft/yii2/tree/master/framework/yii/rbac) and execute it.
file for your database](https://github.com/yiisoft/yii2/tree/master/framework/rbac) and execute it.

Next step is to configure `authManager` application component in application config file (`web.php` or `main.php`
depending on template you've used):
Expand Down
2 changes: 1 addition & 1 deletion docs/guide/console-fixture.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,4 +112,4 @@ Auto-generating fixtures

Yii also can auto-generate fixtures for you based on some template. You can generate your fixtures with different data on different languages and formats.
These feature is done by [Faker](https://github.com/fzaninotto/Faker) library and `yii2-faker` extension.
See extension [guide](https://github.com/yiisoft/yii2/tree/master/extensions/yii/faker) for more docs.
See extension [guide](https://github.com/yiisoft/yii2/tree/master/extensions/faker) for more docs.
2 changes: 1 addition & 1 deletion docs/guide/console.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ defined('YII_DEBUG') or define('YII_DEBUG', true);
defined('STDIN') or define('STDIN', fopen('php://stdin', 'r'));

require(__DIR__ . '/vendor/autoload.php');
require(__DIR__ . '/vendor/yiisoft/yii2/yii/Yii.php');
require(__DIR__ . '/vendor/yiisoft/yii2/Yii.php');

$config = require(__DIR__ . '/config/console.php');

Expand Down
6 changes: 3 additions & 3 deletions docs/internals/translations.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ that are actually visible to end user such as validation errors.

In order to start with message translation:

1. Check `framework/yii/messages/config.php` and make sure your language is listed in `languages`.
2. Go to `framework/yii` and run `yii message/extract messages/config.php`.
3. Translate messages in `framework/yii/messages/your_language/yii.php`. Make sure file is saved using UTF-8 encoding.
1. Check `framework/messages/config.php` and make sure your language is listed in `languages`.
2. Go to `framework` and run `yii message/extract messages/config.php`.
3. Translate messages in `framework/messages/your_language/yii.php`. Make sure file is saved using UTF-8 encoding.
4. [Make a pull request](https://github.com/yiisoft/yii2/blob/master/docs/internals/git-workflow.md).

In order to keep your translation up to date you may run `yii message/extract messages/config.php` again. It will
Expand Down
4 changes: 2 additions & 2 deletions extensions/apidoc/apidoc
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ $yiiDirs = [
__DIR__ . '/../../../../yiisoft/yii2', // script is installed as a composer binary
];
foreach($yiiDirs as $dir) {
if (file_exists($dir . '/yii/Yii.php')) {
require($dir . '/yii/Yii.php');
if (file_exists($dir . '/Yii.php')) {
require($dir . '/Yii.php');
break;
}
}
Expand Down
2 changes: 1 addition & 1 deletion extensions/composer/Installer.php
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ protected function linkBaseYiiFiles()
* @license http://www.yiiframework.com/license/
*/
return require(__DIR__ . '/../../yii2-dev/framework/yii/$file');
return require(__DIR__ . '/../../yii2-dev/framework/$file');
EOF
);
Expand Down
28 changes: 14 additions & 14 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,19 @@
</testsuites>
<filter>
<blacklist>
<file>framework/yii/helpers/Json.php</file>
<file>framework/yii/helpers/StringHelper.php</file>
<file>framework/yii/helpers/VarDumper.php</file>
<file>framework/yii/helpers/Html.php</file>
<file>framework/yii/helpers/Inflector.php</file>
<file>framework/yii/helpers/FileHelper.php</file>
<file>framework/yii/helpers/ArrayHelper.php</file>
<file>framework/yii/helpers/Console.php</file>
<file>framework/yii/i18n/GettextFile.php</file>
<file>framework/yii/web/ResponseFormatterInterface.php</file>
<directory suffix="Exception.php">framework/yii/base</directory>
<directory suffix=".php">framework/yii/db/mssql</directory>
<directory suffix=".php">framework/yii/bootstrap</directory>
<file>framework/helpers/Json.php</file>
<file>framework/helpers/StringHelper.php</file>
<file>framework/helpers/VarDumper.php</file>
<file>framework/helpers/Html.php</file>
<file>framework/helpers/Inflector.php</file>
<file>framework/helpers/FileHelper.php</file>
<file>framework/helpers/ArrayHelper.php</file>
<file>framework/helpers/Console.php</file>
<file>framework/i18n/GettextFile.php</file>
<file>framework/web/ResponseFormatterInterface.php</file>
<directory suffix="Exception.php">framework/base</directory>
<directory suffix=".php">framework/db/mssql</directory>
<directory suffix=".php">framework/bootstrap</directory>
</blacklist>
</filter>
</phpunit>
</phpunit>
2 changes: 1 addition & 1 deletion tests/unit/bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
if (is_file($composerAutoload)) {
require_once($composerAutoload);
}
require_once(__DIR__ . '/../../framework/yii/Yii.php');
require_once(__DIR__ . '/../../framework/Yii.php');

Yii::setAlias('@yiiunit', __DIR__);

Expand Down
4 changes: 2 additions & 2 deletions tests/unit/extensions/authclient/TestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class TestCase extends \yiiunit\TestCase
public static function loadClassMap()
{
$baseNameSpace = 'yii/authclient';
$basePath = realpath(__DIR__. '/../../../../extensions/yii/authclient');
$basePath = realpath(__DIR__. '/../../../../extensions/authclient');
$files = FileHelper::findFiles($basePath);
foreach ($files as $file) {
$classRelativePath = str_replace($basePath, '', $file);
Expand All @@ -27,4 +27,4 @@ public static function loadClassMap()
}
}

TestCase::loadClassMap();
TestCase::loadClassMap();
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
use yii\elasticsearch\Connection;
use yiiunit\TestCase;

Yii::setAlias('@yii/elasticsearch', __DIR__ . '/../../../../extensions/yii/elasticsearch');
Yii::setAlias('@yii/elasticsearch', __DIR__ . '/../../../../extensions/elasticsearch');

/**
* ElasticSearchTestCase is the base class for all elasticsearch related test cases
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/extensions/imagine/AbstractImageTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
use Imagine\Image\Point;
use yiiunit\VendorTestCase;

Yii::setAlias('@yii/imagine', __DIR__ . '/../../../../extensions/yii/imagine');
Yii::setAlias('@yii/imagine', __DIR__ . '/../../../../extensions/imagine');

abstract class AbstractImageTest extends VendorTestCase
{
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/extensions/mongodb/MongoDbTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ protected function tearDown()
protected static function loadClassMap()
{
$baseNameSpace = 'yii/mongodb';
$basePath = realpath(__DIR__. '/../../../../extensions/yii/mongodb');
$basePath = realpath(__DIR__. '/../../../../extensions/mongodb');
$files = FileHelper::findFiles($basePath);
foreach ($files as $file) {
$classRelativePath = str_replace($basePath, '', $file);
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/extensions/redis/RedisCacheTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
use yii\redis\Connection;
use yiiunit\framework\caching\CacheTestCase;

Yii::setAlias('@yii/redis', __DIR__ . '/../../../../extensions/yii/redis');
Yii::setAlias('@yii/redis', __DIR__ . '/../../../../extensions/redis');

/**
* Class for testing redis cache backend
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/extensions/redis/RedisTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
use yii\redis\Connection;
use yiiunit\TestCase;

Yii::setAlias('@yii/redis', __DIR__ . '/../../../../extensions/yii/redis');
Yii::setAlias('@yii/redis', __DIR__ . '/../../../../extensions/redis');

/**
* RedisTestCase is the base class for all redis related test cases
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/extensions/sphinx/SphinxTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ protected function tearDown()
protected static function loadClassMap()
{
$baseNameSpace = 'yii/sphinx';
$basePath = realpath(__DIR__. '/../../../../extensions/yii/sphinx');
$basePath = realpath(__DIR__. '/../../../../extensions/sphinx');
$files = FileHelper::findFiles($basePath);
foreach ($files as $file) {
$classRelativePath = str_replace($basePath, '', $file);
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/extensions/swiftmailer/MailerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
use yii\swiftmailer\Mailer;
use yiiunit\VendorTestCase;

Yii::setAlias('@yii/swiftmailer', __DIR__ . '/../../../../extensions/yii/swiftmailer');
Yii::setAlias('@yii/swiftmailer', __DIR__ . '/../../../../extensions/swiftmailer');

/**
* @group vendor
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/extensions/swiftmailer/MessageTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
use yii\swiftmailer\Message;
use yiiunit\VendorTestCase;

Yii::setAlias('@yii/swiftmailer', __DIR__ . '/../../../../extensions/yii/swiftmailer');
Yii::setAlias('@yii/swiftmailer', __DIR__ . '/../../../../extensions/swiftmailer');

/**
* @group vendor
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

require_once(__DIR__.'/../../../../framework/yii/requirements/YiiRequirementChecker.php');
require_once(__DIR__.'/../../../../framework/requirements/YiiRequirementChecker.php');

use yiiunit\TestCase;

Expand Down
2 changes: 1 addition & 1 deletion tests/web/app/index.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

require(__DIR__ . '/../../../framework/yii/Yii.php');
require(__DIR__ . '/../../../framework/Yii.php');

$application = new yii\web\Application('test', __DIR__ . '/protected');
$application->run();

0 comments on commit ab47d58

Please sign in to comment.