We are happy to announce the release of our first beta of Phalcon 1.3!
In this version we have introduced several new features and performance improvements. The intend of this beta release is get input from the community, test the new functionality making sure everything works fine once production environments are updated to 1.3.
1.3.0 includes several performance improvements, new components like Phalon\Image, bug fixes, stability and performance improvements.
- Code cleanup: get rid of compiler warnings, dead code elimination, code deduplication, use static code analysers to eliminate possible bugs (801, 802, 810, 825, 827, 838, 849, 942, 968, 1001, 1093, 1169, 1214, 1223, 1224, 1375, 1430)
- Fixed various memory leaks (469, 860, 910, 914, 916, 1031, 1067, 1249, 1273, 1291, 1309, 1345, 1455, 1470)
- Fixed memory access violations / segmentation faults / etc. (469, 849, 851, 852, 858, 860, 861, 895, 911, 918, 927, 928, 1000, 1077, 1112, 1113, 1131, 1149, 1173, 1272, 1284, 1302, 1340, 1343, 1368, 1369, 1371, 1376, 1379, 1392, 1451, 1466, 1485, 1494, 1501, 1504, 1509, 1567, 1607)
- Fixed PHP notices, warnings and other incompatibilities (894, 1222, 1315, 1413, 1427, 1428, 1529)
- Security fixes:
- Hardening fixes (1044)
- Interface validation (1043, 1048)
- Thorough data validation in
__wakeup()(1043, 1634, 1635) - Fixed XSS vulnerabilities (1216, 1190)
Phalcon\Security::checkHash()allows to restrict the length of the password to avoid attacks like https://www.djangoproject.com/weblog/2013/sep/15/security/ (1261)- Fixed crash while rendering element’s label (1210)
- Prevent MongoDB Request Injection Attacks (1265)
- Do not allow to override superglobals in views (1617)
- Phalcon Kernel:
- 32 and 64 bit hashes can be computed on the same CPU architecture (817)
- Reduced overall memory usage (834, 891, 893)
- Memory allocation optimizations (912, 1220)
- Faster internal array and string manipulation (822, 823, 830, 833, 837, 890)
- Camelize does not ignore the last character of a string anymore (1436)
- Fixed bug in
phalcon_fix_path()(1601) - Use native counterparts for
memory_get_usage(),gettype(),json_encode(),json_decode(),session_XXX(),header(),headers_sent(),debug_backtrace(),lcfirst(),ob_XXX(),array_unshift(),array_values(),array_keys(),htmlentities()(836, 847, 936, 945, 1099) - Hash functions tailored for object handlers (842)
- Optimization of calls to userland functions and methods (843, 954)
- Read/modify/update optimization on properties (848)
- Added support for self/parent/static scopes in static properties (943)
- Scope lookup optimizations (948)
- Do not restore memory frames from kernel functions (960, 976)
- Diagnostic messages when Phalcon is compiled in dev mode (1009, 1054, 1097)
- Return Value Optimization (1046, 1047, 1075)
- Fixed locale issue (1095)
- Added support for interned strings (PHP 5.4+)
- Static property fetch/update optimization (1293)
- Fix misleading diagnostics on exception (1297)
- Use preallocated permanent zvals instead of null, true, false, 0 and 1 (1302)
- Bug fix in
phalcon_fix_path()(1591)
Phalcon\Acl:Phalcon\Annotations:Phalcon\Assets:- Fixed bugs when minifier produced no output at all (811, 821)
- Fixed joining issue (951)
- Added support for UTF-8 characters in jsmin
- Fixed chaining of CSS/JS filters (1198)
Phalcon\Assets\Filters\CssMinandPhalcon\Assets\Filters\JsMinimplementPhalcon\Assets\FilterInterface(1539)- Added
Phalcon\Assets\Collection::setTargetLocal()(1532)
Phalcon\Cache:- Added Libmemcached cache backend (913)
- Added support for APCu 4.0.2+ (1234)
- Implemented
Phalcon\Cache\Backend\Memory::queryKeys()(1093) - Bug fixes in
Phalcon\Cache\Backend\Xcache(1406) Phalcon\Cache\Frontend\Dataoptimizations (1093)Phalcon\Cache\Frontend\Noneoptimizations (1093)Phalcon\Cache\Frontend\Base64optimizations (1093)Phalcon\Cache\Frontend\Igbinaryoptimizations (1093)Phalcon\Cache\Frontend\Outputoptimizations (1093)Phalcon\Cache\Frontend\Jsonoptimizations (1093)Phalcon\Cache\Backendoptimizations (1093)Phalcon\Cache\Backend\Memoryoptimizations (1093)Phalcon\Cache\Backend\Fileoptimizations (1093)Phalcon\Cache\Backend\Apcoptimizations (1093)Phalcon\Cache\Backend\Xcacheoptimizations (1093)Phalcon\Cache\Backend\Memcacheoptimizations (1093)Phalcon\Cache\Backend\Mongooptimizations (1093)Phalcon\Cache\Backend\Libmemcachedoptimizations and bug fixes (1093)- Added
increment()anddecrement()methods (1374) - Added
flush()method (1352)
Phalcon\Config:- Implemented
Phalcon\Config::offsetUnset()(732)Phalcon\Config\Adapter\Inicorrectly handles empty sections and INI files without any sections (829, 837)- Added
Phalcon\Adapter\Config\Jsonclass to read JSON configs (844) Phalcon\Config::mergenow works with derived classes (1024)- Dot-delimited directives in INI-files are now parsed correctly (872)
- Support for PHP arrays as config files (1439)
Phalcon\Crypt:Phalcon\Db:Phalcon\Debug:Phalcon\DI:Phalcon\Dispatcher:- Dispatching parameters now can be modified in
beforeExecuteRouteevents beforeExceptionevents can now handle exceptions occurred when executing actions (140)- Added
Phalcon\Dispatcher::getHandlerClassandPhalcon\Dispatcher::getActionMethod - Implemented
afterInitializeevent (782) Phalcon\Dispatcheroptimizations (782)- Added
getPreviousControllerName(),getPreviousActionName()(1462)
- Dispatching parameters now can be modified in
Phalcon\Element:Phalcon\Element::addFilter()incorrectly prepends NULL as the first element (1019)
Phalcon\Escaper:Phalcon\Events:Phalcon\Forms:Phalcon\Http:Phalcon\Http\Cookiecan be used without sessions (875)Phalcon\Http\Cookiedoes not ignore expire time (897)Phalcon\Http\Requestfully supports file arrays (884, 888)Phalcon\Http\Requestoptimizations (889)- Added
getKey(),getError(),isUploadedFile()methods toPhalcon\Http\Request\File(878, 888) - Fixed regression in
\Phalcon\Http\Request::getRawBody()(1091) - Bug fix in
Phalcon\Http\Request::getQuery()(1226) - Fixed broken
Phalcon\Http\Response::setFileToSend()method (831, 832) - Redirects use status descriptions from RFC 2616 (1175)
Phalcon\Http\Response::setFileToSend()can now show the file in the browser instead of offering to download it (853)- Added
Phalcon\Http\Response\Headers::toArray()(1008) getJsonRawBody()may return an associative array (1241)- Added
getURI(),getBasicAuth(),getDigestAuth()methods toPhalcon\Http\Request(1250) - Added
getPut()/hasPut()methods toPhalcon\Http\Request(680, 1403) - Implemented
Phalcon\Http\Request\File::getRealType(1442, 1444)
Phalcon\Image:Phalcon\Logger:Phalcon\Mvc:Phalcon\Mvc\Application::handle()now checks whether the class exists before include()’ing its file (812, 818)Phalcon\Mvc\Model\Criteria::fromInput()now sets_modelName(866, 873)Phalcon\Mvc\Model\Query\Buildermay now use both integer and string placeholders (701)Mvc\Model\getMessages()is filterable now (885)- Fixed hasManyToMany relation implementation (938)
- Fixed regular expression in
\Phalcon\Mvc\Model\Validator\Email(1243) Phalcon\Mvc\Model::hasOne/hasMany/belongsTo/hasManyToMany/addBehavior()are now public methods (1166)- Added
Phalcon\Mvc\Model\Row::toArray()method (1506) Phalcon\Mvc\Model\Validator::getOption()returnsNULLif the option does not exist (1530)- Bug with a custom Events Manager in
Phalcon\Mvc\Models(1314) Phalcon\Mvc\Model\Query\Builder::__construct()does not ignore joins anymore (1327)- Fixed
HAVINGhandling inPhalcon\Mvc\Model\Query\Builder(1396) - Micro Collections return
Phalcon\Mvc\Micro\CollectionInterface(1130) Phalcon\Mvc\Url::get()can append query params (723, 877)- Regular Expression Optimization for
Phalcon\Mvc\Router(977) - PHQL: added placeholders support to
LIMIT(1023) - Added
Phalcon\Mvc\Router::getDefaultXXX()methods (1087) - Allow
HAVINGwithoutGROUP BYin query builder (1115) - mvc/model/query.c optimizations (1129, 1132)
- Added support for array(limit, offset]) as a ‘limit’ constructor key in Query Builder (1208)
- Added support for ‘conditions’ in
Phalcon\Mvc\Model\Query\Builder::__construct()(1236) - Added
Phalcon\Mvc\View::isDisabled(),Phalcon\Mvc\View::getRenderLevel(),Phalcon\Mvc\View::getDisabledLevels()(907, 1320) - Added
Phalcon\Mvc\View::getCurrentRenderLevel()(907, 1326) - Bug fix in
Phalcon\Mvc\Model\Resultset\Simple::toArray()(1377) - Bug fixes in Volt compiler (1387)
Phalcon\Mvc\Model\Query\Builderoptimizations (1414)- Allow to set dirs without trailing slashes in
Phalcon\Mvc\View(406, 1440) Phalcon\Mvc\Model\Validator::getOption()returns null if option does not exists (1531)- Added
Phalcon\Mvc\Model::selectWriteConnection()(1519) - Added
Phalcon\Mvc\Router\Group::convert()/getConverters()(1555, 1572) - Faster
Phalcon\Mvc\Model\Row(1606)
Phalcon\Flash:Phalcon\Paginator:Phalcon\Queue:Phalcon\Security:Phalcon\Session:Phalcon\Tag:- Fixed bugs (903)
- Fixed radio button generation (947)
- Fixed inconsistent behavior of
setAutoescape()(1263) - Added missing HTML5 input types (824, 1323)
- Added
Phalcon\Tag::setTitleSeparator()(1365) - Added support for (1422)
- Fixed inconsistency in
Tag::stylesheetLink/javascriptIncludew.r.t. local URLs (1486)
Phalcon\Validation:- Unit tests:
- Travis CI improvements (819, 846, 949)
- Use markTestSkipped(]) instead of echo (862)
- Do not run APC tests under CLI when apc.enable_cli is 0
- Added new tests (865, 1256, 1260, 1339, 1560, 1563)
- Skip database tests when the DBMS is not available (970)
- Support for optional RVO (1147)
- Added support for test coverage visualization (1307, 1361)
- Bug fixes in tests (1313, 1334, 1335, 1449, 1467)
- Documentation bug fixes (1069, 1070, 1072, 1145, 1146, 1205, 1372, 1397, 1521, 1523, 1586, lots of them])
- Refactored, improved and optimized build script (1218)
- Other bug fixes (1051, 1131, 1040, 1275, 1392, 1396, 1399, 1425, 1426…)
Help with Testing
This version can be installed from the 1.3.0 branch:
git clone https://github.com/phalcon/cphalcon
cd build
git checkout 1.3.0
sudo ./install
We welcome your comments regarding this new release. If you discover any bugs, please (if possible) create a failing test and submit a pull request, alongside with an issue on Github.
Thanks!
Chat - Q&A
Support
Social Media
Videos
<3 Phalcon Team