diff --git a/composer.json b/composer.json index 178a814..75ed9e7 100644 --- a/composer.json +++ b/composer.json @@ -1,8 +1,8 @@ { "name": "sciactive/nymph-server", "description": "Powerful object data storage and querying for collaborative web apps.", - "version": "1.6.2", - "time": "2017-10-18", + "version": "2.0.0", + "time": "2017-10-22", "homepage": "http://nymph.io/", "type": "library", "authors": [ diff --git a/composer.lock b/composer.lock index fcff127..d22bdb2 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "content-hash": "4128cf14484116c50204b46c77f4a8cc", + "content-hash": "7767901c118f60913dfe3a2005d9eef9", "packages": [ { "name": "sciactive/requirephp", @@ -110,37 +110,40 @@ }, { "name": "myclabs/deep-copy", - "version": "1.6.1", + "version": "1.7.0", "source": { "type": "git", "url": "https://github.com/myclabs/DeepCopy.git", - "reference": "8e6e04167378abf1ddb4d3522d8755c5fd90d102" + "reference": "3b8a3a99ba1f6a3952ac2747d989303cbd6b7a3e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/8e6e04167378abf1ddb4d3522d8755c5fd90d102", - "reference": "8e6e04167378abf1ddb4d3522d8755c5fd90d102", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/3b8a3a99ba1f6a3952ac2747d989303cbd6b7a3e", + "reference": "3b8a3a99ba1f6a3952ac2747d989303cbd6b7a3e", "shasum": "" }, "require": { - "php": ">=5.4.0" + "php": "^5.6 || ^7.0" }, "require-dev": { - "doctrine/collections": "1.*", - "phpunit/phpunit": "~4.1" + "doctrine/collections": "^1.0", + "doctrine/common": "^2.6", + "phpunit/phpunit": "^4.1" }, "type": "library", "autoload": { "psr-4": { "DeepCopy\\": "src/DeepCopy/" - } + }, + "files": [ + "src/DeepCopy/deep_copy.php" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], "description": "Create deep copies (clones) of your objects", - "homepage": "https://github.com/myclabs/DeepCopy", "keywords": [ "clone", "copy", @@ -148,7 +151,7 @@ "object", "object graph" ], - "time": "2017-04-12T18:52:22+00:00" + "time": "2017-10-19T19:58:43+00:00" }, { "name": "phar-io/manifest", diff --git a/src/Drivers/DriverTrait.php b/src/Drivers/DriverTrait.php index b99cb55..0449410 100644 --- a/src/Drivers/DriverTrait.php +++ b/src/Drivers/DriverTrait.php @@ -108,9 +108,12 @@ public function checkData( unset($sdata[$cur_value[0]]); } if ($key !== 'guid' - && $key !== '!guid' + // && $key !== '!guid' && $key !== 'tag' - && $key !== '!tag' + // && $key !== '!tag' + && substr($key, 0, 1) !== '!' + && !($key === 'data' && $cur_value[1] == false) + // && !($key === '!data' && $cur_value[1] == true) && !key_exists($cur_value[0], $data)) { $pass = false; } else { @@ -136,22 +139,37 @@ public function checkData( case 'ref': case '!ref': $pass = ( - $this->entityReferenceSearch( - $data[$cur_value[0]], - $cur_value[1] + ( + isset($data[$cur_value[0]]) + && $this->entityReferenceSearch( + $data[$cur_value[0]], + $cur_value[1] + ) ) xor ($type_is_not xor $clause_not)); break; case 'strict': case '!strict': $pass = ( - ($data[$cur_value[0]] === $cur_value[1]) + ( + isset($data[$cur_value[0]]) + && $data[$cur_value[0]] === $cur_value[1] + ) xor ($type_is_not xor $clause_not)); break; case 'data': case '!data': $pass = ( - ($data[$cur_value[0]] == $cur_value[1]) + ( + ( + !isset($data[$cur_value[0]]) + && !$cur_value[1] + ) + || ( + isset($data[$cur_value[0]]) + && $data[$cur_value[0]] == $cur_value[1] + ) + ) xor ($type_is_not xor $clause_not)); break; case 'like': @@ -234,32 +252,45 @@ public function checkData( case 'gt': case '!gt': $pass = ( - ($data[$cur_value[0]] > $cur_value[1]) + ( + isset($data[$cur_value[0]]) + && $data[$cur_value[0]] > $cur_value[1] + ) xor ($type_is_not xor $clause_not)); break; case 'gte': case '!gte': $pass = ( - ($data[$cur_value[0]] >= $cur_value[1]) + ( + isset($data[$cur_value[0]]) + && $data[$cur_value[0]] >= $cur_value[1] + ) xor ($type_is_not xor $clause_not)); break; case 'lt': case '!lt': $pass = ( - ($data[$cur_value[0]] < $cur_value[1]) + ( + isset($data[$cur_value[0]]) + && $data[$cur_value[0]] < $cur_value[1] + ) xor ($type_is_not xor $clause_not)); break; case 'lte': case '!lte': $pass = ( - ($data[$cur_value[0]] <= $cur_value[1]) + ( + isset($data[$cur_value[0]]) + && $data[$cur_value[0]] <= $cur_value[1] + ) xor ($type_is_not xor $clause_not)); break; case 'array': case '!array': $pass = ( ( - (array) $data[$cur_value[0]] === + isset($data[$cur_value[0]]) + && (array) $data[$cur_value[0]] === $data[$cur_value[0]] && in_array($cur_value[1], $data[$cur_value[0]]) ) diff --git a/src/Nymph.php b/src/Nymph.php index cc24616..7700fea 100644 --- a/src/Nymph.php +++ b/src/Nymph.php @@ -26,7 +26,7 @@ * @link http://nymph.io/ */ class Nymph { - const VERSION = '1.6.2'; + const VERSION = '2.0.0'; public static function __callStatic($name, $args) { return call_user_func_array(array(RequirePHP::_('Nymph'), $name), $args);