From 9e240fc146f679f6bc981e2273893c2a26946b22 Mon Sep 17 00:00:00 2001 From: mruz Date: Sun, 6 Mar 2016 16:51:20 +0100 Subject: [PATCH 1/7] Filter, add boolean filter --- ice/filter.zep | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ice/filter.zep b/ice/filter.zep index d4994a43..e1c7e310 100644 --- a/ice/filter.zep +++ b/ice/filter.zep @@ -103,9 +103,13 @@ class Filter return preg_replace("/[^a-z]/i", "", value); case "email": return filter_var(value, FILTER_SANITIZE_EMAIL); + case "bool": + case "boolean": + return filter_var(value, FILTER_VALIDATE_BOOLEAN); case "float": return (double) filter_var(value, FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION); case "int": + case "integer": return (int) filter_var(value, FILTER_SANITIZE_NUMBER_INT); case "string": return filter_var(value, FILTER_SANITIZE_STRING); From d0bd5083575d77240b39cc015429df9728b47e29 Mon Sep 17 00:00:00 2001 From: mruz Date: Sun, 6 Mar 2016 16:52:59 +0100 Subject: [PATCH 2/7] Pagination, add ability to change li, a, span HTML class --- ice/pagination.zep | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/ice/pagination.zep b/ice/pagination.zep index 040e9c24..906a10a5 100644 --- a/ice/pagination.zep +++ b/ice/pagination.zep @@ -104,7 +104,7 @@ class Pagination extends Arr */ protected function prepareButton(var page, string url = null, boolean active = false, var symbol = null) { - var query, i18n, title; + var query, i18n, title, liClass, spanClass, aClass; boolean pages = false; switch page { @@ -126,8 +126,12 @@ class Pagination extends Arr break; } + let liClass = this->get("liClass"), + spanClass = this->get("spanClass"), + aClass = this->get("aClass"); + if !active { - return "
  • " . symbol . "
  • "; + return "
  • " . symbol . "
  • "; } let query = this->di->get("request")->getQuery(), @@ -152,7 +156,7 @@ class Pagination extends Arr } } - return "
  • " . this->tag->a([url, symbol, title, "query": query->all()]) . "
  • "; + return "" . this->tag->a([url, symbol, title, "query": query->all(), "class": aClass]) . ""; } /** From e7de26239e4e42731734d68ab5af471f0ae40435 Mon Sep 17 00:00:00 2001 From: mruz Date: Sun, 6 Mar 2016 16:53:30 +0100 Subject: [PATCH 3/7] File validator, doc fix --- ice/validation/validator/file.zep | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ice/validation/validator/file.zep b/ice/validation/validator/file.zep index 85a1d2ad..fac9c1fd 100644 --- a/ice/validation/validator/file.zep +++ b/ice/validation/validator/file.zep @@ -22,7 +22,7 @@ use Ice\Validation\Validator; * 'file' => [ * 'maxSize' => '6M', * 'allowedTypes' => ['image/jpeg', 'image/png'], - * 'minResolution' => '400x300, + * 'minResolution' => '400x300', * 'maxResolution' => '1600x1200', * ] * ] From e90084efceb4af714832bff3c8f2bce332ce0c63 Mon Sep 17 00:00:00 2001 From: mruz Date: Sun, 6 Mar 2016 16:54:42 +0100 Subject: [PATCH 4/7] Sleet parser, add NEW, INSTANCEOF tokens --- ice/mvc/view/engine/sleet/parser.zep | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ice/mvc/view/engine/sleet/parser.zep b/ice/mvc/view/engine/sleet/parser.zep index 18fc26f9..cf05be60 100644 --- a/ice/mvc/view/engine/sleet/parser.zep +++ b/ice/mvc/view/engine/sleet/parser.zep @@ -337,6 +337,8 @@ class Parser if typeof token == "array" { switch token[0] { case T_AS: + case T_NEW: + case T_INSTANCEOF: case T_IS_EQUAL: case T_IS_NOT_EQUAL: case T_IS_IDENTICAL: From b64c0563d832034a7e2f18581f1a04cf13713e38 Mon Sep 17 00:00:00 2001 From: mruz Date: Sun, 6 Mar 2016 16:56:21 +0100 Subject: [PATCH 5/7] Dispatcher, add limit of forwards --- ice/dispatcher.zep | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/ice/dispatcher.zep b/ice/dispatcher.zep index e090861b..ea458d7e 100644 --- a/ice/dispatcher.zep +++ b/ice/dispatcher.zep @@ -21,8 +21,9 @@ abstract class Dispatcher protected activeHandler { get }; protected lastHandler { get }; - protected loops = 0 { get }; + protected loops = 16 { get, set }; protected finished { get }; + protected forwards = 0 { get }; protected forwarded = false { get }; protected silent = false { set }; @@ -149,10 +150,10 @@ abstract class Dispatcher this->finished = false; while !this->finished { - let this->loops++; + let this->forwards++; // Throw an exception after 16 consecutive forwards - if this->loops > 16 { + if this->loops && this->forwards > this->loops { if this->silent { // 508 Loop Detected response->setStatus(508); From 298888e9d5a390ac4a0ce16a37802ff4c07e77c4 Mon Sep 17 00:00:00 2001 From: mruz Date: Fri, 11 Mar 2016 11:17:55 +0100 Subject: [PATCH 6/7] Add changelog --- CHANGELOG.md | 423 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 423 insertions(+) create mode 100644 CHANGELOG.md diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 00000000..eb7f41d3 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,423 @@ +------------------------------------------------------------------- +Fri Mar 11 10:12:42 UTC 2016 + +- Ice 1.1.2 + + Dispatcher, add limit of forwards + + Sleet parser, add NEW, INSTANCEOF tokens + + File validator, doc fix + + Pagination, add ability to change li, a, span HTML class + + Filter, add boolean filter + +------------------------------------------------------------------- +Sat Jan 30 15:34:07 UTC 2016 + +- Ice 1.1.1 + + Di, return null if type of service is null + + Crypt, use setter + + Pdo, add detecting IN condition, fix #102 + +------------------------------------------------------------------- +Tue Jan 26 11:20:40 UTC 2016 + +- Ice 1.1.0 + + Services, update to auto-resolving + + Text, remove static from random method + + Di, add auto-resolving services and constructor parameter fix #99 + +------------------------------------------------------------------- +Sun Jan 3 13:53:41 UTC 2016 + +- Ice 1.0.37 + + The json-c is not needed anymore + + Tag, fix #97 overwrite radio values + + Install extension, cd fix + + Update readme + + Travis, update token + + Travis, zephir fullclean is unnecessary + + Build, get only generated files by zephir + + Ignore ext/ directory + + Delete ext/ directory + + Travis, implement automated source regenerating + +------------------------------------------------------------------- +Thu Nov 26 13:15:06 UTC 2015 + +- Ice 1.0.36 + + Core, use the latest zephir + + Pdo, don't require pdo extension to build/run ice + + Auth social, allow to store twitter access token in the session + +------------------------------------------------------------------- +Thu Nov 5 12:36:03 UTC 2015 + +- Ice 1.0.35 + + Mvc, add service + +------------------------------------------------------------------- +Fri Oct 16 11:58:34 UTC 2015 + +- Ice 1.0.34 + + Unique, add case insensitive + +------------------------------------------------------------------- +Wed Oct 14 13:37:38 UTC 2015 + +- Ice 1.0.33 + + Pagination, first page fix + +------------------------------------------------------------------- +Tue Oct 6 15:28:35 UTC 2015 + +- Ice 1.0.32 + + Model, unset primary key on create + + Model, don't unset primary keys on multi column + +------------------------------------------------------------------- +Fri Oct 2 13:13:25 UTC 2015 + +- Ice 1.0.31 + + Travis, remove valgrind + + Travis, migrate to new container infrastructure + + Core, use the latest zephir + +------------------------------------------------------------------- +Fri Oct 2 09:06:39 UTC 2015 + +- Ice 1.0.30 + + Model, update and valid fields to save + +------------------------------------------------------------------- +Tue Sep 29 09:33:20 UTC 2015 + +- Ice 1.0.29 + + Console, fix argument 1 passed to __construct() must be an instance of Ice\Cli\Di + + Model, create/update improvements + +------------------------------------------------------------------- +Fri Sep 11 09:55:05 UTC 2015 + +- Ice 1.0.28 + + Access, register the app/console itself as a service + + Model, add options for loadOne findOne + +------------------------------------------------------------------- +Sat Sep 5 10:54:31 UTC 2015 + +- Ice 1.0.27 + + Dispatcher, gets variable from params attribute applying filters if needed + + Model, allow to apply Validation on update, fetch validation's values on create + + Auth File, return Arr object on getUser() + + Pagination, move the repeated data to the prepareButton method + +------------------------------------------------------------------- +Mon Aug 31 08:17:27 UTC 2015 + +- Ice 1.0.26 + + Auth, return null if user not found during login + + Db, create driver for given options + +------------------------------------------------------------------- +Wed Aug 19 16:52:40 UTC 2015 + +- Ice 1.0.25 + + Assets, fix option name for source + +------------------------------------------------------------------- +Wed Aug 19 13:36:47 UTC 2015 + +- Ice 1.0.24 + + Tag, add meta tag + +------------------------------------------------------------------- +Tue Aug 18 02:00:45 UTC 2015 + +- Ice 1.0.23 + + Model, findOne make sure to return false if result not found + + Dispatcher, forward force backward compatibility + + Dispatcher, add force forward option + +------------------------------------------------------------------- +Wed Aug 5 13:10:08 UTC 2015 + +- Ice 1.0.22 + + Response, return object on redirect + +------------------------------------------------------------------- +Mon Aug 3 11:31:59 UTC 2015 + +- Ice 1.0.21 + + Url, mailto fix + + Model, add options on getRelated method + +------------------------------------------------------------------- +Thu Jul 30 14:44:19 UTC 2015 + +- Ice 1.0.20 + + Assets, add forceMinified option + +------------------------------------------------------------------- +Thu Jul 30 15:13:21 UTC 2015 + +- Ice 1.0.19 + + Assets, do not add a version if not specified + + Filter js, clear the output + + Assets, add helper to manage css/js resources + + Filter, implement jsmin + +------------------------------------------------------------------- +Thu Jul 23 11:17:58 UTC 2015 + +- Ice 1.0.18 + + Validation, add getValues method for getting all filtered values + +------------------------------------------------------------------- +Wed Jul 22 17:22:22 UTC 2015 + +- Ice 1.0.17 + + Dump, skip debuging di, fix detecting private/protected properties + +------------------------------------------------------------------- +Sat Jul 18 14:42:04 UTC 2015 + +- Ice 1.0.16 + + Zephir, use the working wersion + + Route, update fast route to the latest commit + + Model, add getRules method + +------------------------------------------------------------------- +Sat Jun 27 08:09:22 UTC 2015 + +- Ice 1.0.15 + + PSR-2, Properties name should not be prefixed with an underscore to indicate visibility + +------------------------------------------------------------------- +Fri Jun 26 13:00:45 UTC 2015 + +- Ice 1.0.14 + + Session, PHP Strict Standards fix + + Tag, add radio input + + Validation, docs & examples fixes + +------------------------------------------------------------------- +Sun Jun 7 08:55:44 UTC 2015 + +- Ice 1.0.13 + + Mongo, select document by MongoId + + Validation, add doc with examples + + Tag, add doc with examples + +------------------------------------------------------------------- +Thu May 7 10:58:30 UTC 2015 + +- Ice 1.0.12 + + Response, add setContent method + + Mvc app, get the response from handler + +------------------------------------------------------------------- +Tue May 5 18:14:45 UTC 2015 + +- Ice 1.0.11 + + Filter, get propper type fix #58 + + Unique validator, mongo id fix #59 + +- Ice 1.0.10 + + FastRoute, cached dispatcher fix + +- Ice 1.0.9 + + Di, improve performance on getting services & use the latest Zephir + +------------------------------------------------------------------- +Fri Apr 10 15:56:09 UTC 2015 + +- Ice 1.0.8 + + Core, use the latest zephir + + Auth, improvements for mongo driver + + I18n, add global alias to translate function + +------------------------------------------------------------------- +Tue Apr 7 06:33:40 UTC 2015 + +- Ice 1.0.7 + + Di, set root path in the constructor + + Back to working zephir + +------------------------------------------------------------------- +Sat Mar 28 14:18:14 UTC 2015 + +- Ice 1.0.6 + + Model, change serialize/unserialize to json_encode/json_decode, fix #37 + + Exception, add getFullTraceAsString method + +------------------------------------------------------------------- +Thu Mar 26 18:04:16 UTC 2015 + +- Ice 1.0.5 + + Config ini, better decode values due to parse_ini_file() has a poor implementation + + Mongo driver, compatybility with Pdo + + Get the latest Zephir + +------------------------------------------------------------------- +Fri Mar 20 08:24:40 UTC 2015 + +- Ice 1.0.4 + + Db, mongo driver fixes + +------------------------------------------------------------------- +Fri Mar 6 10:07:19 UTC 2015 + +- Ice 1.0.3 + + Module, simplify declaration of one module application + +------------------------------------------------------------------- +Wed Mar 4 13:37:43 UTC 2015 + +- Ice 1.0.2 + + Config, constructor improvements + + Travis, try to add PHP 7 + + FastRoute, support adding the same route for multiple HTTP methods + +------------------------------------------------------------------- +Mon Mar 2 14:32:50 UTC 2015 + +- Ice 1.0.1 + + I18n, translate with different contexts eg. for male/female or plural form + +------------------------------------------------------------------- +Thu Feb 26 12:13:16 UTC 2015 + +- Ice 1.0.0 + + Get the latest zephir + +------------------------------------------------------------------- +Tue Feb 17 18:31:09 UTC 2015 + +- Ice 1.0.0-rc3 + + Auth social, allow refreshing access token from google & facebook + +------------------------------------------------------------------- +Tue Feb 17 11:08:02 UTC 2015 + +- Ice 1.0.0-rc2 + + Social model, fix alias + + PHPDoc, fix examples in + +------------------------------------------------------------------- +Mon Feb 16 15:29:16 UTC 2015 + +- Ice 1.0.0-rc1 + + Auth, add sign in with Facebook, Google, Twitter + + Composer, update phpunit + + Readme, add badges + +------------------------------------------------------------------- +Thu Feb 5 17:34:46 UTC 2015 + +- Ice 1.0.0-beta2 + + Model, unserialize fix #37 + + Model, validation's getMessages returns Arr object + +------------------------------------------------------------------- +Fri Jan 30 15:41:15 UTC 2015 + +- Ice 1.0.0-beta1 + + Get the latest zephir, Model, add extra validation on update + + Documentation, add some comments for the PHPDoc + + Travis, run gdb after faliure + + Exception, exit with 1 after handle + +------------------------------------------------------------------- +Sun Jan 25 10:24:40 UTC 2015 + +- Ice 1.0.0-alpha2 + + Auth, logout and remove all tokens for user + +------------------------------------------------------------------- +Sat Jan 24 23:28:06 UTC 2015 + +- Ice dev build 25012015 + + Exception, add handlers for error/exception/shutdown + +------------------------------------------------------------------- +Sun Jan 11 19:07:46 UTC 2015 + +- Ice 1.0.0-alpha1 + + Version, Ice 1.0.0-alpha1 + + Request, remove _url from GET during getQuery + + Pagination, translate improvements + + Validation, move translate into validators + + Tests, sleet parser skip tag + + View, angular fix, add comment block + + Model, unset primary key on create/update + +------------------------------------------------------------------- +Fri Dec 19 09:27:56 UTC 2014 + +- Ice dev build 19122014 + + Auth, fix delete expired tokens + + Filter, minify css and base for minify js + + I18n, add iso method + + Unique validator fix + + App, add hooks + + Flash, getMessage fix + +------------------------------------------------------------------- +Fri Dec 12 15:34:07 UTC 2014 + +- Ice dev build 12122014 + + Console, add colored echo and improvements to CLI router + + App, remove unnecessary declaration + + Dispatcher, move module settings to the dispatcher + + PDO, return false if row is not fetched + + Tag, use url service if available + + Filter, repeats fix + + PDO, order by typo fix + +------------------------------------------------------------------- +Tue Dec 9 14:25:34 UTC 2014 + +- Ice dev build 09122014 + + Sleet parser, short if and functions fix + + CLI response fix, remove defaultModule from App + + Validation, file validator message + + Model, apply custom validation and filters + + Validation, translate labels and doc + + Request, add hasFile() method + + Tag, autocheck fix + +------------------------------------------------------------------- +Sat Dec 6 12:25:05 UTC 2014 + +- Ice dev build 06122014 + + Di fetch, remove DiInterface + + Pagination improvements + + Tag, HTML