Commit ab47d58c by Qiang Xue

path fixes.

parent 0c386552
......@@ -3,7 +3,7 @@ defined('YII_DEBUG') or define('YII_DEBUG', true);
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'),
......
......@@ -3,7 +3,7 @@ defined('YII_DEBUG') or define('YII_DEBUG', true);
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'),
......
......@@ -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'),
......
......@@ -3,7 +3,7 @@ defined('YII_DEBUG') or define('YII_DEBUG', false);
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'),
......
......@@ -3,7 +3,7 @@ defined('YII_DEBUG') or define('YII_DEBUG', false);
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'),
......
......@@ -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'),
......
......@@ -13,7 +13,7 @@ defined('YII_ENV') or define('YII_ENV', 'test');
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;
......
......@@ -9,7 +9,7 @@ defined('YII_DEBUG') or define('YII_DEBUG', true);
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');
......
......@@ -5,7 +5,7 @@ defined('YII_DEBUG') or define('YII_DEBUG', true);
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');
......
......@@ -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');
......
......@@ -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',
......
......@@ -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',
......
......@@ -44,7 +44,7 @@ class PhpDocController extends Controller
$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");
......@@ -55,7 +55,7 @@ class PhpDocController extends Controller
'/apps/',
'/build/',
'/docs/',
'/extensions/yii/composer/',
'/extensions/composer/',
'/tests/',
'/vendor/',
];
......
......@@ -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):
......
......@@ -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.
......@@ -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');
......
......@@ -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
......
......@@ -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;
}
}
......
......@@ -203,7 +203,7 @@ class Installer extends LibraryInstaller
* @license http://www.yiiframework.com/license/
*/
return require(__DIR__ . '/../../yii2-dev/framework/yii/$file');
return require(__DIR__ . '/../../yii2-dev/framework/$file');
EOF
);
......
......@@ -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>
\ No newline at end of file
</phpunit>
......@@ -13,7 +13,7 @@ $composerAutoload = __DIR__ . '/../../vendor/autoload.php';
if (is_file($composerAutoload)) {
require_once($composerAutoload);
}
require_once(__DIR__ . '/../../framework/yii/Yii.php');
require_once(__DIR__ . '/../../framework/Yii.php');
Yii::setAlias('@yiiunit', __DIR__);
......
......@@ -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);
......@@ -27,4 +27,4 @@ class TestCase extends \yiiunit\TestCase
}
}
TestCase::loadClassMap();
\ No newline at end of file
TestCase::loadClassMap();
......@@ -6,7 +6,7 @@ use Yii;
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
......
......@@ -6,7 +6,7 @@ use yii\imagine\Image;
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
{
......
......@@ -57,7 +57,7 @@ class MongoDbTestCase extends TestCase
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);
......
......@@ -6,7 +6,7 @@ use yii\redis\Cache;
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
......
......@@ -6,7 +6,7 @@ use Yii;
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
......
......@@ -72,7 +72,7 @@ class SphinxTestCase extends TestCase
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);
......
......@@ -6,7 +6,7 @@ use Yii;
use yii\swiftmailer\Mailer;
use yiiunit\VendorTestCase;
Yii::setAlias('@yii/swiftmailer', __DIR__ . '/../../../../extensions/yii/swiftmailer');
Yii::setAlias('@yii/swiftmailer', __DIR__ . '/../../../../extensions/swiftmailer');
/**
* @group vendor
......
......@@ -8,7 +8,7 @@ use yii\swiftmailer\Mailer;
use yii\swiftmailer\Message;
use yiiunit\VendorTestCase;
Yii::setAlias('@yii/swiftmailer', __DIR__ . '/../../../../extensions/yii/swiftmailer');
Yii::setAlias('@yii/swiftmailer', __DIR__ . '/../../../../extensions/swiftmailer');
/**
* @group vendor
......
<?php
require_once(__DIR__.'/../../../../framework/yii/requirements/YiiRequirementChecker.php');
require_once(__DIR__.'/../../../../framework/requirements/YiiRequirementChecker.php');
use yiiunit\TestCase;
......
<?php
require(__DIR__ . '/../../../framework/yii/Yii.php');
require(__DIR__ . '/../../../framework/Yii.php');
$application = new yii\web\Application('test', __DIR__ . '/protected');
$application->run();
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment