Commit 4321503b by Nobuo Kihara

Merge branch 'master' into docs-ja-2014-10-23

parents 62e50f46 35e7f27d
Getting started with Yii2 development
=====================================
1. Clone your fork of yii2 `git clone git@github.com:<yourname>/yii2`.
1. Clone your fork of yii2 `git clone git@github.com:<yourname>/yii2.git`.
2. Change into the repo folder `cd yii2`.
3. run `./build/build app/link basic` to install composer dependecies for the basic app.
This command will install foreign composer packages as normal but will link the yii2 repo to
......
......@@ -24,7 +24,7 @@ Change to the directory where you cloned Yii, normally, "yii2". Then enter the f
git remote add upstream git://github.com/yiisoft/yii2.git
```
### 3. Make sure there is an issue created for the thing you are working on if it requires signifcant effort to fix
### 3. Make sure there is an issue created for the thing you are working on if it requires significant effort to fix
All new features and bug fixes should have an associated issue to provide a single point of reference for discussion
and documentation. Take a few minutes to look through the existing issue list for one that matches the contribution you
......
......@@ -12,6 +12,7 @@ Yii Framework 2 Change Log
- Bug #5657: `yii\caching\ApcCache::mset()` and `madd()` may cause warning in some APC setup (LAV45)
- Bug #5665: The `currentPage` meta data in the RESTful result should be 1-based, similar to that in HTTP headers (qiangxue)
- Bug #5682: The `asset` command would incorrectly combine CSS files when `UrlManager::linkAssets` is true (dmvslv)
- Bug #5702: Parenthesis should be automatically added to `Validator::whenClient` to avoid js error (mdmunir, qiangxue)
- Bug: Gii console command help information does not contain global options (qiangxue)
- Enh #3760: Gii model generator now imports classes when necessary instead of using fully qualified class names (umneeq, samdark)
- Enh #5223: Query builder now supports selecting sub-queries as columns (qiangxue)
......@@ -21,6 +22,7 @@ Yii Framework 2 Change Log
- Enh #5600: Allow configuring debug panels in `yii\debug\Module::panels` as panel class name strings (qiangxue)
- Enh #5613: Added `--overwrite` option to Gii console command to support overwriting all files (motin, qiangxue)
- Enh #5646: Call `yii\base\ErrorHandler::unregister()` instead of `restore_*_handlers` directly (aivus)
- Enh: `Console::confirm()` now uses `Console::stdout()` instead of `echo` to be consistent with all other functions (cebe)
2.0.0 October 12, 2014
----------------------
......
......@@ -763,13 +763,13 @@ class BaseConsole
/**
* Asks user to confirm by typing y or n.
*
* @param string $message to echo out before waiting for user input
* @param string $message to print out before waiting for user input
* @param boolean $default this value is returned if no selection is made.
* @return boolean whether user confirmed
*/
public static function confirm($message, $default = false)
{
echo $message . ' (yes|no) [' . ($default ? 'yes' : 'no') . ']:';
static::stdout($message . ' (yes|no) [' . ($default ? 'yes' : 'no') . ']:');
$input = trim(static::stdin());
return empty($input) ? $default : !strncasecmp($input, 'y', 1);
......
......@@ -88,6 +88,7 @@ html,body{
}
.header pre{
margin: 10px 0;
overflow-y: scroll;
}
/* previous exceptions */
......
......@@ -229,6 +229,8 @@ class Session extends Component implements \IteratorAggregate, \ArrayAccess, \Co
}
/**
* Gets the session ID.
* This is a wrapper for [PHP session_id()](http://php.net/manual/en/function.session-id.php).
* @return string the current session ID
*/
public function getId()
......@@ -237,6 +239,8 @@ class Session extends Component implements \IteratorAggregate, \ArrayAccess, \Co
}
/**
* Sets the session ID.
* This is a wrapper for [PHP session_id()](http://php.net/manual/en/function.session-id.php).
* @param string $value the session ID for the current session
*/
public function setId($value)
......@@ -257,6 +261,8 @@ class Session extends Component implements \IteratorAggregate, \ArrayAccess, \Co
}
/**
* Gets the name of the current session.
* This is a wrapper for [PHP session_name()](http://php.net/manual/en/function.session-name.php).
* @return string the current session name
*/
public function getName()
......@@ -265,6 +271,8 @@ class Session extends Component implements \IteratorAggregate, \ArrayAccess, \Co
}
/**
* Sets the name for the current session.
* This is a wrapper for [PHP session_name()](http://php.net/manual/en/function.session-name.php).
* @param string $value the session name for the current session, must be an alphanumeric string.
* It defaults to "PHPSESSID".
*/
......@@ -274,6 +282,8 @@ class Session extends Component implements \IteratorAggregate, \ArrayAccess, \Co
}
/**
* Gets the current session save path.
* This is a wrapper for [PHP session_save_path()](http://php.net/manual/en/function.session-save-path.php).
* @return string the current session save path, defaults to '/tmp'.
*/
public function getSavePath()
......@@ -282,6 +292,8 @@ class Session extends Component implements \IteratorAggregate, \ArrayAccess, \Co
}
/**
* Sets the current session save path.
* This is a wrapper for [PHP session_save_path()](http://php.net/manual/en/function.session-save-path.php).
* @param string $value the current session save path. This can be either a directory name or a path alias.
* @throws InvalidParamException if the path is not a valid directory
*/
......@@ -297,7 +309,7 @@ class Session extends Component implements \IteratorAggregate, \ArrayAccess, \Co
/**
* @return array the session cookie parameters.
* @see http://us2.php.net/manual/en/function.session-get-cookie-params.php
* @see http://php.net/manual/en/function.session-get-cookie-params.php
*/
public function getCookieParams()
{
......
......@@ -710,7 +710,7 @@ class ActiveField extends Component
$js = $validator->clientValidateAttribute($this->model, $attribute, $this->form->getView());
if ($validator->enableClientValidation && $js != '') {
if ($validator->whenClient !== null) {
$js = "if ({$validator->whenClient}(attribute, value)) { $js }";
$js = "if (({$validator->whenClient})(attribute, value)) { $js }";
}
$validators[] = $js;
}
......
......@@ -301,8 +301,8 @@ EOD;
}
$actualValue = $this->activeField->getClientOptions();
$expectedJsExpression = "function (attribute, value, messages, deferred) {if (function (attribute, value) "
. "{ return 'yii2' == 'yii2'; }(attribute, value)) { return true; }}";
$expectedJsExpression = "function (attribute, value, messages, deferred) {if ((function (attribute, value) "
. "{ return 'yii2' == 'yii2'; })(attribute, value)) { return true; }}";
$this->assertEquals($expectedJsExpression, $actualValue['validate']->expression);
}
......
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