@dreamsxin dreamsxin released this Jul 31, 2018 · 14 commits to master since this release

Assets 2

Fix complie error of mac
Fix some memory leak

Add class Phalcon\Snowflake

<?php
$snowflake = new Phalcon\Snowflake;
$id = $snowflake->nextId();
$desc = $snowflake->parse($id);

Add class Phalcon\Aop

<?php

class MyServices
{
	private $val = 0;
	public function doVal() {
		echo 'Myval='.$this->val.PHP_EOL;
		$this->val++;
		echo 'Myval='.$this->val.PHP_EOL;
	}
}

Phalcon\Aop::addBefore('read MyServices->val', function($obj){
	var_dump('before read');
	echo $obj->getPropertyName().'='.$obj->getPropertyValue().PHP_EOL;
});
Phalcon\Aop::addAfter('read MyServices->val', function($obj){
	var_dump('after read');
	echo $obj->getPropertyName().'='.$obj->getPropertyValue().PHP_EOL;
});
Phalcon\Aop::addBefore('write MyServices->val', function($obj){
	var_dump('before write');
	echo $obj->getPropertyName().'='.$obj->getPropertyValue().PHP_EOL;
	$obj->setAssignedValue(3);
});
Phalcon\Aop::addAfter('write MyServices->val', function($obj){
	var_dump('after write');
	echo $obj->getPropertyName().'='.$obj->getPropertyValue().PHP_EOL;
});
$services = new MyServices();
$services->doVal();

Add class Phalcon\Logger\Adapter\Direct
Add class Phalcon\Xhprof

Add method Phalcon\Date::add
Add method Phalcon\Forms\Form::setValue
Add method Phalcon\Arr::flip
Add method Phalcon\Http\Response::getJsonContent

Add allowEmpty option for model cache
Support totalItems options for class Phalcon\Paginator\Adapter\QueryBuilder

Optimize class Phalcon\Mvc\Application
Optimize class Phalcon\Socket\Server

<?php

class IndexController extends Phalcon\Mvc\Controller {
	public function indexAction() {
		return ['status' => 'ok'];
	}
}

$di = new Phalcon\Di\FactoryDefault();
$di->response->setContentType('application/json');
$application = new Phalcon\Mvc\Application();
$application->useImplicitView(false);

echo $application->handle('/index/index')->getContent();

@dreamsxin dreamsxin released this Jan 6, 2018 · 236 commits to master since this release

Assets 2

Add memory entry management
Fix python lock
Fix bug about digital strings increase or reduce the both spaces cannot be saved

Upgraded phpunit

Support label for tag
Support daterange filter

Allow sets statsKey to false
Add prefix __ for property method
Add method Phalcon\Cache\Adapter\Redis::flushDb

Optimization of event and event management

$eventsManager = new Phalcon\Events\Manager();

$eventsManager->attach('model:beforeQuery', function($event, $model, $data, $prevdata) {
	if (!$prevdata) {
		return ['data' => 1];
	}
	return $prevdata;
});

$eventsManager->attach('model:beforeQuery', function($event, $model, $data, $prevdata) {
	if (!$prevdata) {
		return [];
	}
	$prevdata['data2'] = 2;
	return $prevdata;
});

$di = new Phalcon\Di\FactoryDefault;
$di->set('modelsManager', function() use ($eventsManager) {
	$modelsManager = new Phalcon\Mvc\Model\Manager();
	$modelsManager->setEventsManager($eventsManager);
	return $modelsManager;
}, true);

class Robots extends Phalcon\Mvc\Model {
	public function beforeQuery($event, $data, $prevdata) {
		if (!$prevdata) {
			return [];
		}
		$prevdata['data3'] = 3;
		return $prevdata;
	}
}

var_dump(Robots::find());

Output

array(2) {
  ["data"]=>
  int(1)
  ["data2"]=>
  int(2)
  ["data3"]=>
  int(3)
}
Assets 2

Fix bug in method Phalcon\Mvc\Model::findFirst
Fix bug about PHQL_T_TS_CONTAINS_IN

Support through method Phalcon\Mvc\Model::selectSource selection of table
Support through method Phalcon\Mvc\Model::selectSchema selection of schema

Add class Phalcon\Cache\Backend\Lmdb
Add class Phalcon\Chart\Captcha\Tiny
Add class Phalcon\Py
Add class Phalcon\Py\Object
Add class Phalcon\Py\Matplot

Add method Phalcon\Mvc\Model\Manager::setDefaultReadConnectionService
Add method Phalcon\Mvc\Model\Manager::setDefaultWriteConnectionService
Add method Phalcon\Config::setup

Assets 2

Support specify the metadata cache key

Fix memory leak in method Phalcon\Di\Injectable::fireEventData
Fix memory leak in class Phalcon\Http\Client\Adapter\Curl
Fix bug in method Phalcon\Mvc\View::partial
Fix core dump in method Phalcon\Mvc\Model::findFirst

Add method Phalcon\Mvc\Url::isLocal
Add method Phalcon\Mvc\Model::exits
Add method Phalcon\Arr::aggr
Add method Phalcon\Arr::group

Add static method Phalcon\Mvc\Model::group

Add class Phalcon\ExitException
Add class Phalcon\Paginator\Adapter
Add class Phalcon\Storage\Datrie
Add class Phalcon\Storage\Lmdb
Add class Phalcon\Storage\Lmdb\Cursor
Add class Phalcon\Storage\Leveldb
Add class Phalcon\Storage\Leveldb\Iterator
Add class Phalcon\Storage\Leveldb\Writebatch

@dreamsxin dreamsxin released this Jun 28, 2017 · 464 commits to master since this release

Assets 2

Fix memory leak in class Phalcon\Mvc\Model
Remove ast cache
Add debug info of method Phalcon\Dispatcher
Add method Phalcon\Debug::dumpVar
Add method Phalcon\Mvc\Model\Query::setIndex
Add method Phalcon\Mvc\Model\Query::getIndex
Add events beforeGenerateSQLStatement/afterGenerateSQLStatement for query

Add class Phalcon\Profiler

Assets 2

Fix some memory leak
Enhance class Phalcon\Validation

Updated method Phalcon\Db\Adapter::update

Add method Phalcon\Arr::first
Add method Phalcon\Mvc\Model\Criteria::count
Add class Phalcon\Cli\Options
Add class Phalcon\Cli\Color
Add class Phalcon\Server\Simple

Assets 2

Fix memory leak
Support endian for binary some method
Registering modelsRow service in DI

Add method Phalcon\Dispatcher::getLashHandle
Add method Phalcon\Router::setMode
Add method Phalcon\Crypt::setPadding

Add class Phalcon\Cache\Backend\Wiredtiger
Add class Phalcon\Router
Add class Phalcon\User\Component
Add class Phalcon\User\Logic
Add class Phalcon\User\Module
Add class Phalcon\User\Plugin

@dreamsxin dreamsxin released this Mar 29, 2017 · 730 commits to master since this release

Assets 2

Add class Phalcon\Cache\Backend\Yac
Add class Phalcon\ContinueException

Add method Phalcon\Validation::setLabelDelimiter
Add method Phalcon\Di\Injectable::attachEvent

Support callback beforeRenderView/afterRenderView/ fot controller

@dreamsxin dreamsxin released this Mar 15, 2017 · 751 commits to master since this release

Assets 2

Fix bug about method Phalcon\Http\Client\Adapter\Curl::sendInternal
Fix bug about method Phalcon\Mvc\Model\Manager::getRelationRecords
Fix bug check column type with auto-increment

Add class Phalcon\Storage\Wiredtigger
Add class Phalcon\Storage\Bloomfilter
Add class Phalcon\Translate\Adapter\Php
Add class Phalcon\Intrusive\Rbtree
Add class Phalcon\Server
Add class Phalcon\Server\Http

Add static method Phalcon\Kernel::message

@dreamsxin dreamsxin released this Feb 18, 2017 · 768 commits to master since this release

Assets 2

Add class Phalcon\Storage\Btree
Add method Phalcon\Dispatcher::hasParam

Fix bug about class Phalcon\Chart\Qrcode
Fix bug about method Phalcon\Mvc\Model\Query::_prepareInsert
Fix bug about method Phalcon\Security::checkToken