How to add a date range picker to filter for dates on a GridView for Yii 2

Antonio Ramirez writes about adding custom date range filter to GridView column. Other custom grid filtering may be applied the same way.

Identity map trait for ActiveRecord

An extension gives an ability to use identity map pattern for any ActiveRecord model. The idea is, once model is retrieved, to save its data to a map and, if it's retrieved second time (even using different method), reuse it insttead of querying database again.

JQuery UI extension version 2.0.6 released

Yii team released version 2.0.6 of JQuery UI extension which fixes event maps for yii\jui\Draggable, yii\jui\Droppable and yii\jui\Resizable.

StackOverflow launched documentation initiative

StackOverflow just launched beta of documentation initiative. Yii 2.0 is already there with some good info. Anyone registered may contribute.

How to Program With Yii 2: Uploading Files

Jeff Reifman's article published at tuts+ this time is about integrating file uploading extensions into the application. The FileInput Widget by Kartik Visweswaran and The 2Amigos BlueImp File Uploader are explained.

Yii 2.0.9 released

Yii team released version 2.0.9 which is a minor release that contains about 60 new features and bug fixes. Details, including review of enhancemens, are available in official announcement.

Building Your Startup: Customizing the Meeting View

Another article from a series called "Building Your Startup With PHP" written by Jeff Reifman was published at Tuts+. This article is focused on improving what's done so far, refactoring, designing and implementing new features.

AuthClient extension version 2.0.6 released

Yii team released new version of AuthClient extension. GitHub now retrieves user email even if it is set as 'private' at GitHub account, Twitter got support for user attribute request params, automatic 'refresh access token' requests could now be disabled.

Boost composer-asset-plugin update speed

If you're using a lot of bower and npm assets with Yii 2.0 you might encounter long running composer update tasks.

Luckily this issue can be avioded with the recently released version 1.2.0 of fxp/composer-asset-plugin, which can be confiugred to use native git instead of GitHub REST-API calls.

HTTP client extension version 2.0.0 released

Yii team relased official HTTP client extension created mainly by Paul Klimov. The extension itself was ready for release long time ago but since there's PSR-7, there were debates about should it be released without it. Finally, it was decided that it's a good idea since, first of all, it's already adopted by many projects, and second, PSR-7 support could be added in further major versions.

Composing and performing HTTP requests looks like the following:

use yii\httpclient\Client;

$client = new Client();
$response = $client->createRequest()
    ->setMethod('post')
    ->setUrl('http://example.com/api/1.0/users')
    ->setData(['name' => 'John Doe', 'email' => 'johndoe@domain.com'])
    ->send();
if ($response->isOk) {
    $newUserId = $response->data['id'];
}