Migration extension 2.0 released

Migration v2.0 extension has been released with the ability to generate updating migration based on the current database table structure and table migration history.

Previously Migration was able to generate only creating migrations based on the current database table structure - now it can scan migration history and generate virtual table schema based on it and then compare it with current table structure to generate updating migration.

Yii development notes 1-3

Three posts about how Yii development goes from Alexander Makarov from core team:

How to Program With Yii2: Running Cron Services

An aricle on how to run background jobs periodically via cron and Yii console controllers.

Twig extension 2.1.0 released

A not backwards compatible version 2.1.0 was releaseed. It adds support for scalar global variables, unifies path() and url() syntax to match Url::to() and makes package more flexible by using DI container to instantiating extensions.

Which Yii 2 project template to choose, basic or advanced?

The article compares basic application template and advanced application template. There are some tips and a good feature chart at the end.

Yii2 PhpStorm plugin was updated

New version provides wide functionality for code completion in Yii arrays. The main improvement is about supporting Yii::createObject() and Object::__construct(). Those methods are widely used in the framework so there are many places where code completion will work much better in these cases:

  • Array in $config parameter of yii\base\Object or its descendants constructor
  • Array that has "class" key containing valid class representation: a fully qualified class name as a string, ClassName::class or Class::className()
  • Array value which refers to one of standard Yii components such as "db", "request", or "mailer". File with this array should be located in a directory called "config"
  • WidgetClass::widget() and WidgetClass::begin() calls if WidgetClass is a descendant of yii\base\Widget
  • $field->widget() method call on yii\widgets\ActiveField and its descendants
  • Inside array in GridView "columns" key
  • Yii::createObject() method

New developer has joined the project so we expect the plugin to develop faster making Yii framework even better.

AngularJs extension to consume Yii 2.0 RESTful API

angular-yii2-model has been released. It is a simple and lightweight AngularJS 1.x service designed to consume Yii 2.0 RESTful API framework and its built-in HATEOAS.

PhpStorm 2017.1 Public Preview

A new PhpStorm Public Preview version was released. It's not a final version so it could be unstable but it definitely worth trying since there are some features which directly affect working with Yii:

  • Support of the Codeception testing framework.
  • Recognition of PHP class names in strings.
  • Current scope highlighting for alternative syntax.

Yii 2.0 Logging and PSR-3

Alexander Makarov from Yii core team writes on Yii logging and PSR-3.

How to Program With Yii 2: ActiveRecord

Yii 2 series at tuts+ continues with an summary article about ActiveRecord.