mirror of
https://github.com/yiisoft/yii2.git
synced 2025-11-01 03:26:36 +08:00
Merge branch 'master' into 13920-validation-marks-valid-field-as-invalid
This commit is contained in:
@ -14,6 +14,7 @@ Yii Framework 2 Change Log
|
||||
- Enh #19853: Added support for default value for `\yii\helpers\Console::select()` (rhertogh)
|
||||
- Bug #19868: Added whitespace sanitation for tests, due to updates in ICU 72 (schmunk42)
|
||||
- Enh #19884: Added support Enums in Query Builder (sk1t0n)
|
||||
- Bug #19908: Fix associative array cell content rendering in Table widget (rhertogh)
|
||||
- Bug #19906: Fixed multiline strings in the `\yii\console\widgets\Table` widget (rhertogh)
|
||||
|
||||
|
||||
|
||||
@ -136,7 +136,11 @@ class Table extends Widget
|
||||
{
|
||||
$this->rows = array_map(function($row) {
|
||||
return array_map(function($value) {
|
||||
return empty($value) && !is_numeric($value) ? ' ' : $value;
|
||||
return empty($value) && !is_numeric($value)
|
||||
? ' '
|
||||
: (is_array($value)
|
||||
? array_values($value)
|
||||
: $value);
|
||||
}, array_values($row));
|
||||
}, $rows);
|
||||
return $this;
|
||||
|
||||
@ -144,6 +144,7 @@ interface ActiveRecordInterface extends StaticInstanceInterface
|
||||
* // Use where() to ignore the default condition
|
||||
* // SELECT FROM customer WHERE age>30
|
||||
* $customers = Customer::find()->where('age>30')->all();
|
||||
* ```
|
||||
*
|
||||
* @return ActiveQueryInterface the newly created [[ActiveQueryInterface]] instance.
|
||||
*/
|
||||
|
||||
@ -405,7 +405,7 @@ class Session extends Component implements \IteratorAggregate, \ArrayAccess, \Co
|
||||
* 'sameSite' => PHP_VERSION_ID >= 70300 ? yii\web\Cookie::SAME_SITE_LAX : null,
|
||||
* ]
|
||||
* ```
|
||||
* See https://www.owasp.org/index.php/SameSite for more information about `sameSite`.
|
||||
* See https://owasp.org/www-community/SameSite for more information about `sameSite`.
|
||||
*
|
||||
* @throws InvalidArgumentException if the parameters are incomplete.
|
||||
* @see https://www.php.net/manual/en/function.session-set-cookie-params.php
|
||||
|
||||
@ -216,7 +216,8 @@ EXPECTED;
|
||||
╔═══════════════╤═══════════════╤══════════════╗
|
||||
║ test1 │ test2 │ test3 ║
|
||||
╟───────────────┼───────────────┼──────────────╢
|
||||
║ testcontent1 │ testcontent2 │ testcontent3 ║
|
||||
║ • col1 │ testcontent2 │ testcontent3 ║
|
||||
║ • col2 │ │ ║
|
||||
╟───────────────┼───────────────┼──────────────╢
|
||||
║ testcontent21 │ testcontent22 │ • col1 ║
|
||||
║ │ │ • col2 ║
|
||||
@ -226,7 +227,7 @@ EXPECTED;
|
||||
|
||||
$this->assertEqualsWithoutLE($expected, $table->setHeaders(['test1', 'test2', 'test3'])
|
||||
->setRows([
|
||||
['testcontent1', 'testcontent2', 'testcontent3'],
|
||||
[['key1' => 'col1', 'key2' => 'col2'], 'testcontent2', 'testcontent3'],
|
||||
['testcontent21', 'testcontent22', ['col1', 'col2']],
|
||||
])->setScreenWidth(200)->run()
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user