Skip to content

Commit

Permalink
release version 2.0.13
Browse files Browse the repository at this point in the history
  • Loading branch information
samdark committed Nov 2, 2017
1 parent 5a68ec3 commit 2d672b6
Show file tree
Hide file tree
Showing 23 changed files with 80 additions and 46 deletions.
2 changes: 1 addition & 1 deletion framework/BaseYii.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ class BaseYii
*/
public static function getVersion()
{
return '2.0.13-dev';
return '2.0.13';
}

/**
Expand Down
13 changes: 7 additions & 6 deletions framework/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ Yii Framework 2 Change Log
- Bug #11825: User can login by cookie only once when `autoRenewCookie` is set to false (shirase, silverfire)
- Bug #12860: Fixed possible race conditions in `yii\mutex\FileMutex` (kidol)
- Bug #13258: Fixed `yii\mutex\FileMutex::$autoRelease` having no effect due to missing base class initialization (kidol)
- Bug #13436: Fixed migration for MSSQL DbSession (silverfire)
- Bug #13564: Fixed `yii\web\Request::getAuthUser()`, `getAuthPassword()` to respect `HTTP_AUTHORIZATION` request header (silverfire)
- Bug #13720: Improve `yii\helpers\FormatConverter::convertDatePhpToIcu()` to handle escaped chars correctly (rob006)
- Bug #13757: Fixed ambiguous column error in `BaseActiveRecord::refresh()` when the query adds a JOIN by default (cebe, ivankff)
Expand All @@ -22,6 +23,7 @@ Yii Framework 2 Change Log
- Bug #14129: Fixed console help to properly work with tricky camelcased controller names (samdark, silverfire)
- Bug #14134: Fixed multiple `validateAttribute()` calls when `scenarios()` returns duplicate attributes (krukru)
- Bug #14165: Set `_slave` of `Connection` to `false` instead of `null` in `close` method (rossoneri)
- Bug #14186: Forced validation in `yiiActiveForm` do not trigger `afterValidate` event (arogachev)
- Bug #14192: Fixed wrong default null value for TIMESTAMP when using PostgreSQL (Tigrov)
- Bug #14202: Fixed current time in (UTC) `\Yii::$app->formatter` if time not set (bscheshirwork)
- Bug #14206: `MySqlMutex`, `PgsqlMutex` and `OracleMutex` now use `useMaster()` to ensure lock is aquired on the same DB server (cebe, ryusoft)
Expand All @@ -40,6 +42,7 @@ Yii Framework 2 Change Log
- Bug #14471: `ContentNegotiator` will always set one of the configured server response formats even if the client does not accept any of them (PowerGamer1)
- Bug #14492: Fixed error handler not escaping error info in debug mode, see CVE-2017-11516 (samdark)
- Bug #14493: Fixed getting permissions in `yii\rbac\Dbmanger::getPermissionsByUser` by user with id equals 0 (dmirogin)
- Bug #14510: The state of a form is always "not validated" when using forced validation in `yiiActiveForm` (arogachev)
- Bug #14523: Added `yii\web\MultipartFormDataParser::$force` option allowing to enforce parsing even on 'POST' request (klimov-paul)
- Bug #14525: Fixed 2.0.12 regression of loading of global fixtures trough `yii fixture/load` (michaelarnauts)
- Bug #14533: Fixed `yii\validators\ExistValidator` and `yii\validators\UniqueValidator` throw exception in case they are set for `yii\db\ActiveRecord` with `$targetClass` pointing to NOSQL ActiveRecord (klimov-paul)
Expand All @@ -57,9 +60,11 @@ Yii Framework 2 Change Log
- Enh #6644: Added `yii\helpers\ArrayHelper::setValue()` (LAV45)
- Enh #7823: Added `yii\filters\AjaxFilter` filter (dmirogin)
- Enh #9438: `yii\web\DbSession` now relies on error handler to display errors (samdark)
- Enh #9703, #9709: Added `yii\i18n\Formatter::asWeight()` and `::asLength()` formatters (nineinchnick, silverfire)
- Enh #11415: Added `yii\console\widgets\Table` to draw tables in console apps (pana1990, rob006, samdark, tonykor)
- Enh #13254: Made `yii\helpers\StringHelper` and `yii\validators\StringValidator` independent of `Yii::$app` instance (cebe)
- Enh #13378: Added `yii\behaviors\SluggableBehaviour::skipOnEmpty` option (andrewnester)
- Enh #13403: Added 'permissions' additionally to 'roles' in `yii\filters\AccessRule` in order to be able to specify these separately (thyseus)
- Enh #13486: Use DI container to instantiate cookies in order to be able to set defaults (samdark)
- Enh #13586: Added `$preserveNonEmptyValues` property to the `yii\behaviors\AttributeBehavior` (Kolyunya)
- Enh #13780: Added support for trusted proxies in `yii\web\Request` (sammousa, cebe, silverfire)
Expand Down Expand Up @@ -92,19 +97,15 @@ Yii Framework 2 Change Log
- Enh #14877: Disabled profiling on connection opening when profiling is disabled (njasm)
- Enh #14913: Assset hashing now takes asset linking into account to improve cache busting (schmunk42)
- Enh #14929: Ensure trailing `;` on combining files with `asset` command to fix compiler failures (tanakahisateru)
- Enh #14958: Added options to copy stacktrace and search for error message to the exception page (cebe)
- Enh #14967: Added Armenian Translations (gevorgmansuryan)
- Enh #15015: Added `StringHelper::floatToString()` to safely cast float values independent of the locale, also fixes some places in the framework that use it now (cebe)
- Chg #7936: Deprecate `yii\base\Object` in favor of `yii\base\BaseObject` for compatibility with PHP 7.2 (rob006, cebe, klimov-paul)
- Chg #14201: `yii\console\controllers\MessageController::extractMessagesFromTokens()` is now protected (faenir)
- Chg #14286: Used primary inputmask package name instead of an alias (samdark)
- Chg #14321: `yii\widgets\MaskedInput` is now registering its JavaScript `clientOptions` initialization code in head section (DaveFerger)
- Chg #14487: Changed i18n message error to warning (dmirogin)
- Bug #13436: Fixed migration for MSSQL DbSession (silverfire)
- Bug #14186: Forced validation in `yiiActiveForm` do not trigger `afterValidate` event (arogachev)
- Bug #14510: The state of a form is always "not validated" when using forced validation in `yiiActiveForm` (arogachev)
- Enh #13403: Added 'permissions' additionally to 'roles' in `yii\filters\AccessRule` in order to be able to specify these separately (thyseus)
- Enh #14958: Added options to copy stacktrace and search for error message to the exception page (cebe)
- Enh #9703, #9709: Added `yii\i18n\Formatter::asWeight()` and `::asLength()` formatters (nineinchnick, silverfire)


2.0.12 June 05, 2017
--------------------
Expand Down
4 changes: 2 additions & 2 deletions framework/base/Application.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
* @property \yii\rbac\ManagerInterface $authManager The auth manager application component. Null is returned
* if auth manager is not configured. This property is read-only.
* @property string $basePath The root directory of the application.
* @property \yii\caching\CacheInterface $cache The cache application component. Null if the component is not enabled.
* This property is read-only.
* @property \yii\caching\CacheInterface $cache The cache application component. Null if the component is not
* enabled. This property is read-only.
* @property array $container Values given in terms of name-value pairs. This property is write-only.
* @property \yii\db\Connection $db The database connection. This property is read-only.
* @property \yii\web\ErrorHandler|\yii\console\ErrorHandler $errorHandler The error handler application
Expand Down
18 changes: 17 additions & 1 deletion framework/classes.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
'yii\base\ArrayAccessTrait' => YII2_PATH . '/base/ArrayAccessTrait.php',
'yii\base\Arrayable' => YII2_PATH . '/base/Arrayable.php',
'yii\base\ArrayableTrait' => YII2_PATH . '/base/ArrayableTrait.php',
'yii\base\BaseObject' => YII2_PATH . '/base/BaseObject.php',
'yii\base\Behavior' => YII2_PATH . '/base/Behavior.php',
'yii\base\BootstrapInterface' => YII2_PATH . '/base/BootstrapInterface.php',
'yii\base\Component' => YII2_PATH . '/base/Component.php',
Expand All @@ -40,10 +41,11 @@
'yii\base\Module' => YII2_PATH . '/base/Module.php',
'yii\base\NotSupportedException' => YII2_PATH . '/base/NotSupportedException.php',
'yii\base\Object' => YII2_PATH . '/base/Object.php',
'yii\base\BaseObject' => YII2_PATH . '/base/BaseObject.php',
'yii\base\Request' => YII2_PATH . '/base/Request.php',
'yii\base\Response' => YII2_PATH . '/base/Response.php',
'yii\base\Security' => YII2_PATH . '/base/Security.php',
'yii\base\StaticInstanceInterface' => YII2_PATH . '/base/StaticInstanceInterface.php',
'yii\base\StaticInstanceTrait' => YII2_PATH . '/base/StaticInstanceTrait.php',
'yii\base\Theme' => YII2_PATH . '/base/Theme.php',
'yii\base\UnknownClassException' => YII2_PATH . '/base/UnknownClassException.php',
'yii\base\UnknownMethodException' => YII2_PATH . '/base/UnknownMethodException.php',
Expand All @@ -58,12 +60,14 @@
'yii\base\WidgetEvent' => YII2_PATH . '/base/WidgetEvent.php',
'yii\behaviors\AttributeBehavior' => YII2_PATH . '/behaviors/AttributeBehavior.php',
'yii\behaviors\AttributeTypecastBehavior' => YII2_PATH . '/behaviors/AttributeTypecastBehavior.php',
'yii\behaviors\AttributesBehavior' => YII2_PATH . '/behaviors/AttributesBehavior.php',
'yii\behaviors\BlameableBehavior' => YII2_PATH . '/behaviors/BlameableBehavior.php',
'yii\behaviors\SluggableBehavior' => YII2_PATH . '/behaviors/SluggableBehavior.php',
'yii\behaviors\TimestampBehavior' => YII2_PATH . '/behaviors/TimestampBehavior.php',
'yii\caching\ApcCache' => YII2_PATH . '/caching/ApcCache.php',
'yii\caching\ArrayCache' => YII2_PATH . '/caching/ArrayCache.php',
'yii\caching\Cache' => YII2_PATH . '/caching/Cache.php',
'yii\caching\CacheInterface' => YII2_PATH . '/caching/CacheInterface.php',
'yii\caching\ChainedDependency' => YII2_PATH . '/caching/ChainedDependency.php',
'yii\caching\DbCache' => YII2_PATH . '/caching/DbCache.php',
'yii\caching\DbDependency' => YII2_PATH . '/caching/DbDependency.php',
Expand All @@ -83,9 +87,11 @@
'yii\captcha\CaptchaAction' => YII2_PATH . '/captcha/CaptchaAction.php',
'yii\captcha\CaptchaAsset' => YII2_PATH . '/captcha/CaptchaAsset.php',
'yii\captcha\CaptchaValidator' => YII2_PATH . '/captcha/CaptchaValidator.php',
'yii\data\ActiveDataFilter' => YII2_PATH . '/data/ActiveDataFilter.php',
'yii\data\ActiveDataProvider' => YII2_PATH . '/data/ActiveDataProvider.php',
'yii\data\ArrayDataProvider' => YII2_PATH . '/data/ArrayDataProvider.php',
'yii\data\BaseDataProvider' => YII2_PATH . '/data/BaseDataProvider.php',
'yii\data\DataFilter' => YII2_PATH . '/data/DataFilter.php',
'yii\data\DataProviderInterface' => YII2_PATH . '/data/DataProviderInterface.php',
'yii\data\Pagination' => YII2_PATH . '/data/Pagination.php',
'yii\data\Sort' => YII2_PATH . '/data/Sort.php',
Expand All @@ -99,13 +105,19 @@
'yii\db\AfterSaveEvent' => YII2_PATH . '/db/AfterSaveEvent.php',
'yii\db\BaseActiveRecord' => YII2_PATH . '/db/BaseActiveRecord.php',
'yii\db\BatchQueryResult' => YII2_PATH . '/db/BatchQueryResult.php',
'yii\db\CheckConstraint' => YII2_PATH . '/db/CheckConstraint.php',
'yii\db\ColumnSchema' => YII2_PATH . '/db/ColumnSchema.php',
'yii\db\ColumnSchemaBuilder' => YII2_PATH . '/db/ColumnSchemaBuilder.php',
'yii\db\Command' => YII2_PATH . '/db/Command.php',
'yii\db\Connection' => YII2_PATH . '/db/Connection.php',
'yii\db\Constraint' => YII2_PATH . '/db/Constraint.php',
'yii\db\ConstraintFinderTrait' => YII2_PATH . '/db/ConstraintFinderTrait.php',
'yii\db\DataReader' => YII2_PATH . '/db/DataReader.php',
'yii\db\DefaultValueConstraint' => YII2_PATH . '/db/DefaultValueConstraint.php',
'yii\db\Exception' => YII2_PATH . '/db/Exception.php',
'yii\db\Expression' => YII2_PATH . '/db/Expression.php',
'yii\db\ForeignKeyConstraint' => YII2_PATH . '/db/ForeignKeyConstraint.php',
'yii\db\IndexConstraint' => YII2_PATH . '/db/IndexConstraint.php',
'yii\db\IntegrityException' => YII2_PATH . '/db/IntegrityException.php',
'yii\db\Migration' => YII2_PATH . '/db/Migration.php',
'yii\db\MigrationInterface' => YII2_PATH . '/db/MigrationInterface.php',
Expand All @@ -115,6 +127,8 @@
'yii\db\QueryTrait' => YII2_PATH . '/db/QueryTrait.php',
'yii\db\Schema' => YII2_PATH . '/db/Schema.php',
'yii\db\SchemaBuilderTrait' => YII2_PATH . '/db/SchemaBuilderTrait.php',
'yii\db\SqlToken' => YII2_PATH . '/db/SqlToken.php',
'yii\db\SqlTokenizer' => YII2_PATH . '/db/SqlTokenizer.php',
'yii\db\StaleObjectException' => YII2_PATH . '/db/StaleObjectException.php',
'yii\db\TableSchema' => YII2_PATH . '/db/TableSchema.php',
'yii\db\Transaction' => YII2_PATH . '/db/Transaction.php',
Expand All @@ -138,12 +152,14 @@
'yii\db\sqlite\ColumnSchemaBuilder' => YII2_PATH . '/db/sqlite/ColumnSchemaBuilder.php',
'yii\db\sqlite\QueryBuilder' => YII2_PATH . '/db/sqlite/QueryBuilder.php',
'yii\db\sqlite\Schema' => YII2_PATH . '/db/sqlite/Schema.php',
'yii\db\sqlite\SqlTokenizer' => YII2_PATH . '/db/sqlite/SqlTokenizer.php',
'yii\di\Container' => YII2_PATH . '/di/Container.php',
'yii\di\Instance' => YII2_PATH . '/di/Instance.php',
'yii\di\NotInstantiableException' => YII2_PATH . '/di/NotInstantiableException.php',
'yii\di\ServiceLocator' => YII2_PATH . '/di/ServiceLocator.php',
'yii\filters\AccessControl' => YII2_PATH . '/filters/AccessControl.php',
'yii\filters\AccessRule' => YII2_PATH . '/filters/AccessRule.php',
'yii\filters\AjaxFilter' => YII2_PATH . '/filters/AjaxFilter.php',
'yii\filters\ContentNegotiator' => YII2_PATH . '/filters/ContentNegotiator.php',
'yii\filters\Cors' => YII2_PATH . '/filters/Cors.php',
'yii\filters\HostControl' => YII2_PATH . '/filters/HostControl.php',
Expand Down
1 change: 1 addition & 0 deletions framework/console/ExitCode.php
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ class ExitCode
self::CONFIG => 'Configuration error',
];


/**
* Returns a short reason text for the given exit code.
*
Expand Down
3 changes: 1 addition & 2 deletions framework/console/controllers/BaseMigrateController.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ abstract class BaseMigrateController extends Controller
*/
const BASE_MIGRATION = 'm000000_000000_base';


/**
* @var string the default command action.
*/
Expand Down Expand Up @@ -84,7 +83,6 @@ abstract class BaseMigrateController extends Controller
* or a file path.
*/
public $templateFile;

/**
* @var bool indicates whether the console output should be compacted.
* If this is set to true, the individual commands ran within the migration will not be output to the console.
Expand All @@ -93,6 +91,7 @@ abstract class BaseMigrateController extends Controller
*/
public $compact = false;


/**
* @inheritdoc
*/
Expand Down
1 change: 0 additions & 1 deletion framework/console/controllers/MigrateController.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ class MigrateController extends BaseMigrateController
*/
const MAX_NAME_LENGTH = 180;


/**
* @var string the name of the table for keeping applied migration information.
*/
Expand Down
4 changes: 4 additions & 0 deletions framework/console/widgets/Table.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@
* ],
* ]);
*
* @property string $listPrefix List prefix. This property is write-only.
* @property int $screenWidth Screen width. This property is write-only.
*
* @author Daniel Gomez Pan <[email protected]>
* @since 2.0.13
*/
Expand Down Expand Up @@ -102,6 +105,7 @@ class Table extends Widget
*/
private $_listPrefix = '';


/**
* Set table headers.
*
Expand Down
16 changes: 9 additions & 7 deletions framework/data/DataFilter.php
Original file line number Diff line number Diff line change
Expand Up @@ -110,11 +110,13 @@
*
* @see ActiveDataFilter
*
* @property mixed $filter filter value.
* @property Model $searchModel model to be used for filter attributes validation.
* @property array $searchAttributeTypes search attribute type map.
* @property array $errorMessages list of error messages responding to invalid filter structure,
* in format: `[errorKey => message]`. Please refer to [[setErrorMessages()]] for details.
* @property array $errorMessages Error messages in format `[errorKey => message]`. Note that the type of this
* property differs in getter and setter. See [[getErrorMessages()]] and [[setErrorMessages()]] for details.
* @property mixed $filter Raw filter value.
* @property array $searchAttributeTypes Search attribute type map. Note that the type of this property
* differs in getter and setter. See [[getSearchAttributeTypes()]] and [[setSearchAttributeTypes()]] for details.
* @property Model $searchModel Model instance. Note that the type of this property differs in getter and
* setter. See [[getSearchModel()]] and [[setSearchModel()]] for details.
*
* @author Paul Klimov <[email protected]>
* @since 2.0.13
Expand Down Expand Up @@ -160,8 +162,8 @@ class DataFilter extends Model
* ```
*
* > Note: while specifying filter controls take actual data exchange format, which your API uses, in mind.
* Make sure each specified control keyword is valid for the format. For example, in XML tag name can start
* only with a letter character, thus controls like `>`, '=' or `$gt` will break the XML schema.
* > Make sure each specified control keyword is valid for the format. For example, in XML tag name can start
* > only with a letter character, thus controls like `>`, '=' or `$gt` will break the XML schema.
*/
public $filterControls = [
'and' => 'AND',
Expand Down
2 changes: 0 additions & 2 deletions framework/db/ActiveQuery.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,6 @@
* marks a relation as inverse of another relation and [[onCondition()]] which adds a condition that
* is to be added to relational query join condition.
*
* @property string[] $tablesUsedInFrom Table names indexed by aliases. This property is read-only.
*
* @author Qiang Xue <[email protected]>
* @author Carsten Brandt <[email protected]>
* @since 2.0
Expand Down
2 changes: 1 addition & 1 deletion framework/db/Command.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
* For more details and usage information on Command, see the [guide article on Database Access Objects](guide:db-dao).
*
* @property string $rawSql The raw SQL with parameter values inserted into the corresponding placeholders in
* [[sql]]. This property is read-only.
* [[sql]].
* @property string $sql The SQL statement to be executed.
*
* @author Qiang Xue <[email protected]>
Expand Down
7 changes: 3 additions & 4 deletions framework/db/Migration.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,14 +65,12 @@ class Migration extends Component implements MigrationInterface
* ```
*/
public $db = 'db';

/**
* @var int max number of characters of the SQL outputted. Useful for reduction of long statements and making
* console output more compact.
* @since 2.0.13
*/
public $maxSqlOutputLength;

/**
* @var bool indicates whether the console output should be compacted.
* If this is set to true, the individual commands ran within the migration will not be output to the console.
Expand All @@ -81,6 +79,7 @@ class Migration extends Component implements MigrationInterface
*/
public $compact = false;


/**
* Initializes the migration.
* This method will set [[db]] to be the 'db' application component, if it is `null`.
Expand Down Expand Up @@ -543,7 +542,7 @@ public function dropCommentFromTable($table)

/**
* Prepares for a command to be executed, and outputs to the console.
*
*
* @param string $description the description for the command, to be output to the console.
* @return float the time before the command is executed, for the time elapsed to be calculated.
* @since 2.0.13
Expand All @@ -558,7 +557,7 @@ protected function beginCommand($description)

/**
* Finalizes after the command has been executed, and outputs to the console the time elapsed.
*
*
* @param float $time the time before the command was executed.
* @since 2.0.13
*/
Expand Down
2 changes: 2 additions & 0 deletions framework/db/Query.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@
*
* A more detailed usage guide on how to work with Query can be found in the [guide article on Query Builder](guide:db-query-builder).
*
* @property string[] $tablesUsedInFrom Table names indexed by aliases. This property is read-only.
*
* @author Qiang Xue <[email protected]>
* @author Carsten Brandt <[email protected]>
* @since 2.0
Expand Down
1 change: 0 additions & 1 deletion framework/db/Schema.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ abstract class Schema extends BaseObject
const TYPE_BINARY = 'binary';
const TYPE_BOOLEAN = 'boolean';
const TYPE_MONEY = 'money';

/**
* Schema cache version, to detect incompatibilities in cached values when the
* data format of the cache changes.
Expand Down
1 change: 1 addition & 0 deletions framework/db/sqlite/Schema.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ class Schema extends \yii\db\Schema
'enum' => self::TYPE_STRING,
];


/**
* @inheritDoc
*/
Expand Down
2 changes: 1 addition & 1 deletion framework/filters/AccessRule.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ class AccessRule extends Component
*
* If you are using RBAC (Role-Based Access Control), you may also specify role names.
* In this case, [[User::can()]] will be called to check access.
*
*
* Note that it is preferred to check for permissions instead.
*
* If this property is not set or empty, it means this rule applies regardless of roles.
Expand Down
1 change: 1 addition & 0 deletions framework/filters/AjaxFilter.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ class AjaxFilter extends ActionFilter
*/
public $request;


/**
* @inheritdoc
*/
Expand Down
Loading

0 comments on commit 2d672b6

Please sign in to comment.