Yii framework 3.0.0 – Major Alfa Release

Yii Frame work

On June 10th, 2018 was released the first alfa version of the new major update to the Yii framework 3.0.0

New in Yii 3.0

  • Package “ezyang/htmlpurifier” has been made optional and is not installed by default
  • Yii autoloader is removed in favor of Composer’s PSR-4 implementation
  • Removed HHVM-specific code
  • Removed APC support in ApcCache, APCu works as before
  • The behavior of yii\grid\DataColumn::$filterInputOptions is changed when the default value is overwritten
  • Moved masked input field widget into separate extension https://github.com/yiisoft/yii2-maskedinput
  • Mail message composition extracted into the separate class,yii\mail\Composer which setup is available via yii\mail\BaseMailer::$composer
  • Renamed yii\base\InvalidParamException to yii\base\InvalidArgumentException
  • Updated the fallback date formats used when no intl extension is installed to match the defaults of the latest ICU version
  • Removed XCache and Zend data cache support as caching backends
  • Updated yii\widgets\ActiveField::hint() method signature to match label()
  • Removed yii\base\Object::className() in favor of native PHP syntax ::class, which does not trigger autoloading
  • Minimum required version of PHP is 7.1 now

Enhancements in Yii 3.0

  • Use random_int() instead of mt_rand() to generate cryptographically secure pseudo-random integers
  • objects yii\helpers\ReplaceArrayValue, yii\helpers\UnsetArrayValue now support restoring after being exported with var_export() function
  • Added yii\web\AssetConverter::$isOutdatedCallback allowing a custom check for outdated asset conversion result
  • Added serialization abstraction layer under yii\serialize* namespace
  • Added support for PSR-3 ‘Logger’
  • optimized yii\filters\AccessController on processing access rules
  • Add $checkAjax parameter to method yii\web\Controller::redirect() which controls redirection in AJAX and PJAX requests
  • Mail view rendering encapsulated into yii\mail\Template class allowing rendering in isolation and access to yii\mail\MessageInterface instance via $this->context->message inside the view
  • CAPTCHA rendering logic extracted into yii\captcha\DriverInterface, which instance is available via yii\captcha\CaptchaAction::$driver field
  • yii\web\Request::getBodyParams() now generates 415 ‘Unsupported Media Type’ error on invalid or missing ‘Content-Type’ header
  • The result of yii\web\Request::getBodyParams() now includes uploaded files
  • Uploaded file retrieve methods have been moved from yii\http\UploadedFile to yii\web\Request
  • Added support for PSR-7 ‘HTTP Message’
  • Caching implementation refactored according to PSR-16 ‘Simple Cache’ specification

You can download and test the latest release here

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.