Permalink
Browse files

Updating CHANGELOG, gen-build script [ci skip]

  • Loading branch information...
1 parent 3347695 commit 784229cea02d118b5198f4049db90975703e7cd1 phalcon committed Feb 18, 2013
Showing with 32 additions and 7 deletions.
  1. +8 −2 CHANGELOG
  2. +24 −5 scripts/gen-build.php
View
@@ -9,15 +9,21 @@
- Added Phalcon\Mvc\Model::refresh to refresh the state of a model
- Added Phalcon\Logger\Adapter::setLogLevel to filter messages with greater or less priority
- Removed constructor from Phalcon\Cache\BackendInterface
+ - Added Phalcon\Cache\Multiple, this backend writes to several backends, and reads data according to the order in which backends were registered.
+ - Now a model can use a separate connection to read and other to write, this makes horizontal sharding easy
+ - Now, a model could implement a method selectReadConnection to dynamically return the correct database according to the current query conditions
+ - Added Phalcon\Cache\Backend\Memory to cache data in the current request
+ - Added Phalcon\Validation, this component allows the validate a set of data based on pre-defined rules
+ - Added Phalcon\Forms, this component acts as a forms builder binding request data to entities, aiding in the validation of data, helping in the errors/messages generated in the validation process
0.9.0b2
- - Support for reusable records. A relation can be marked to cache in memory the queried records to speedup getting related records
+ - Support for reusable records. A relation can be marked to cache queried records in memory to speedup getting related records
- Added 'elseif' statement to Volt
- Changed static key in Volt's 'cache' to any valid expression
- Added Phalcon\Logger\Adapter\Syslog and Phalcon\Logger\Adapter\Stream to Phalcon\Logger
- Added Phalcon\Logger\Multiple to send logs to multiples adapters
- Added formatters abstraction to Phalcon\Logger, now including: Phalcon\Logger\Formatter\Line, Phalcon\Logger\Formatter\Json and Phalcon\Logger\Formatter\Syslog
- - Added Phalcon\Annotations\Adapter\Files to Phalcon\Annotations, this adapter stores the annotations in PHP files
+ - Added Phalcon\Annotations\Adapter\Files to Phalcon\Annotations, this adapter stores annotations in PHP files
0.9.0b1
- Added Phalcon\Annotations, a general purpose component to read annotations from docblocks
View
@@ -153,11 +153,11 @@ public function generate($path, $destination='build/', $calculateHashKeys=false)
private function _createHeader($path)
{
$fp = fopen($this->_destination.'phalcon.h', 'w');
- echo $path.'phalcon.h', PHP_EOL;
+ //echo $path.'phalcon.h', PHP_EOL;
foreach (file($path.'phalcon.h') as $line) {
if (preg_match('/^#include "(.*)"/', $line, $matches)) {
$openComment = false;
- echo $path.$matches[1], PHP_EOL;
+ //echo $path.$matches[1], PHP_EOL;
foreach(file($path.$matches[1]) as $hline){
$trimLine = trim($hline);
if ($trimLine=='/*'||$trimLine=='/**') {
@@ -220,7 +220,7 @@ private function _recursiveAction($path, $handler)
*/
private function _appendSource($path)
{
- echo $path, PHP_EOL;
+ //echo $path, PHP_EOL;
$openComment = false;
$fileHandler = $this->_fileHandler;
$exceptions = array('php.h', 'config.h', 'php_phalcon.h', 'phalcon.h');
@@ -279,7 +279,6 @@ private function _appendSource($path)
$line = str_replace($matches[0], 'phalcon_array_fetch_quick_string(&'.$matches[1].', '.$matches[2].', SS("'.$matches[3].'"), '.$key.'UL, '.$matches[4].')', $line);
fputs($fileHandler, $line);
continue;
-
}
/**
@@ -293,6 +292,26 @@ private function _appendSource($path)
}
/**
+ * Pre-compute hash key for method checking
+ */
+ if (preg_match('/phalcon_method_exists_ex\(([a-zA-Z\_]+), SS\("([a-zA-Z\_\-]+)"\) TSRMLS_CC\)/', $line, $matches)) {
+ $key = Phalcon\Kernel::preComputeHashKey($matches[2]);
+ $line = str_replace($matches[0], 'phalcon_method_quick_exists_ex('.$matches[1].', SS("'.$matches[2].'"), '.$key.'UL TSRMLS_CC)', $line);
+ fputs($fileHandler, $line);
+ continue;
+ }
+
+ /**
+ * Pre-compute hash key for method checking
+ */
+ if (preg_match('/phalcon_function_exists_ex\(SS\("([a-zA-Z\_\-]+)"\) TSRMLS_CC\)/', $line, $matches)) {
+ $key = Phalcon\Kernel::preComputeHashKey($matches[1]);
+ $line = str_replace($matches[0], 'phalcon_function_quick_exists_ex(SS("'.$matches[1].'"), '.$key.'UL TSRMLS_CC)', $line);
+ fputs($fileHandler, $line);
+ continue;
+ }
+
+ /**
* Pre-compute hashes for method calls
*/
if (preg_match('/PHALCON_CALL_METHOD_PARAMS_1_NORETURN\(([a-zA-Z\_]+), "([a-zA-Z\_]+)", ([a-zA-Z\_]+)\)/', $line, $matches)) {
@@ -370,7 +389,7 @@ private function _appendSource($path)
private function _checkHeaders($path)
{
$exceptions = array('php.h', 'config.h', 'php_phalcon.h', 'phalcon.h');
- echo $path, PHP_EOL;
+ //echo $path, PHP_EOL;
foreach (file($path) as $line) {
if (preg_match('/^#include "(.+)"/', $line, $matches)) {

0 comments on commit 784229c

Please sign in to comment.