yii\web\Cors
should handle Access-Control-Request-Headers
in a case-insensitive manner (qiangxue)yii\web\Response::sendContentAsFile()
may not send correct content-length
header (sadgnome)yii\helpers\ArrayHelper::htmlEncode()
and htmlDecode()
should not remove non-string data (qiangxue)yii\console\controllers\AssetController
now correctly handles relative image URLs if source and target CSS are under same directory (klimov-paul)yii\data\ArrayDataProvider
did not correctly handle the case Pagination::pageSize = 0
(kirsenn, qiangxue).
with -
to ensure a valid ID is generated (omnilight)yii\captcha\CaptchaAction
should send response in JSON format (InteLigent, qiangxue)yii\web\Request::getEtag()
should strip off -gzip
which may be added by Apache (mcd-php)yii\db\Expression
is being selected (mdmunir, qiangxue)ActiveRecord::populateRecord()
should be called in late binding approach (jlorente)yii\console\Controller::parseDocCommentSummary()
(gugglegum)yii\log\DBTarget
(samdark)yii\widgets\ActiveField::radio()
should not generate the label twice (justinvoelker)yii\rbac\DbManager::checkAccess()
by caching mechanism (qiangxue)yii\filters\PageCache
now supports caching response headers as well as non-HTML response content (qiangxue)yii\web\AssetManager::appendTimestamp
to support cache busting for assets (qiangxue)data-params
to specify additional form data to be submitted via the data-method
approach (usualdesigner, qiangxue)encode
for each item of yii\widgets\Breadcrumbs
(samdark, aleksanderd)validateAttribute()
to yii.activeForm.js
to support manually triggering data validation of an input (Alex-Code, qiang)Access-Control-Expose-Headers
header by yii\filters\Cors
(usualdesigner)yii\helpers\Url::current()
method that allows adding or removing parameters from current URL (samdark, callmez)yii\helpers\BaseHtmlPurifier::helpers()
in order to be able to configure HtmlPurifier
helper globally via subclassing (Alex-Code)yii\web\ErrorHandler::getTypeUrl()
in order to allow providing custom types/classes/methods URLs for subclasses (brandonkelly)yii\base\ErrorHandler::logException()
is now public (samdark)yii\log\FileTarget::$enableRotation
to allow disabling log rotation when external tools are configured for this (cebe)yii\console\controllers\BaseMigrateController
now throws exception if directory specified doesn’t exist and action isn’t create
(lynicidn, samdark)yii\widgets\Menu
container tag by setting options['tag']
to false
(dynasource, samdark)yii\helpers\Html::$dataAttributes
to support customizing data attributes (Faryshta, qiangxue)yii\db\ColumnSchema
by adding typecast()
method to decouple phpTypecast()
from dbTypecast()
(mcd-php, qiangxue)trim
validator now works on the client side too (qiangxue)maxlength
attribute for Html::activeTextInput()
(llfm)Schema::TYPE_DOUBLE
to represent ANSI SQL Double Precision type (samdark)encode
option to allow not encoding select options for Html::dropDownList()
and Html::listBox()
(yapi68, qiangxue)yii\di\Container
to instantiate and configure an object that implements yii\base\Configurable
(qiangxue)yii message/config
to reflect directory structure better (mikehaertl, samdark)href
and data-method
attributes (qiangxue)true
: y
or yes
. To return false
: n
or no
. Any other input the question will be asked again (thiagotalma)ActiveRecord::findByCondition()
to simplify the implementation and usage (Faryshta)yii\authclient\clients\Twitter::$authUrl
changed to ‘authenticate’, allowing usage of previous logged user without request an access (kotchuprik)name
or model
and attribute
are no longer required properties of yii\jui\InputWidget
(nirvana-msu, cebe)yii\mongodb\Query::select
now allows excluding fields (Sammaye, klimov-paul){registerCssFile
and {registerJsFile
(TomassunGitHub, samdark){use class='yii\bootstrap\Nav' type='function'}
(ivanlemeshev)yii\sphinx\Query
no longer attempts to call snippets for the empty query result set (Hrumpa)Alert
widget was generating duplicate IDs in case of multiple flashes (SDKiller)yii\widgets\Menu
are not encoded (qiangxue)yii\di\Container::get()
did not handle config parameter correctly when it is passed as a constructor parameter (qiangxue)/
and pattern was empty (cebe)Content-Transfer-Encoding
from the list of default download headers (DaSourcerer)Url::toRoute()
and Url::to()
(qiangxue, lynicidn)yii\console\controllers\AssetController
now handles bundle files from external resources properly (klimov-paul)DbCache
(qiangxue)yii\behaviors\SluggableBehavior::immutable
to support keeping the generated slug unchanged (trntv)ActiveForm
will scroll to the nearest visible element when the first error input is hidden (newartix)yii\base\Theme::basePath
during runtime (qiangxue)Target
now works also when there is no Yii::$app
instance available, no message prefix will be added in this case (schmunk42)yii\behaviors\SluggableBehavior
will generate a new slug only when the slug attribute is empty or the source attribute is changed (qiangxue)\yii\authclient\OAuth2::refreshAccessToken()
does not save fetched token (sebathi)\yii\authclient\AuthAction::cancelUrl
(klimov-paul)yii\bootstrap\Dropdown
should register client event handlers (qiangxue)ActiveFixture
class for testing fixture support for elasticsearch (cebe, viilveer)de-DE
and the translation files does not exists, it will use de
instead (cebe)yii\mongodb\file\ActiveRecord
(klimov-paul)mget()
(pyurin)yii\sphinx\Query::queryScalar()
fixed (klimov-paul)path
and url
weren’t resolving aliases (samdark, lynicidn)yii\caching\ApcCache::getValues()
now returns array in case of APC is installed but not enabled in CLI mode (samdark, cebe)yii message
accuracy and error handling were improved (samdark)yii\console\controllers\AssetController
breaks CSS URLs, which start from ‘/’ (klimov-paul)yii\bootstrap\Tabs
would throw an exception if content
is not set for one of its items
(RomeroMsk)yii\rbac\DbRbacManager
should not delete items when deleting a rule on a database not supporting cascade update (mdmunir)yii\db\Expression
to be used as the value (cebe, stevekr)yii\log\Target
should not attempt to start session when there is none (klimov-paul, qiangxue)yii\caching\ApcCache::mset()
and madd()
may cause warning in some APC setup (LAV45)currentPage
meta data in the RESTful result should be 1-based, similar to that in HTTP headers (qiangxue)asset
command would incorrectly combine CSS files when UrlManager::linkAssets
is true (dmvslv)Validator::whenClient
to avoid js error (mdmunir, qiangxue){path
was generating absolute URLs instead of relative ones (samdark, motzel)data-confirm
attribute to a submit button, clicking on the button would not trigger form submission (qiangxue)QueryBuilder::batchInsert()
may cause “undefined index” error (qiangxue)message
command fails with a FK constraint error when trying to update messages (qiangxue)yii\grid\CheckboxColumn
checkboxes in grid view wasn’t resulting in “all” checkbox selected (samdark)yii\helpers\ArrayHelper::toArray()
now applies $properties
parameter for converting descending objects in recursive calls (otsec)ArrayHelper::htmlEncode()
does not work properly when the value being encoded is a nested array (tebazil)encode
option via yii\widgets\ActiveRecord::errorOptions
, it works the other way around (stanishevsky, qiangxue)yii\db\Connection::getSchema()
for Oracle should return false when the table does not exist. Oracle does not support ON UPDATE
clause. (wenbin1989)yii\rbac\DbManager::getChildren()
was not quoting column name properly (wenbin1989)yii message
was emptying existing translations in .po in case of multiple categories (samdark)yii message
was incorrectly writing not yet translated strings in .po in case of multiple categories (samdark)yii\rbac\DbManager
should properly quote table and column names (qiangxue)yii\db\Expression
to QueryBuilder BETWEEN
and LIKE
conditions (cebe)yii\widgets\ActiveForm::enableClientScript
is false (qiangxue)yii\bootstrap\Tabs
dropdown IDs were generated incorrectly (samdark)ActiveForm
(InteLigent, qiangxue)yii\db\Schema::getLastInsertID()
was passing wrong default schema name to PDO (samdark)yii\i18n\Formatter::asParagraphs()
was not unicode-aware (samdark)yii\gii\generators\crud\Generator
to support customizing view path for the generated CRUD controller (qiangxue)yii\web\UrlRule
was unable to create URLs for rules containing unicode characters (samdark)yii\web\AssetManager
should not publish disabled asset bundles (qiangxue)yii\web\AssetConverter::$forceConvert
(klimov-paul)yii\bootstrap\ButtonDropdown::$containerOptions
(samdark)yii\bootstrap\Modal::$headerOptions
and yii\bootstrap\Modal::$footerOptions
(tuxoff, samdark)yii\log\DbTarget
(samdark)$checkAjax
parameter to yii\web\Response::redirect()
to support default redirection behavior for AJAX/PJAX requests (qiangxue)yii\bootstrap\Nav::renderDropdown()
(qiangxue)QueryBuilder::alterColumn()
(qiangxue)yii\widgets\Breadcrumbs::links
will be treated as HTML attributes for the generated hyperlinks (qiangxue)yii\grid\DataColumn::encodeLabel
(SDKiller)yii\web\User::getIdentity()
to avoid potential infinite recursion (qiangxue)yii\bootstrap\Dropdown
(hiltonjanfield, qiangxue)DateTimeImmutable
to Formatter (olegtsvetkov, cebe)json_encode
is now used with JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE
where it makes sense, also
it is now default for Json::encode()
(samdark)yii\debug\Module::panels
as panel class name strings (qiangxue)--overwrite
option to Gii console command to support overwriting all files (motin, qiangxue)yii cache/flush-schema
console command to flush DB schema cache of a given database connection (6pblcb, samdark)yii\base\ErrorHandler::unregister()
instead of restore_*_handlers
directly (aivus)yii\i18n\Formatter::defaultTimeZone
for specifying the default time zone to use for datetime values stored in the database (cebe)$formName
to Model::loadMultiple()
to support customizing form name directly (qiangxue)yii\bootstrap\Tabs::renderTabContent
to support manually rendering tab contents (RomeroMsk)ErrorException
(mongosoft)yii\bootstrap\ButtonGroup::buttons
can take all options that are supported by yii\bootstrap\Button
(aleksanderd)Html::encode()
to be used when the application is not started (qiangxue)yii message
command now shows user friendly error if it’s not able to parse source file (samdark)Inflector::sentence()
(pana1990, qiangxue)StringHelper::truncate()
and StringHelper::truncateWords()
(Alex-Code)Console::confirm()
now uses Console::stdout()
instead of echo
to be consistent with all other functions (cebe)yii\rbac\DbManager
migration now uses database component specified in component settings instead of always using default db
(samdark)yii\base\Controller::renderContent()
(qiangxue)yii fixture
command now offers help if no arguments are provided instead of crashing (samdark)yii\db\Command::queryInternal()
is now protected (samdark)yii\grid\GridView
is no longer throwing an exception when results are empty and columns
aren’t defined (samdark)--append
option for the fixture
command (qiangxue)setXyz()
(cebe)definedBy
reference for properties (cebe)images
directory if it does not exist instead of throwing an error (cebe)--guidePrefix
option available as a command line option (cebe)yii\authclient\widgets\AuthChoice
does not loaded if popupMode
disabled (klimov-paul)yii\bootstrap\Tabs
would throw an exception if content
is not set for one of its items
(RomeroMsk)yii\bootstrap\Tabs
dropdown IDs were generated incorrectly (samdark)yii\bootstrap\ButtonDropdown::$containerOptions
(samdark)yii\bootstrap\Modal::$headerOptions
and yii\bootstrap\Modal::$footerOptions
(tuxoff, samdark)yii\bootstrap\Nav::renderDropdown()
(qiangxue)yii\bootstrap\Dropdown
(hiltonjanfield, qiangxue)yii\bootstrap\Tabs::renderTabContent
to support manually rendering tab contents (RomeroMsk)yii\bootstrap\ButtonGroup::buttons
can take all options that are supported by yii\bootstrap\Button
(aleksanderd)yii\debug\Module::panels
as panel class name strings (qiangxue)DefaultController::getManifest()
more robust against corrupt files (cebe)groovy
script for updating making it compatible with ES >1.3.0 (cebe)ActiveRecord::unlink()
was failing in some situations when working with relations via array valued attributes (cebe)ActiveRecord::update()
and ::delete()
including support for routing needed for updating records with parent relation (cebe)yii\gii\generators\crud\Generator
to support customizing view path for the generated CRUD controller (qiangxue)--overwrite
option to Gii console command to support overwriting all files (motin, qiangxue)yii\mongodb\ActiveRecord
saves null
as _id
, if attributes are empty (klimov-paul)yii\mongodb\Query
and yii\mongodb\ActiveQuery
(klimov-paul)true
is returned instead, now only OK
will result in a true
while all other values are returned as is (cebe){path
was generating absolute URLs instead of relative ones (samdark, motzel)yii\db\Expression
to be used as the value (cebe, stevekr)yii\sphinx\QueryBuilder
does not support comparison operators (>,<,>= etc) in where specification (klimov-paul)yii\db\Exression
to QueryBuilder LIKE
conditions (cebe)yii\console\controllers\AssetController
breaks CSS URLs on Windows (klimov-paul)yii\console\controllers\AssetController
breaks CSS URLs in case target file localed at yii\web\AssetManager::basePath
root (klimov-paul)RangeValidator
(githubjeka, qiangxue)yii\i18n\Formatter::decimalSeparator
and yii\i18n\Formatter::thousandSeparator
where not configurable when intl is not installed (execut, cebe)yii\web\Session::getHasSessionId()
(qiangxue)yii\bootstrap\DropDown
(aryraditya)yii\bootstrap\DropDown
should register bootstrap plugin asset (zelenin)Module::afterAction()
was called even when beforeAction()
returned false (cebe)yii\behaviors\Cors
causes “undefined index” error when its cors
is configured (qiangxue)Html::addCssStyle()
wasn’t correctly setting style passed in array (kartik-v, samdark)yii\rbac\DbManager
to prevent database exceptions when $userId
is empty (samdark)$viewFile
and $params
to the EVENT_BEFORE_RENDER
and EVENT_AFTER_RENDER
events for View
(qiangxue)removeChildren()
to yii\rbac\ManagerInterface
and implementations (samdark)yii\base\Application::loadedModules
(qiangxue)startsWith()
and endsWith()
to yii\helpers\StringHelper
. Methods are binary-safe, multibyte-safe and optionally case-insensitive (armab)asEmail()
, asImage()
and asUrl()
methods of yii\i18n\Formatter
(alxkolm, samdark)yii\base\Module
as concrete module classes (qiangxue)yii\widgets\Pjax
should end application right after it finishes responding to a pjax request (qiangxue)yii\db\mssql\Schema::getTableSchema()
should return null when the table does not exist (qiangxue)Widget::run()
when a widget is used as a container and as a self-contained object (qiangxue)yii\base\Application::bootstrap
may fail to load some components if they are specified as class names (qiangxue)yii\console\controllers\AssetController
now respects data URL resources (klimov-paul)defaultRoles
set in RBAC manager was not working as specified (qiangxue)ActiveQuery::indexBy()
may cause relational AR queries to generate incorrect relational results (qiangxue)yii\di\Container
did not handle the $config
parameter well in case when it does not have a default value (qiangxue)yii.activeForm.destroy()
did not remove submit
event handlers (qiangxue)yii\db\mysql\Schema
(terazoid, qiangxue)yii\di\Container::has()
did not return correct value (mgrechanik, qiangxue)yii\helpers\FileHelper::copyDirectory()
pattern not working (klimov-paul)ServiceLocator
still returns the old component after calling set()
with a new definition (qiangxue)CaptchaAction
was using a wrong content type (MDMunir, qiangxue)asArray
, it is not respected by the via
relational query (qiangxue)MessageController::saveMessagesToDb()
(advsm)Captcha
(qiangxue, klevron)yii\filters\HttpCache
does not work as expected when session is started before the filter (qiangxue)GridView
may generate two different pagers/sorters if the layout configures two pagers/sorters (qiangxue)DynamicModel::validateData()
does not call validate()
if the $rules
parameter is empty (qiangxue)ActiveRecord::unlinkAll()
. (qiangxue, cebe)QueryBuilder::batchInsert()
does not typecast input values (qiangxue)\yii\base\Formatter
by converting strings to float (kartik-v)yii\rbac\PhpManager::getChildren()
returns null instead of expected empty array (qiangxue)template
with encodeLabel
=> false (creocoder, umneeq)\yii\widgets\ActiveForm::errorSummaryCssClass
when it contains multiple classes (creocoder, umneeq)Html::to()
should not prefix base URL to URLs that already contain scheme (qiangxue)Yii::$app->session
may cause a PHP error (qiangxue)CaptchaValidator
clientside error message wasn’t formed properly (samdark)yii\db\mysql\Schema
(stevekr)yii\widgets\Pjax
was incorrectly setting container id (mitalcoi)SqlDataProvider
does not work with Oracle and SQL Server (qiangxue, miramir)yii\web\UploadedFile
and return null if no file was uploaded (OmgDef)yii message/extract
wasn’t properly writing to po files in case of multiple categories (samdark)Security::compareString()
timing depend only on length of $actual
input and add unit test. (tom--)yii\base\Model::isAttributeRequired()
should check if the when
option of the validator is set (thiagotalma)yii help
command was listing incorrect action names for methods like actionSayNO
(samdark)\yii\web\AssetConverter
(samdark)yii\test\BaseActiveFixture::unload()
does not clean up the internal cached data (qiangxue)yii\filters\auth\CompositeAuth
should not trigger error as long as one of the methods succeeds (qiangxue)yii\console\controllers\MessageController
handles category name containing dot incorrectly (klimov-paul)yii\db\ActiveQuery
is used to build sub-queries, its WHERE clause is not correctly generated (qiangxue)joinWith()
called by a relation was ignored by yii\db\ActiveQuery
(stepanselyuk)yii\rest\CreateAction
, yii\rest\UpdateAction
and yii\rest\DeleteAction
should throw 500 error if the model operation returns false without validation errors (qiangxue)UniqueValidator
and ExistValidator
did not respect query conditions added by default scope (qiangxue)ActiveForm::validationDelay
should be applied to user types only (qiangxue)yii\console\controllers\CacheController
does not check if cache component instance of ‘yii\caching\Cache’ (klimov-paul)\yii\console\Application::runAction()
(samdark)\yii\web\UrlManager
(klimov-paul)StringHelper::byteSubstr()
in some edge cases (cebe)yii\helpers\Security
converted into application component, cryptographic strength improved (klimov-paul)Module::getInstance()
to allow accessing the module instance from anywhere within the module (qiangxue)CookieCollection::has()
will return false for expired or removed cookies (qiangxue)yii\db\Query::->where()
operand format (samdark)yii\widgets\ActiveForm::enableClientScript
to support turning on and off client side script generation (qiangxue)yii\db\IntegrityException
is now thrown on database integrity errors instead of general yii\db\Exception
(samdark)yii\caching\MemCache::persistentId
and yii\caching\MemCache::options
(qiangxue)Html::errorSummary()
(qiangxue)yii\debug\Module::enableDebugLogs
to disable logging debug logs by default (qiangxue)yii\rbac\PhpManager
now supports more compact data file format (qiangxue)GridView
filters (ivan-kolmychek)yii\filters\auth\CompositeAuth
will send out challenges from all auth methods (qiangxue)useTablePrefix
option to the model generator for Gii (horizons2)yii\filters\AccessControl::user
to support access control with different actors (qiangxue)export()
and exportAsString()
methods to yii\helpers\BaseVarDumper
(klimov-paul)yii\widgets\ActiveForm::fieldConfig
(qiangxue)$checkAjax
to yii\web\User::loginRequired()
(qiangxue)yii\filters\HttpCache
(qiangxue)View::theme
using a class name (netyum, qiangxue)BaseMailer
generates better text body from html body (armab)value
in defaultValueValidator
to be a closure (Alex-Code)yii\caching\FileCache::gc()
(klimov-paul)yii\helpers\Html::encode()
now replaces invalid code sequences with “�” (DaSourcerer)unlinkAll()
-method to active record to remove all records of a model relation (NmDimas, samdark, cebe)yii\filters\HttpCache::sessionCacheLimiter
(qiangxue)extensions
in application config (samdark)yii\validators\CompareValidator::type
to support type conversion before comparing values (qiangxue)currencyCode
to yii\i18n\Formatter
(leandrogehlen)yii\widgets\Menu
(arturf)mime.types
file from apache http project to dected mime types by file extension (cebe, pavel-voronin, trejder)yii\web\User::enableSession
to support authentication without using session (qiangxue)yii\db\Connection
(qiangxue)FileValidator::mimeTypes
to support validating MIME types of files (Ragazzo)FileValidator::checkExtensionByMimeType
to support validating file types against file mime-types (Ragazzo)yii\console\controllers\BaseMigrateController
extracted (klimov-paul)yii\widgets\Breadcrumbs::$links
. Allows individual link to have its own template
(creocoder, umneeq)\yii\Inflector::slug()
improvements (samdark)
\yii\Inflector::transliterate()
that could be replaced with custom translit implementation.BlameableBehavior
, SluggableBehavior
and TimestampBehavior
(creocoder)$message
variable (qiangxue)yii\widgets\Menu
to encode each item’s label separately (creocoder, umneeq)init
event to ActiveQuery
classes (qiangxue)\yii\rbac\PhpManager
adjustments (samdark)
authFile
. Added itemFile
, assignmentFile
and ruleFile
.createdAt
and updatedAt
are now properly filled with corresponding file modification time.save()
and load()
are now protected instead of public.FileHelper
, added $options parameter in FileHelper::removeDirectory()
(resurtm)Security::generateRandomBytes()
, improved tests (samdark)Html::error()
and Html::errorSummary()
are now accepting encode
option. If set to false it prevents encoding of error messages (samdark)yii\base\Security
.beforeCopy
, afterCopy
, forceCopy
properties to AssetManager (cebe)ActiveForm::validateOnBlur
and ActiveField::validateOnBlur
(qiangxue)absoluteAuthTimeout
to yii\web\User (ivokund, nkovacs)yii\filters\HttpCache
failed to comply to RFC 7232 (DaSourcerer)inline
parameter to yii\web\Response::xSendFile()
(klimov-paul)ActiveForm
(Alex-Code)yii\caching\MemCache
(xjflyttp)UrlRule
(tadaszelvys)yii\behaviors\Sluggable
(klimov-paul)yii\web\Response::setDownloadHeaders()
(pawzar)yii\db\Schema::createColumnSchema()
to be able to customize column schema used (mcd-php)yii\helpers\BaseFileHelper::findFiles()
(klimov-paul)ActiveForm
and ActiveField
validation errors is now configurable (Alex-Code)yii\web\Session::addFlash()
(restyler)yii\helpers\FileHelper::mimeMagicFile
(qiangxue)$pageSize
parameter to Pagination::createUrl()
to allow creating URLs with arbitrary page sizes (cdcchen, qiangxue)beforeFilter
and afterFilter
JS events to GridView
(kartik-v)ActiveForm
(qiangxue)$autoRenew
parameter to yii\web\User::getIdentity()
(qiangxue)Inlfector::$transliterator
that can be used to customize intl transliteration (zinzinday)IN
condition (qiangxue)yii\web\UrlManager::addRules()
to simplify adding new URL rules (qiangxue)yii\console\Controller::EXIT_CODE_NORMAL
and yii\console\Controller::EXIT_CODE_ERROR
constants (samdark)yii\console\MigrateController
now returns yii\console\Controller::EXIT_CODE_ERROR
in case of failed migration (samdark)all
option to MigrateController::actionDown()
action (creocoder, umneeq)exist
validator (creocoder)FileDependency::fileName
(qiangxue)hideOnSinglePage
to yii\widgets\LinkPager
(arturf)in
validator (creocoder)yii\helpers\Inflector::slug
to support more cases for Russian, Hebrew and special characters (samdark)yii\web\Response::enableCsrfCookie
to support storing CSRF tokens in session (qiangxue)yii\db\ColumnSchema::typecast()
into two methods phpTypecast()
and dbTypecast()
to allow specifying PDO type explicitly (cebe)yii\base\Formatter
functionality has been merged into yii\i18n\Formatter
yii\base\Formatter
classyii\console\controllers\AssetController
is now using hashes instead of timestamps (samdark)DbManager
is now initialized via migration (samdark)ActiveForm::fieldConfig
will be merged recursively with the $options
parameter in ActiveForm::field()
(qiangxue)View
. Added Html::csrfMetaTags()
and its call to main layout files (qiangxue)$type
parameter to IdentityInterface::findIdentityByAccessToken()
(qiangxue)yii.allowAction()
and modified yii.confirm()
in yii.js
to support callbacks (tanakahisateru)$key
as a parameter to the callable specified via yii\grid\DataColumn::value
(mdmunir)yii\db\Connection::beginCache()
and endCache()
are removed.yii\db\Connection::cache()
and noCache()
.Command::cache()
and noCache()
.yii\db\Connection::queryCacheDuration
is now used as a default cache duration parameter.sourceLanguage
and language
are now en-US
in order for i18n formatter to work correctly (samdark)fileinfo
PHP extension to the basic requirement of Yii (Ragazzo)FileValidator::types
property is renamed to FileValidator::extensions
(Ragazzo)yii\web\View::registerAssetFiles()
to protected (samdark)MailEvent
class to yii\mail
namespace (cebe)container
option from Html::checkbox()
and Html::radio()
(creocoder)Yii::$app->session->setFlash()
will be removed only if they are accessed (qiangxue)yii\log\FileTarget::$rotateByCopy
now defaults to true to work on windows by default (cebe)yii\caching\GroupDependency
to TagDependency
and added support for associating multiple tags to a single cached data item (qiangxue)mail
component renamed to mailer
, yii\log\EmailTarget::$mail
renamed to yii\log\EmailTarget::$mailer
(samdark)BaseMailer::compose()
will not overwrite the message
parameter if it is explicitly provided (qiangxue)SyslogTarget::facility
from LOG_SYSLOG
to LOG_USER
(dizews)\yii\widgets\LinkPager::$hideOnSinglePage
is now true
by default (samdark)$data
from signature of yii\rbac\ManagerInterface
(samdark)yii\helpers\Html::ul()
and ol()
will return an empty list tag if an empty item array is given (qiangxue)yii\helpers\Url
now uses UrlManager
to determine base URL when generating URLs (qiangxue)inline
and mimeType
options to all file downloading methods provided in yii\web\Response
(qiangxue)YII_PATH
to YII2_PATH
(qiangxue)yii\helpers\Url::to()
will no longer prefix relative URLs with the base URL (qiangxue)yii\widgets\LinkPager
’s nextPageLabel
, prevPageLabel
, firstPageLabel
, lastPageLabel
are now taking false
instead of null
for “no label” (samdark)yii\base\ArrayableTrait::fields()
from function ($field, $model) {
to function ($model, $field) {
(samdark)ActiveForm
(qiangxue)
beforeValidate()
, beforeValidateAll()
, afterValidate()
, afterValidateAll()
, ajaxBeforeSend()
and ajaxComplete()
from ActiveForm
.beforeValidate
, afterValidate
, beforeValidateAttribute
, afterValidateAttribute
, beforeSubmit
, ajaxBeforeSend
and ajaxComplete
events to yii.activeForm
jQuery plugin.ActiveFixture
will reset table in its load()
method instead of unload()
(qiangxue)clearAll()
and clearAllAssignments()
in yii\rbac\ManagerInterface
with removeAll()
, removeAllRoles()
, removeAllPermissions()
, removeAllRules()
and removeAllAssignments()
(qiangxue)$user
as the first parameter of yii\rbac\Rule::execute()
(qiangxue)yii\grid\DataColumn::getDataCellValue()
visibility is now public
to allow accessing the value from a GridView directly (cebe)yii\data\ActiveDataProvider::$query
will not be modified directly with pagination and sorting anymore so it will be reuseable (cebe)yii\rest\ActiveController::$transactional
property and connected functionality (samdark)keyPrefix
property of cache components to be null (qiangxue)prefix
column to yii\log\DbTarget
to have the same amount of information logged as in files and emails (cebe)limit(null)
instead of limit(-1)
in migration controller to be compatible to more backends (cebe)yii\web\Request::cookieValidationKey
must be explicitly specified for each application that wants to use cookie validation (qiangxue)yii\composer\Installer::postCreateProject()
and modified the syntax of calling installer methods in composer.json (qiangxue)Application::controllerMap
and Application::modules
, the former will take precedence (qiangxue)yii\helpers\Html::activeCheckbox()
and activeRadio()
will generate labels by default using the corresponding attribute labels (qiangxue)yii\behaviors\SluggableBehavior
that fills the specified model attribute with the transliterated and adjusted version to use in URLs (creocoder)yii\filters\Cors
CORS filter to allow Cross Origin Resource Sharing (pgaultier)yii\test\ArrayFixture
(Ragazzo)yii\base\InvalidValueException
(qiangxue)yii\caching\ArrayCache
(cebe)visible
setting for DetailView
doesn’t work as expected (qiangxue)FileValidator
and ImageValidator
still trigger uploadRequired
error in some case when skipOnEmpty
is true and no upload is provided (qiangxue)enableAutoLogin
to basic and advanced application templates so “remember me” now works properly (samdark)yii\jui\SliderInput
wasn’t properly initialized (samdark)Inflector::camelize()
(qiangxue)$_SERVER['HTTPS']
in yii\web\Request::getIsSecureConnection()
(ginus, samdark)Session::regenerateID()
call (qiangxue)run()
to execute another action (qiangxue)TRUNCATE
changed to DELETE
to avoid postgresql tables checks (and truncating all tables) (Ragazzo)init --env
when called without parameter actually specified (samdark)Html::activeCheckbox
wasn’t respecting custom values for checked/unchecked state (klevron, samdark)Controller::findLayoutFile()
returns incorrect file path when layout name starts with a slash (qiangxue)QueryBuilder::buildInCondition()
fails to handle array not starting with index 0 (qiangxue)yii\gridview\DataColumn
generates incorrect labels when used with nosql DB and there is no data (qiangxue)yii\base\Theme::pathMap
did not support dynamic update with path aliases (qiangxue)$_SERVER['DOCUMENT_ROOT']
is empty (samdark)missingTranslation
-event (cebe)app
message category was always en
no matter which application sourceLanguage
was used (samdark)Pjax
(tonydspaniard)yii message
tool wasn’t updating message
table (mitalcoi)FileValidator::isEmpty()
always returns true for validate multiple files (ZhandosKz)CreateAction::run()
was using obsolete Controller::createAbsoluteUrl()
method (tonydspaniard)CaptchaAction::run()
was using obsolete Controller::createUrl()
method (tonydspaniard)filterUrl
parameters (qiangxue, AlexGx)app*
or yii*
default app
and yii
sources were not removed (samdark)DbCache
while enabling schema caching may cause infinite loops (qiangxue)reusable
is set true (qiangxue)yii\bootstrap\Nav
and yii\bootstrap\Dropdown
were generating wrong ids for submenus (arturf)CookieCollection::has
always returns false for cookies from browser (sonicgd)ORDER BY
clause when it is not needed (qiangxue)TableSchema::sequenceName
for PostgreSQL should remove the enclosing quotes (katzz0, qiangxue)Call to a member function registerAssetFiles() on a non-object
in case of wrong sourcePath
for an asset bundle (samdark)yii\jui\Spinner
(samdark)http://example.com//////site/about
(samdark)HelpController::getModuleCommands
issue where it attempts to scan a module’s controller directory when it doesn’t exist (jom)$model->load($data)
returned true
if $data
and formName
were empty (samdark)ActiveRelationTrait
preventing ActiveQuery
from clearing events and behaviors on clone (jom)Query::queryScalar
wasn’t making SELECT DISTINCT
queries subqueries (jom)$files
instead of self::$_files[$key]
to allow inheritance (pgaultier)intl
transliteration. Improved transliteration char map. (tonydspaniard)\yii\log\Target::logUser
and added \yii\log\Target::prefix
to support customizing message prefix (qiangxue)Rule
from RBAC Item
(samdark, qiangxue)UniqueValidator
and ExistValidator
(qiangxue)ArrayHelper::getValue()
(qiangxue, cebe)yii\web\View::renderAjax()
and yii\web\Controller::renderAjax()
(qiangxue)ActionColumn::controller
property to support customizing the controller for handling GridView actions (qiangxue)yii\web\User
to start session only when needed. Also prepared it for use without session. (qiangxue)yii\bootstrap\Tabs::linkOptions
(kartik-v)yii\web\Controller::createAbsoluteUrl()
(samdark)ActiveQuery::joinWith()
and ActiveQuery::innerJoinWith()
to support joining with relations (qiangxue)BaseActiveRecord::markAttributeDirty()
(qiangxue)BaseActiveRecord::updateAttributes()
(qiangxue)QueryBuilder::checkIntegrity
and QueryBuilder::resetSequence
(Ragazzo)Connection::$pdoClass
property (Ragazzo)ActiveField::label()
(qiangxue)yii\bootstrap\NavBar
with containerOptions
, innerContainerOptions
and renderInnerContainer
(creocoder)@webroot
and @web
are now available right after the application is initialized (qiangxue){controller/action}
(creocoder)yii message/extract
is now able to generate .po
files (SergeiKutanov, samdark)filter
property to ExistValidator
and UniqueValidator
to support adding additional filtering conditions (qiangxue)yii message/extract
is now able to save translation strings to database (kate-kate, samdark)en
from en-US
if message translation isn’t found (samdark)en
from en-US
if file not found (samdark)sourceLanguage
and language
are now en
(samdark)category.name
as attribute name (creocoder)name:format:label
(creocoder)Html
helper now supports rendering “data” attributes (qiangxue)yii migrate
now automatically creates migrations
directory if it does not exist (samdark)yii\web\AssetManager::publish()
, yii\web\AssetManager::getPublishedPath()
and yii\web\AssetManager::getPublishedUrl()
to support aliases (vova07)X-HTTP-Method-Override
header in yii\web\Request::getMethod()
(pawzar)addCssStyle()
, removeCssStyle()
, cssStyleFromArray()
and cssStyleToArray()
to Html
(qiangxue, kartik-v, Alex-Code)dataType
for $.ajax
call in yii.activeForm.js (Borales)relatedModel.attribute
, will be received from the related model if it available (djagya)yii\db\Query::count()
and other query scalar methods now properly handle queries with GROUP BY clause (qiangxue)yii\base\Formatter
(VinceG)console\Controller::globalOptions()
to options($actionID)
to (make it possible to) differentiate options per action (hqx)yii\base\Formatter
(drenty)yii\db\ActiveRecord::loadDefaultValues()
that fills default values from DB schema (samdark)FilterValidator::skipOnArray
so that filters like trim
will not fail for array inputs (qiangxue)DateTimeInterface
in Formatter
(ivokund)isEmpty
check for all validators (qiangxue)yii\base\Application::bootstrap
and yii\base\BootstrapInterface
to support running bootstrap classes when starting an application (qiangxue)afterSave()
so information about changed attributes is available in afterSave
-event (cebe)Application::end()
(qiangxue)favicon.ico
and robots.txt
to default application templates (samdark)Widget::autoIdPrefix
to support prefixing automatically generated widget IDs (qiangxue)init
of advanced application now allows to specify answer for overwriting files via init --overwrite=n
(samdark)TableSchema::fullName
property (qiangxue)beforeRun()
and afterRun()
to yii\base\Action
(qiangxue)yii\base\Formatter
(dizews)yii\web\View::POS_LOAD
(qiangxue)yii\web\Response::clearOutputBuffers()
(qiangxue)QueryBuilder::buildLimit()
to support big numbers (qiangxue)Pagination::getLinks()
(qiangxue)Pagination
(qiangxue)yii\web\UrlRuleInterface
and yii\web\CompositeUrlRule
(qiangxue)yii\web\Request::getAuthUser()
and getAuthPassword()
(qiangxue)isAssociative()
and isIndexed()
to yii\helpers\ArrayHelper
(qiangxue)addSelect
to yii\db\Query
(Alex-Code)yii\db\Connection
(nineinchnick, resurtm)ActiveField::hiddenInput()
(qiangxue)Sort
to use comma to separate multiple sort fields and use negative sign to indicate descending sort (qiangxue)yii\web\User::loginRequired()
now returns the Response
object instead of exiting the application (qiangxue)yii\web\Session::autoStart
and added hasSessionId
. Session will be automatically started when accessing session data (qiangxue)QueryBuilder::buildLikeCondition()
will now escape special characters and use percentage characters by default (qiangxue)Html::activeCheckboxList()
and Html::activeRadioList()
will submit an empty string if no checkbox/radio is selected (qiangxue)Captcha::options
(qiangxue)yii\base\Controller::getActionParams()
(samdark)CheckboxColumn
now renders checkboxes whose values are the corresponding data key values (qiangxue)Response::sendFile()
and other file sending methods will not send the response (qiangxue)beforeSubmit
in yii.activeform
is now executed after validation and before form submission (6pblcb)yii\web\Request::acceptedLanguages
to acceptableLanguages
(qiangxue)yii\web\Request::getPost()
, getPut()
, getDelete()
, getPatch()
in favor of getBodyParam()
(cebe)yii\web\Request::get()
to getQueryParams()
and getRestParams()
to getBodyParams()
(cebe)yii\web\Request::get($name = null, $defaultValue = null)
and yii\web\Request::post($name = null, $defaultValue = null)
(samdark)FileHelper
(nineinchnick)yii\web\Request::acceptTypes
and renamed yii\web\Request::acceptedContentTypes
to acceptableContentTypes
(qiangxue)ActiveRelation
class and ActiveRelationInterface
, moved the functionality to ActiveQuery
.
All relational queries are now directly served by ActiveQuery
allowing to use custom scopes in relations
and also to declare arbitrary queries as relations.
Also removed ActiveRecordInterface::createActiveRelation()
(cebe)I18N::translations
(qiangxue, Ragazzo)return
in Widget::run
(samdark)StringHelper::diff()
, Moved phpspec/php-diff
dependency from yiisoft/yii2
to yiisoft/yii2-gii
(samdark)tinyint(1)
as integer instead of boolean (qiangxue)yii\base\Model::DEFAULT_SCENARIO
to yii\base\Model::SCENARIO_DEFAULT
(samdark)ActiveRecord::create()
to populateRecord()
and changed signature. This method will not call instantiate() anymore (cebe)MaskedInput
now defaults to form-control
(qiangxue)Yii::$app->exception
has now moved to Yii::$app->errorHandler->exception
yii\base\ErrorHandler
was split into yii\web\ErrorHandler
and yii\console\ErrorHandler
DetailView
’s name:format:label
to attribute:format:label
to match GridView
(samdark)yii\base\ErrorException
now extends \ErrorException
(samdark)Module::controllerPath
is now read only, and all controller classes must be namespaced under Module::controllerNamespace
. (qiangxue)yii\helpers\Url
.yii\helpers\Html::url
, use yii\helpers\Url::to
instead.yii\web\Controller::createUrl
and yii\web\Controller::createAbsoluteUrl
, use yii\helpers\Url::toRoute
instead.yii\web\Controller::getCanonicalUrl
, use yii\helpers\Url::canonical
instead.UrlManager
(gonimar, qiangxue)FileCache::keyPrefix
defaults to empty string now (qiangxue)Application::preload
in favor of Application::bootstrap
(qiangxue)yii\base\Formatter
to Y-m-d
and H:i:s
(qiangxue)tbl_
default for table prefix (samdark)ActiveRecord::createQuery()
with find()
to simplify customizing ActiveQuery classes (qiangxue)findOne()
and findAll()
to replace the usage of ActiveRecord::find($condition)
. (samdark, qiangxue)yii\web\Request::getUserIP()
will return null if it cannot detect user IP address (qiangxue)yii\jui\Widget::clientEventsMap
to clientEventMap
(qiangxue)ActiveRecord::getPopulatedRelations()
to getRelatedRecords()
(qiangxue)attributeName
and className
to targetAttribute
and targetClass
for UniqueValidator
and ExistValidator
(qiangxue)yii\widgets\InputWidget::options
(qiangxue)urlCreator
and button creators for yii\gridview\ActionColumn
(qiangxue)4.6.*
.index.php
,
index-test.php
and yii
files to point to the new location of Yii.php
(qiangxue, cebe)-local
config not to expose it to VCS (samdark)yii\web\Request::acceptedLanguages
to acceptableLanguages
(qiangxue)Arrayable
from yii\Object
(qiangxue)View
at the end of endBody()
. It was done in endPage()
previously (qiangxue)csrf-var
to csrf-param
for CSRF header name (Dilip)mails
to mail
(qiangxue)fooVar
to fooParam
for various classes (qiangxue)
ActiveForm::ajaxVar
to ajaxParam
Pagination::pageVar
to pageParam
Sort::sortVar
to sortParam
yii\web\Request::csrfVar
to csrfParam
yii\web\Request::methodVar
to methodParam
UrlManager::routeVar
to routeParam
yii\web\Session::flashVar
to flashParam
yii\web\User::idVar
to idParam
yii\web\User::authTimeoutVar
to authTimeoutParam
yii\web\User::returnUrlVar
to returnUrlParam
View::viewFile
and removed ViewEvent::viewFile
(qiangxue)Controller::afterAction()
, Module::afterAction()
and ActionFilter::afterAction()
to pass $result
by value instead of reference (qiangxue)yii\base\Extension::init()
is renamed to bootstrap()
(qiangxue)getComponent()
and setComponent()
in Application
and Module
are renamed to get()
and set()
respectively. (qiangxue)Yii::createObject()
is changed. Constructor parameters must be passed as the second parameter. (qiangxue)Yii::$objectConfig
is removed. You should use Yii::$container->set()
to configure default settings of classes. (qiangxue)yii\grid\Column::getDataCellContent()
and renamed yii\grid\DataColumn::getDataCellContent()
to yii\grid\DataColumn::getDataCellValue()
(cebe)yii\log\Logger
is split into yii\log\Logger
and yii\log\Dispatcher
. (qiangxue)yii\filters
(qiangxue)yii\rbac\PhpManager
. (qiangxue)yii\web\User::checkAccess()
to yii\web\User::can()
(qiangxue)yii\di\Container
and yii\di\ServiceLocator
(qiangxue)yii\widgets\Pjax
and enhanced GridView
to work with Pjax
to support AJAX-update (qiangxue)ContentNegotiator
to support response format and language negotiation (qiangxue)yii\base\DynamicModel
to support ad-hoc data validation (qiangxue)AttributeBehavior
and BlameableBehavior
, and renamed AutoTimestamp
to TimestampBehavior
(lucianobaraglia, qiangxue)yii\web\ViewAction
that allow you to render views based on GET parameter (samdark)framework\log\SyslogTarget
that is able to write log to syslog (miramir, samdark)yii\bootstrap\ActiveForm
and yii\bootstrap\ActiveField
(mikehaertl)yii\widgets\ActiveForm::beginField()
and endField()
(qiangxue)yii\codeception\DbTestCase
(qiangxue)yii\web\GroupUrlRule
(qiangxue)yii\filters\RateLimiter
(qiangxue)HttpBasicAuth
, HttpBearerAuth
, QueryParamAuth
, and CompositeAuth
(qiangxue)HtmlResponseFormatter
and JsonResponseFormatter
(qiangxue)Official extensions released in this version:
Elasticsearch integration: ActiveRecord and Query
Redis integration: ActiveRecord, Cache and Session
Sphinx integration: ActiveRecord and Query