Skip to content

@dreamsxin dreamsxin released this Nov 11, 2020 · 12 commits to master since this release

Support PHP8 RC3

Add cache for paginator query builder

Add constant Phalcon\Db::ARRAY, Phalcon\Db::OBJECT

Add method Phalcon\Binary::pack/unpck
Add method Phalcon\Binary::setbit/getbit
Add method Phalcon\Validation\Message::jsonSerialize
Add method Phalcon\Arr::sort
Add method Phalcon\Mvc\View::setup

Add class Phalcon\Num/Phalcon\Num\Ndarray
Add class Phalcon\JWT

Assets 2

@dreamsxin dreamsxin released this Nov 28, 2019 · 107 commits to master since this release

Support for PHP 7.4

Assets 2

@dreamsxin dreamsxin released this Nov 4, 2019 · 131 commits to master since this release

Fix memory leak in class Phalcon\Cli\Color

Support unix domain socket for async

Add method Phalcon\Async\Context::setVar
Add method Phalcon\Async\Context::getVar

Add example websocket-server.php
Add example websocket-client.php
Add example wsab.php

Assets 2

@dreamsxin dreamsxin released this Sep 24, 2019 · 177 commits to master since this release

Resume getmetadatacachekey
Fix redis cache loss lifetime

Assets 2

@dreamsxin dreamsxin released this May 1, 2019 · 232 commits to master since this release

Add class Phalcon\Paginator\Adapter\DbBuilder
Add class Phalcon\Async\Process\Builder
Add class Phalcon\Async\Task

Add method Phalcon\Tag::setDefaultFormParams
Add method Phalcon\Text::limitChars

Updated method Phalcon\Tag\Select::selectField

Fix kernel function phalcon_orm_phql_build_group

Assets 2

@dreamsxin dreamsxin released this Mar 22, 2019 · 256 commits to master since this release

Fix memory leak in Phalcon\Cache\Backend\Memcached
Fix memory leak in Phalcon\Cache\Backend\Redis
Fix memory leak in Phalcon\Http\Client\Adapter\Stream
Fix memory leak in Phalcon\Session\Bag
Fix method Phalcon\Cli\Options::add

Add event beforeGetCacheKey and afterGetCacheKey for class Phalcon\Mvc\Model\MetaData

Assets 2

@dreamsxin dreamsxin released this Dec 28, 2018 · 275 commits to master since this release

Fix memory leak
Fix class Phalcon\Queue\Beanstalk

Add method Phalcon\Dispatcher::setHandlerSuffix
Add method Phalcon\Mvc\Application::autoSendHeader
Add method Phalcon\Arr::getHashKey
Add static method Phalcon\Async::setFilename
Add method Phalcon\Queue\Beanstalk::listTubes
Add static method Phalcon\Snowflake::parseID

Assets 2

@dreamsxin dreamsxin released this Nov 20, 2018 · 298 commits to master since this release

Fix memory leak
Fix about HT_ASSERT_RC1
Fix compiling in Mac OS X

Fix some bug

Add event afterRefresh in Phalcon\Mvc\Model::refresh

Assets 2

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

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();
Assets 2

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

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
You can’t perform that action at this time.