diff --git a/jsonpath.c b/jsonpath.c index 0cb2f40..a84ca4a 100644 --- a/jsonpath.c +++ b/jsonpath.c @@ -132,7 +132,7 @@ void print_lex_tokens(struct jpath_token lex_tok[], int lex_tok_count, const cha */ PHP_MINIT_FUNCTION(jsonpath) { zend_class_entry jsonpath_class_entry; - INIT_CLASS_ENTRY(jsonpath_class_entry, "JsonPath", class_JsonPath_methods); + INIT_NS_CLASS_ENTRY(jsonpath_class_entry, "JsonPath", "JsonPath", class_JsonPath_methods); jsonpath_ce = zend_register_internal_class(&jsonpath_class_entry); diff --git a/tests/001.phpt b/tests/001.phpt index 2ff16aa..6436b52 100644 --- a/tests/001.phpt +++ b/tests/001.phpt @@ -89,7 +89,7 @@ $obj = array ( ), ); -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); echo "Assertion 1\n"; print_r($jsonPath->find($obj, '$.store.book')); diff --git a/tests/002.phpt b/tests/002.phpt index 9d67f32..12b78ed 100644 --- a/tests/002.phpt +++ b/tests/002.phpt @@ -5,7 +5,7 @@ Test typical use cases --FILE-- diff --git a/tests/003.phpt b/tests/003.phpt index af3fd03..ea7fca9 100644 --- a/tests/003.phpt +++ b/tests/003.phpt @@ -5,7 +5,7 @@ Test typical use cases --FILE-- 1234, diff --git a/tests/004.phpt b/tests/004.phpt index 357d77e..aecbc34 100644 --- a/tests/004.phpt +++ b/tests/004.phpt @@ -5,7 +5,7 @@ Testing >, <, >= <= operators --FILE-- array( diff --git a/tests/005.phpt b/tests/005.phpt index 11a3ac7..2e0d004 100644 --- a/tests/005.phpt +++ b/tests/005.phpt @@ -5,7 +5,7 @@ Ensure no segfault if filtering on object instead of array --FILE-- array( diff --git a/tests/006.phpt b/tests/006.phpt index 86b38fc..faafc5a 100644 --- a/tests/006.phpt +++ b/tests/006.phpt @@ -5,7 +5,7 @@ Ensure no "Array to string conversion" notice when selecting non-scalar --FILE-- array( diff --git a/tests/007.phpt b/tests/007.phpt index 0993e4b..966e0e8 100644 --- a/tests/007.phpt +++ b/tests/007.phpt @@ -5,7 +5,7 @@ Testing <= operator --FILE-- array( diff --git a/tests/008.phpt b/tests/008.phpt index b84ae4d..153b933 100644 --- a/tests/008.phpt +++ b/tests/008.phpt @@ -5,7 +5,7 @@ Testing <= operator --FILE-- array( diff --git a/tests/009.phpt b/tests/009.phpt index 471bfa6..c9ff75b 100644 --- a/tests/009.phpt +++ b/tests/009.phpt @@ -5,7 +5,7 @@ Testing <= operator --FILE-- array( diff --git a/tests/010.phpt b/tests/010.phpt index 72a40ea..aab1dc2 100644 --- a/tests/010.phpt +++ b/tests/010.phpt @@ -5,7 +5,7 @@ Testing >= operator --FILE-- array( diff --git a/tests/011.phpt b/tests/011.phpt index d3fd610..71bd6fb 100644 --- a/tests/011.phpt +++ b/tests/011.phpt @@ -5,7 +5,7 @@ Testing >= operator --FILE-- array( diff --git a/tests/012.phpt b/tests/012.phpt index 5fb855d..eb4d7e0 100644 --- a/tests/012.phpt +++ b/tests/012.phpt @@ -5,7 +5,7 @@ Testing >= operator --FILE-- array( diff --git a/tests/013.phpt b/tests/013.phpt index 1bbd06a..6f36e22 100644 --- a/tests/013.phpt +++ b/tests/013.phpt @@ -5,7 +5,7 @@ Testing != operator --FILE-- array( diff --git a/tests/014.phpt b/tests/014.phpt index 976e054..e5f7ab5 100644 --- a/tests/014.phpt +++ b/tests/014.phpt @@ -5,7 +5,7 @@ Testing != operator --FILE-- array( diff --git a/tests/015.phpt b/tests/015.phpt index 37b2e38..02e84a8 100644 --- a/tests/015.phpt +++ b/tests/015.phpt @@ -5,7 +5,7 @@ Test array slice with strings as start, end, and step --FILE-- [ @@ -22,7 +22,7 @@ $data = [ ], ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, "$.words['first':'last':'two']"); var_dump($result); diff --git a/tests/016.phpt b/tests/016.phpt index 0416b41..855754d 100644 --- a/tests/016.phpt +++ b/tests/016.phpt @@ -5,7 +5,7 @@ Test array slice with unquoted strings as start, end, and step --FILE-- [ @@ -22,7 +22,7 @@ $data = [ ], ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, "$.words[first:last:two]"); var_dump($result); diff --git a/tests/017.phpt b/tests/017.phpt index 3cfea99..0a70f9b 100644 --- a/tests/017.phpt +++ b/tests/017.phpt @@ -5,7 +5,7 @@ Test array slice with mix of unquoted string and numbers as start, end, and step --FILE-- [ @@ -22,7 +22,7 @@ $data = [ ], ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, "$.words[first:-1:2]"); var_dump($result); diff --git a/tests/018.phpt b/tests/018.phpt index 661c784..e1bb24f 100644 --- a/tests/018.phpt +++ b/tests/018.phpt @@ -5,7 +5,7 @@ Test array slice with wildcard as end --FILE-- [ @@ -22,7 +22,7 @@ $data = [ ], ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, "$.words[0:*:2]"); var_dump($result); diff --git a/tests/019.phpt b/tests/019.phpt index 2cd4171..9a0cdac 100644 --- a/tests/019.phpt +++ b/tests/019.phpt @@ -5,7 +5,7 @@ Test broken boolean as right-hand operand --FILE-- [ @@ -32,7 +32,7 @@ $data = [ ], ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, "$.words[?(@.isAdjective == truse)]"); var_dump($result); diff --git a/tests/020.phpt b/tests/020.phpt index f664a02..24c9f33 100644 --- a/tests/020.phpt +++ b/tests/020.phpt @@ -5,7 +5,7 @@ Test broken boolean as left-hand operand --FILE-- [ @@ -32,7 +32,7 @@ $data = [ ], ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, "$.words[?(falsue == @.isAdjective)]"); var_dump($result); diff --git a/tests/021.phpt b/tests/021.phpt index f400392..28d1c47 100644 --- a/tests/021.phpt +++ b/tests/021.phpt @@ -5,7 +5,7 @@ Test dot selector with misplaced current node operator --FILE-- [ @@ -32,7 +32,7 @@ $data = [ ], ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, "$.words.@"); var_dump($result); diff --git a/tests/022.phpt b/tests/022.phpt index d81999b..80eeac5 100644 --- a/tests/022.phpt +++ b/tests/022.phpt @@ -61,7 +61,7 @@ $data = [ ], ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, '$[?(@.d==[100,200])]'); var_dump($result); diff --git a/tests/023.phpt b/tests/023.phpt index ddf7474..9ef496f 100644 --- a/tests/023.phpt +++ b/tests/023.phpt @@ -20,7 +20,7 @@ $data = [ ], ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, "$[?(@.name=~/hello\/.*/)]"); var_dump($result); diff --git a/tests/bounds_checks/002.phpt b/tests/bounds_checks/002.phpt index 1f718cc..d63abf9 100644 --- a/tests/bounds_checks/002.phpt +++ b/tests/bounds_checks/002.phpt @@ -5,7 +5,7 @@ Ensure queries that contain more than LEX_TOK_ARR_LEN tokens safely fail --FILE-- [ @@ -22,7 +22,7 @@ $data = [ ], ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, "$.words[9223372036854775808:9223372036854775809:9223372036854775810]"); var_dump($result); diff --git a/tests/bounds_checks/004.phpt b/tests/bounds_checks/004.phpt index 8d40a44..259fbc5 100644 --- a/tests/bounds_checks/004.phpt +++ b/tests/bounds_checks/004.phpt @@ -5,7 +5,7 @@ Test filter with overflowing operand --FILE-- [ @@ -32,7 +32,7 @@ $data = [ ], ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, "$.words[?($.occurrences > 9223372036854775808)]"); var_dump($result); diff --git a/tests/comparison_array_slice/001.phpt b/tests/comparison_array_slice/001.phpt index b493dc5..5eca124 100644 --- a/tests/comparison_array_slice/001.phpt +++ b/tests/comparison_array_slice/001.phpt @@ -13,7 +13,7 @@ $data = [ "fifth", ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, '$[1:3]'); var_dump($result); diff --git a/tests/comparison_array_slice/002.phpt b/tests/comparison_array_slice/002.phpt index 2249213..c3b98a2 100644 --- a/tests/comparison_array_slice/002.phpt +++ b/tests/comparison_array_slice/002.phpt @@ -13,7 +13,7 @@ $data = [ "fifth", ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, '$[0:5]'); var_dump($result); diff --git a/tests/comparison_array_slice/003.phpt b/tests/comparison_array_slice/003.phpt index b15c12a..59bcb22 100644 --- a/tests/comparison_array_slice/003.phpt +++ b/tests/comparison_array_slice/003.phpt @@ -11,7 +11,7 @@ $data = [ "third", ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, '$[7:10]'); var_dump($result); diff --git a/tests/comparison_array_slice/004.phpt b/tests/comparison_array_slice/004.phpt index 44bab57..0e7b028 100644 --- a/tests/comparison_array_slice/004.phpt +++ b/tests/comparison_array_slice/004.phpt @@ -14,7 +14,7 @@ $data = [ "1:3" => "nice", ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, '$[1:3]'); var_dump($result); diff --git a/tests/comparison_array_slice/005.phpt b/tests/comparison_array_slice/005.phpt index 86c2028..443e306 100644 --- a/tests/comparison_array_slice/005.phpt +++ b/tests/comparison_array_slice/005.phpt @@ -11,7 +11,7 @@ $data = [ "third", ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, '$[1:10]'); var_dump($result); diff --git a/tests/comparison_array_slice/006.phpt b/tests/comparison_array_slice/006.phpt index 1cbcd6f..1029375 100644 --- a/tests/comparison_array_slice/006.phpt +++ b/tests/comparison_array_slice/006.phpt @@ -13,7 +13,7 @@ $data = [ "fifth", ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, '$[2:113667776004]'); var_dump($result); diff --git a/tests/comparison_array_slice/007.phpt b/tests/comparison_array_slice/007.phpt index 85225d4..91cb1b1 100644 --- a/tests/comparison_array_slice/007.phpt +++ b/tests/comparison_array_slice/007.phpt @@ -13,7 +13,7 @@ $data = [ "fifth", ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, '$[2:-113667776004:-1]'); var_dump($result); diff --git a/tests/comparison_array_slice/008.phpt b/tests/comparison_array_slice/008.phpt index c0438e4..ba8d26a 100644 --- a/tests/comparison_array_slice/008.phpt +++ b/tests/comparison_array_slice/008.phpt @@ -13,7 +13,7 @@ $data = [ "fifth", ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, '$[-113667776004:2]'); var_dump($result); diff --git a/tests/comparison_array_slice/009.phpt b/tests/comparison_array_slice/009.phpt index a73baf8..82e7c4c 100644 --- a/tests/comparison_array_slice/009.phpt +++ b/tests/comparison_array_slice/009.phpt @@ -13,7 +13,7 @@ $data = [ "fifth", ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, '$[113667776004:2:-1]'); var_dump($result); diff --git a/tests/comparison_array_slice/010.phpt b/tests/comparison_array_slice/010.phpt index e1984c1..9fd1baf 100644 --- a/tests/comparison_array_slice/010.phpt +++ b/tests/comparison_array_slice/010.phpt @@ -14,7 +14,7 @@ $data = [ "nice", ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, '$[-4:-5]'); var_dump($result); diff --git a/tests/comparison_array_slice/011.phpt b/tests/comparison_array_slice/011.phpt index c889f4f..84e75d4 100644 --- a/tests/comparison_array_slice/011.phpt +++ b/tests/comparison_array_slice/011.phpt @@ -14,7 +14,7 @@ $data = [ "nice", ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, '$[-4:-4]'); var_dump($result); diff --git a/tests/comparison_array_slice/012.phpt b/tests/comparison_array_slice/012.phpt index 97f7f2e..dba7089 100644 --- a/tests/comparison_array_slice/012.phpt +++ b/tests/comparison_array_slice/012.phpt @@ -14,7 +14,7 @@ $data = [ "nice", ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, '$[-4:-3]'); var_dump($result); diff --git a/tests/comparison_array_slice/013.phpt b/tests/comparison_array_slice/013.phpt index 1064125..452aa57 100644 --- a/tests/comparison_array_slice/013.phpt +++ b/tests/comparison_array_slice/013.phpt @@ -14,7 +14,7 @@ $data = [ "nice", ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, '$[-4:1]'); var_dump($result); diff --git a/tests/comparison_array_slice/014.phpt b/tests/comparison_array_slice/014.phpt index a09553b..31fe31d 100644 --- a/tests/comparison_array_slice/014.phpt +++ b/tests/comparison_array_slice/014.phpt @@ -14,7 +14,7 @@ $data = [ "nice", ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, '$[-4:2]'); var_dump($result); diff --git a/tests/comparison_array_slice/015.phpt b/tests/comparison_array_slice/015.phpt index ebd413b..8ae2dcc 100644 --- a/tests/comparison_array_slice/015.phpt +++ b/tests/comparison_array_slice/015.phpt @@ -14,7 +14,7 @@ $data = [ "nice", ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, '$[-4:3]'); var_dump($result); diff --git a/tests/comparison_array_slice/016.phpt b/tests/comparison_array_slice/016.phpt index a7c6a37..c650c2c 100644 --- a/tests/comparison_array_slice/016.phpt +++ b/tests/comparison_array_slice/016.phpt @@ -13,7 +13,7 @@ $data = [ "fifth", ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, '$[3:0:-2]'); var_dump($result); diff --git a/tests/comparison_array_slice/017.phpt b/tests/comparison_array_slice/017.phpt index 536da15..a97e97e 100644 --- a/tests/comparison_array_slice/017.phpt +++ b/tests/comparison_array_slice/017.phpt @@ -13,7 +13,7 @@ $data = [ "fifth", ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, '$[7:3:-1]'); var_dump($result); diff --git a/tests/comparison_array_slice/018.phpt b/tests/comparison_array_slice/018.phpt index b40f33e..f076e68 100644 --- a/tests/comparison_array_slice/018.phpt +++ b/tests/comparison_array_slice/018.phpt @@ -13,7 +13,7 @@ $data = [ "fifth", ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, '$[0:3:-2]'); var_dump($result); diff --git a/tests/comparison_array_slice/019.phpt b/tests/comparison_array_slice/019.phpt index c236a6b..864aac7 100644 --- a/tests/comparison_array_slice/019.phpt +++ b/tests/comparison_array_slice/019.phpt @@ -13,7 +13,7 @@ $data = [ "fifth", ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, '$[::-2]'); var_dump($result); diff --git a/tests/comparison_array_slice/020.phpt b/tests/comparison_array_slice/020.phpt index c8a6931..fb1c552 100644 --- a/tests/comparison_array_slice/020.phpt +++ b/tests/comparison_array_slice/020.phpt @@ -13,7 +13,7 @@ $data = [ "fifth", ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, '$[1:]'); var_dump($result); diff --git a/tests/comparison_array_slice/021.phpt b/tests/comparison_array_slice/021.phpt index f203ebb..c99f3cf 100644 --- a/tests/comparison_array_slice/021.phpt +++ b/tests/comparison_array_slice/021.phpt @@ -13,7 +13,7 @@ $data = [ "fifth", ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, '$[3::-1]'); var_dump($result); diff --git a/tests/comparison_array_slice/022.phpt b/tests/comparison_array_slice/022.phpt index fc29d66..9df4c26 100644 --- a/tests/comparison_array_slice/022.phpt +++ b/tests/comparison_array_slice/022.phpt @@ -13,7 +13,7 @@ $data = [ "fifth", ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, '$[:2]'); var_dump($result); diff --git a/tests/comparison_array_slice/023.phpt b/tests/comparison_array_slice/023.phpt index d0a3155..fb59555 100644 --- a/tests/comparison_array_slice/023.phpt +++ b/tests/comparison_array_slice/023.phpt @@ -10,7 +10,7 @@ $data = [ "second", ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, '$[:]'); var_dump($result); diff --git a/tests/comparison_array_slice/024.phpt b/tests/comparison_array_slice/024.phpt index f808f0b..ff01dfc 100644 --- a/tests/comparison_array_slice/024.phpt +++ b/tests/comparison_array_slice/024.phpt @@ -10,7 +10,7 @@ $data = [ "more" => "string", ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, '$[:]'); var_dump($result); diff --git a/tests/comparison_array_slice/025.phpt b/tests/comparison_array_slice/025.phpt index a47a510..96bcbe0 100644 --- a/tests/comparison_array_slice/025.phpt +++ b/tests/comparison_array_slice/025.phpt @@ -10,7 +10,7 @@ $data = [ "second", ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, '$[::]'); var_dump($result); diff --git a/tests/comparison_array_slice/026.phpt b/tests/comparison_array_slice/026.phpt index a90324a..ef00cfc 100644 --- a/tests/comparison_array_slice/026.phpt +++ b/tests/comparison_array_slice/026.phpt @@ -13,7 +13,7 @@ $data = [ "fifth", ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, '$[:2:-1]'); var_dump($result); diff --git a/tests/comparison_array_slice/027.phpt b/tests/comparison_array_slice/027.phpt index 4092877..ba2739d 100644 --- a/tests/comparison_array_slice/027.phpt +++ b/tests/comparison_array_slice/027.phpt @@ -14,7 +14,7 @@ $data = [ "nice", ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, '$[3:-4]'); var_dump($result); diff --git a/tests/comparison_array_slice/028.phpt b/tests/comparison_array_slice/028.phpt index c1c326a..556e7ad 100644 --- a/tests/comparison_array_slice/028.phpt +++ b/tests/comparison_array_slice/028.phpt @@ -14,7 +14,7 @@ $data = [ "nice", ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, '$[3:-3]'); var_dump($result); diff --git a/tests/comparison_array_slice/029.phpt b/tests/comparison_array_slice/029.phpt index caddb1c..d53d244 100644 --- a/tests/comparison_array_slice/029.phpt +++ b/tests/comparison_array_slice/029.phpt @@ -14,7 +14,7 @@ $data = [ "nice", ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, '$[3:-2]'); var_dump($result); diff --git a/tests/comparison_array_slice/030.phpt b/tests/comparison_array_slice/030.phpt index 6aa8fe1..867587b 100644 --- a/tests/comparison_array_slice/030.phpt +++ b/tests/comparison_array_slice/030.phpt @@ -12,7 +12,7 @@ $data = [ "forth", ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, '$[2:1]'); var_dump($result); diff --git a/tests/comparison_array_slice/031.phpt b/tests/comparison_array_slice/031.phpt index d155866..80ce343 100644 --- a/tests/comparison_array_slice/031.phpt +++ b/tests/comparison_array_slice/031.phpt @@ -10,7 +10,7 @@ $data = [ "second", ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, '$[0:0]'); var_dump($result); diff --git a/tests/comparison_array_slice/032.phpt b/tests/comparison_array_slice/032.phpt index 8fd99d8..2588074 100644 --- a/tests/comparison_array_slice/032.phpt +++ b/tests/comparison_array_slice/032.phpt @@ -10,7 +10,7 @@ $data = [ "second", ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, '$[0:1]'); var_dump($result); diff --git a/tests/comparison_array_slice/033.phpt b/tests/comparison_array_slice/033.phpt index 6d05fea..33c60cd 100644 --- a/tests/comparison_array_slice/033.phpt +++ b/tests/comparison_array_slice/033.phpt @@ -11,7 +11,7 @@ $data = [ "third", ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, '$[-1:]'); var_dump($result); diff --git a/tests/comparison_array_slice/034.phpt b/tests/comparison_array_slice/034.phpt index 8ad2c9e..77ce780 100644 --- a/tests/comparison_array_slice/034.phpt +++ b/tests/comparison_array_slice/034.phpt @@ -11,7 +11,7 @@ $data = [ "third", ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, '$[-2:]'); var_dump($result); diff --git a/tests/comparison_array_slice/035.phpt b/tests/comparison_array_slice/035.phpt index 72da16e..e50c9b7 100644 --- a/tests/comparison_array_slice/035.phpt +++ b/tests/comparison_array_slice/035.phpt @@ -11,7 +11,7 @@ $data = [ "third", ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, '$[-4:]'); var_dump($result); diff --git a/tests/comparison_array_slice/036.phpt b/tests/comparison_array_slice/036.phpt index 98e32c8..2a38cc8 100644 --- a/tests/comparison_array_slice/036.phpt +++ b/tests/comparison_array_slice/036.phpt @@ -13,7 +13,7 @@ $data = [ "fifth", ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, '$[0:3:2]'); var_dump($result); diff --git a/tests/comparison_array_slice/037.phpt b/tests/comparison_array_slice/037.phpt index 23c5e3d..637701f 100644 --- a/tests/comparison_array_slice/037.phpt +++ b/tests/comparison_array_slice/037.phpt @@ -13,7 +13,7 @@ $data = [ "fifth", ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, '$[0:3:0]'); var_dump($result); diff --git a/tests/comparison_array_slice/038.phpt b/tests/comparison_array_slice/038.phpt index 1b370ca..18bb2db 100644 --- a/tests/comparison_array_slice/038.phpt +++ b/tests/comparison_array_slice/038.phpt @@ -13,7 +13,7 @@ $data = [ "fifth", ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, '$[0:3:1]'); var_dump($result); diff --git a/tests/comparison_array_slice/039.phpt b/tests/comparison_array_slice/039.phpt index 0962c59..73e7b0d 100644 --- a/tests/comparison_array_slice/039.phpt +++ b/tests/comparison_array_slice/039.phpt @@ -34,7 +34,7 @@ $data = [ 25, ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, '$[010:024:010]'); var_dump($result); diff --git a/tests/comparison_array_slice/040.phpt b/tests/comparison_array_slice/040.phpt index b4734a6..fce91e0 100644 --- a/tests/comparison_array_slice/040.phpt +++ b/tests/comparison_array_slice/040.phpt @@ -13,7 +13,7 @@ $data = [ "fifth", ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, '$[0:4:2]'); var_dump($result); diff --git a/tests/comparison_array_slice/041.phpt b/tests/comparison_array_slice/041.phpt index fbb3c4b..2d8cdc4 100644 --- a/tests/comparison_array_slice/041.phpt +++ b/tests/comparison_array_slice/041.phpt @@ -13,7 +13,7 @@ $data = [ "fifth", ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, '$[1:3:]'); var_dump($result); diff --git a/tests/comparison_array_slice/042.phpt b/tests/comparison_array_slice/042.phpt index 060a613..1fa086a 100644 --- a/tests/comparison_array_slice/042.phpt +++ b/tests/comparison_array_slice/042.phpt @@ -13,7 +13,7 @@ $data = [ "fifth", ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, '$[::2]'); var_dump($result); diff --git a/tests/comparison_bracket_notation/001.phpt b/tests/comparison_bracket_notation/001.phpt index b3c9796..648d196 100644 --- a/tests/comparison_bracket_notation/001.phpt +++ b/tests/comparison_bracket_notation/001.phpt @@ -9,7 +9,7 @@ $data = [ "key" => "value", ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, "$['key']"); var_dump($result); diff --git a/tests/comparison_bracket_notation/002.phpt b/tests/comparison_bracket_notation/002.phpt index f54e0a1..4477a6e 100644 --- a/tests/comparison_bracket_notation/002.phpt +++ b/tests/comparison_bracket_notation/002.phpt @@ -9,7 +9,7 @@ $data = [ "key" => "value", ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, "$['missing']"); var_dump($result); diff --git a/tests/comparison_bracket_notation/003.phpt b/tests/comparison_bracket_notation/003.phpt index bb63604..489e63f 100644 --- a/tests/comparison_bracket_notation/003.phpt +++ b/tests/comparison_bracket_notation/003.phpt @@ -29,7 +29,7 @@ $data = [ ], ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, '$..[0]'); sortRecursively($result); diff --git a/tests/comparison_bracket_notation/004.phpt b/tests/comparison_bracket_notation/004.phpt index 5edf50c..060a45f 100644 --- a/tests/comparison_bracket_notation/004.phpt +++ b/tests/comparison_bracket_notation/004.phpt @@ -9,7 +9,7 @@ $data = [ "ü" => 42, ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, "$['ü']"); var_dump($result); diff --git a/tests/comparison_bracket_notation/005.phpt b/tests/comparison_bracket_notation/005.phpt index c4ab6a0..1a953b9 100644 --- a/tests/comparison_bracket_notation/005.phpt +++ b/tests/comparison_bracket_notation/005.phpt @@ -16,7 +16,7 @@ $data = [ "two.some" => 42, ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, "$['two.some']"); var_dump($result); diff --git a/tests/comparison_bracket_notation/006.phpt b/tests/comparison_bracket_notation/006.phpt index 221ac6c..db15747 100644 --- a/tests/comparison_bracket_notation/006.phpt +++ b/tests/comparison_bracket_notation/006.phpt @@ -9,7 +9,7 @@ $data = [ "key" => "value", ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, '$["key"]'); var_dump($result); diff --git a/tests/comparison_bracket_notation/007.phpt b/tests/comparison_bracket_notation/007.phpt index 00ac313..04d0772 100644 --- a/tests/comparison_bracket_notation/007.phpt +++ b/tests/comparison_bracket_notation/007.phpt @@ -11,7 +11,7 @@ $data = [ "\"\"" => 222, ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, '$[]'); var_dump($result); @@ -19,6 +19,6 @@ var_dump($result); --EXPECTF-- Fatal error: Uncaught RuntimeException: Filter must not be empty in %s007.php:%d Stack trace: -#0 %s007.php(%d): JsonPath->find(Array, '$[]') -#1 {main} - thrown in %s007.php on line %d +%s +%s +%s diff --git a/tests/comparison_bracket_notation/008.phpt b/tests/comparison_bracket_notation/008.phpt index facd64d..a73dcf4 100644 --- a/tests/comparison_bracket_notation/008.phpt +++ b/tests/comparison_bracket_notation/008.phpt @@ -11,7 +11,7 @@ $data = [ "\"\"" => 222, ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, "$['']"); var_dump($result); diff --git a/tests/comparison_bracket_notation/009.phpt b/tests/comparison_bracket_notation/009.phpt index db7237f..d1a6211 100644 --- a/tests/comparison_bracket_notation/009.phpt +++ b/tests/comparison_bracket_notation/009.phpt @@ -11,7 +11,7 @@ $data = [ "\"\"" => 222, ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, '$[""]'); var_dump($result); diff --git a/tests/comparison_bracket_notation/010.phpt b/tests/comparison_bracket_notation/010.phpt index 49f5639..ae19062 100644 --- a/tests/comparison_bracket_notation/010.phpt +++ b/tests/comparison_bracket_notation/010.phpt @@ -9,7 +9,7 @@ $data = [ "one element", ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, '$[-2]'); var_dump($result); diff --git a/tests/comparison_bracket_notation/011.phpt b/tests/comparison_bracket_notation/011.phpt index 86e923b..218d79e 100644 --- a/tests/comparison_bracket_notation/011.phpt +++ b/tests/comparison_bracket_notation/011.phpt @@ -13,7 +13,7 @@ $data = [ "fifth", ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, '$[2]'); var_dump($result); diff --git a/tests/comparison_bracket_notation/012.phpt b/tests/comparison_bracket_notation/012.phpt index 775dd98..ab4d8bc 100644 --- a/tests/comparison_bracket_notation/012.phpt +++ b/tests/comparison_bracket_notation/012.phpt @@ -9,7 +9,7 @@ $data = [ "0" => "value", ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, '$[0]'); var_dump($result); diff --git a/tests/comparison_bracket_notation/013.phpt b/tests/comparison_bracket_notation/013.phpt index 08261e2..2acaf64 100644 --- a/tests/comparison_bracket_notation/013.phpt +++ b/tests/comparison_bracket_notation/013.phpt @@ -9,7 +9,7 @@ $data = [ "one element", ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, '$[1]'); var_dump($result); diff --git a/tests/comparison_bracket_notation/014_php7.phpt b/tests/comparison_bracket_notation/014_php7.phpt index 945b25f..919a54b 100644 --- a/tests/comparison_bracket_notation/014_php7.phpt +++ b/tests/comparison_bracket_notation/014_php7.phpt @@ -8,11 +8,11 @@ Test bracket notation with number on string $data = "Hello World"; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, '$[0]'); var_dump($result); ?> --EXPECTF-- -Warning: JsonPath::find() expects parameter 1 to be array, string given in %s014_php7.php on line %d +Warning: JsonPath\JsonPath::find(): expects parameter 1 to be array, string given in %s014_php7.php on line %d NULL diff --git a/tests/comparison_bracket_notation/014_php8.phpt b/tests/comparison_bracket_notation/014_php8.phpt index 972fdb3..d2ff6ea 100644 --- a/tests/comparison_bracket_notation/014_php8.phpt +++ b/tests/comparison_bracket_notation/014_php8.phpt @@ -8,14 +8,14 @@ Test bracket notation with number on string $data = "Hello World"; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, '$[0]'); var_dump($result); ?> --EXPECTF-- -Fatal error: Uncaught TypeError: JsonPath::find(): Argument #1 ($data) must be of type array, string given in %s014_php8.php:%d +Fatal error: Uncaught TypeError: JsonPath\JsonPath::find(): Argument #1 ($data) must be of type array, string given in %s014_php8.php:%d Stack trace: -#0 %s014_php8.php(%d): JsonPath->find('Hello World', '$[0]') -#1 {main} - thrown in %s014_php8.php on line %d +%s +%s +%s diff --git a/tests/comparison_bracket_notation/015.phpt b/tests/comparison_bracket_notation/015.phpt index bb7beca..53e1d97 100644 --- a/tests/comparison_bracket_notation/015.phpt +++ b/tests/comparison_bracket_notation/015.phpt @@ -15,7 +15,7 @@ $data = [ ], ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, '$.*[1]'); var_dump($result); diff --git a/tests/comparison_bracket_notation/016.phpt b/tests/comparison_bracket_notation/016.phpt index a089c81..0f181c6 100644 --- a/tests/comparison_bracket_notation/016.phpt +++ b/tests/comparison_bracket_notation/016.phpt @@ -11,7 +11,7 @@ $data = [ "third", ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, '$[-1]'); var_dump($result); diff --git a/tests/comparison_bracket_notation/017.phpt b/tests/comparison_bracket_notation/017.phpt index 2a7b5db..e195e30 100644 --- a/tests/comparison_bracket_notation/017.phpt +++ b/tests/comparison_bracket_notation/017.phpt @@ -7,7 +7,7 @@ Test bracket notation with number -1 on empty array $data = []; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, '$[-1]'); var_dump($result); diff --git a/tests/comparison_bracket_notation/018.phpt b/tests/comparison_bracket_notation/018.phpt index 573f092..6d8cc36 100644 --- a/tests/comparison_bracket_notation/018.phpt +++ b/tests/comparison_bracket_notation/018.phpt @@ -13,7 +13,7 @@ $data = [ "fifth", ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, '$[0]'); var_dump($result); diff --git a/tests/comparison_bracket_notation/019.phpt b/tests/comparison_bracket_notation/019.phpt index d5cc2eb..28d44c9 100644 --- a/tests/comparison_bracket_notation/019.phpt +++ b/tests/comparison_bracket_notation/019.phpt @@ -10,7 +10,7 @@ $data = [ "another" => "entry", ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, "$[':']"); var_dump($result); diff --git a/tests/comparison_bracket_notation/020.phpt b/tests/comparison_bracket_notation/020.phpt index 8e06e44..68b8366 100644 --- a/tests/comparison_bracket_notation/020.phpt +++ b/tests/comparison_bracket_notation/020.phpt @@ -9,7 +9,7 @@ $data = [ "]" => 42, ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, "$[']']"); var_dump($result); diff --git a/tests/comparison_bracket_notation/021.phpt b/tests/comparison_bracket_notation/021.phpt index b7e5744..dfe0646 100644 --- a/tests/comparison_bracket_notation/021.phpt +++ b/tests/comparison_bracket_notation/021.phpt @@ -10,7 +10,7 @@ $data = [ "another" => "entry", ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, "$['@']"); var_dump($result); diff --git a/tests/comparison_bracket_notation/022.phpt b/tests/comparison_bracket_notation/022.phpt index f8849e2..86395ed 100644 --- a/tests/comparison_bracket_notation/022.phpt +++ b/tests/comparison_bracket_notation/022.phpt @@ -10,7 +10,7 @@ $data = [ "another" => "entry", ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, "$['.']"); var_dump($result); diff --git a/tests/comparison_bracket_notation/023.phpt b/tests/comparison_bracket_notation/023.phpt index 48a8b44..d615008 100644 --- a/tests/comparison_bracket_notation/023.phpt +++ b/tests/comparison_bracket_notation/023.phpt @@ -11,7 +11,7 @@ $data = [ "" => 10, ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, "$['.*']"); var_dump($result); diff --git a/tests/comparison_bracket_notation/024.phpt b/tests/comparison_bracket_notation/024.phpt index da04088..a454ac9 100644 --- a/tests/comparison_bracket_notation/024.phpt +++ b/tests/comparison_bracket_notation/024.phpt @@ -10,7 +10,7 @@ $data = [ "another" => "entry", ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, "$['\"']"); var_dump($result); diff --git a/tests/comparison_bracket_notation/025.phpt b/tests/comparison_bracket_notation/025.phpt index 1699bfa..9b1b69e 100644 --- a/tests/comparison_bracket_notation/025.phpt +++ b/tests/comparison_bracket_notation/025.phpt @@ -9,7 +9,7 @@ $data = [ "\\" => "value", ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, "$['\\\\']"); var_dump($result); diff --git a/tests/comparison_bracket_notation/026.phpt b/tests/comparison_bracket_notation/026.phpt index fe29e0f..69c41c2 100644 --- a/tests/comparison_bracket_notation/026.phpt +++ b/tests/comparison_bracket_notation/026.phpt @@ -9,7 +9,7 @@ $data = [ "'" => "value", ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, "$['\\'']"); var_dump($result); diff --git a/tests/comparison_bracket_notation/027.phpt b/tests/comparison_bracket_notation/027.phpt index 8606ea1..09de438 100644 --- a/tests/comparison_bracket_notation/027.phpt +++ b/tests/comparison_bracket_notation/027.phpt @@ -9,7 +9,7 @@ $data = [ "0" => "value", ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, "$['0']"); var_dump($result); diff --git a/tests/comparison_bracket_notation/028.phpt b/tests/comparison_bracket_notation/028.phpt index 37d34a5..13d1c40 100644 --- a/tests/comparison_bracket_notation/028.phpt +++ b/tests/comparison_bracket_notation/028.phpt @@ -10,7 +10,7 @@ $data = [ "another" => "entry", ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, "$['$']"); var_dump($result); diff --git a/tests/comparison_bracket_notation/029.phpt b/tests/comparison_bracket_notation/029.phpt index 149de7c..49c2754 100644 --- a/tests/comparison_bracket_notation/029.phpt +++ b/tests/comparison_bracket_notation/029.phpt @@ -9,7 +9,7 @@ $data = [ ":@.\"$,*'\\" => 42, ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, "$[':@.\"$,*\'\\\\']"); var_dump($result); diff --git a/tests/comparison_bracket_notation/030.phpt b/tests/comparison_bracket_notation/030.phpt index 0f45720..d8d5c61 100644 --- a/tests/comparison_bracket_notation/030.phpt +++ b/tests/comparison_bracket_notation/030.phpt @@ -9,7 +9,7 @@ $data = [ "single'quote" => "value", ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, "$['single'quote']"); var_dump($result); diff --git a/tests/comparison_bracket_notation/031.phpt b/tests/comparison_bracket_notation/031.phpt index e37a13d..cf94c30 100644 --- a/tests/comparison_bracket_notation/031.phpt +++ b/tests/comparison_bracket_notation/031.phpt @@ -10,7 +10,7 @@ $data = [ "another" => "entry", ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, "$[',']"); var_dump($result); diff --git a/tests/comparison_bracket_notation/032.phpt b/tests/comparison_bracket_notation/032.phpt index b15fb1a..4fd56e1 100644 --- a/tests/comparison_bracket_notation/032.phpt +++ b/tests/comparison_bracket_notation/032.phpt @@ -10,7 +10,7 @@ $data = [ "another" => "entry", ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, "$['*']"); var_dump($result); diff --git a/tests/comparison_bracket_notation/033.phpt b/tests/comparison_bracket_notation/033.phpt index 859ed5c..77272b5 100644 --- a/tests/comparison_bracket_notation/033.phpt +++ b/tests/comparison_bracket_notation/033.phpt @@ -9,7 +9,7 @@ $data = [ "another" => "entry", ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, "$['*']"); var_dump($result); diff --git a/tests/comparison_bracket_notation/034.phpt b/tests/comparison_bracket_notation/034.phpt index 940b4a1..ec5c8cb 100644 --- a/tests/comparison_bracket_notation/034.phpt +++ b/tests/comparison_bracket_notation/034.phpt @@ -17,7 +17,7 @@ $data = [ "\"a\"" => 9, ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, "$[ 'a' ]"); var_dump($result); diff --git a/tests/comparison_bracket_notation/035.phpt b/tests/comparison_bracket_notation/035.phpt index f71b946..77aa40a 100644 --- a/tests/comparison_bracket_notation/035.phpt +++ b/tests/comparison_bracket_notation/035.phpt @@ -11,7 +11,7 @@ $data = [ "mice" => 100, ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, "$['ni.*']"); var_dump($result); diff --git a/tests/comparison_bracket_notation/036.phpt b/tests/comparison_bracket_notation/036.phpt index b64157b..7bad979 100644 --- a/tests/comparison_bracket_notation/036.phpt +++ b/tests/comparison_bracket_notation/036.phpt @@ -17,7 +17,7 @@ $data = [ "two'.'some" => "43", ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, "$['two'.'some']"); var_dump($result); diff --git a/tests/comparison_bracket_notation/037.phpt b/tests/comparison_bracket_notation/037.phpt index 6a90fb5..6891369 100644 --- a/tests/comparison_bracket_notation/037.phpt +++ b/tests/comparison_bracket_notation/037.phpt @@ -16,7 +16,7 @@ $data = [ "two.some" => "42", ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, "$[two.some]"); var_dump($result); diff --git a/tests/comparison_bracket_notation/038.phpt b/tests/comparison_bracket_notation/038.phpt index 5fb0bcd..576061a 100644 --- a/tests/comparison_bracket_notation/038.phpt +++ b/tests/comparison_bracket_notation/038.phpt @@ -17,7 +17,7 @@ $data = [ ], ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, "$[*]"); var_dump($result); diff --git a/tests/comparison_bracket_notation/039.phpt b/tests/comparison_bracket_notation/039.phpt index 554a476..a3da7f2 100644 --- a/tests/comparison_bracket_notation/039.phpt +++ b/tests/comparison_bracket_notation/039.phpt @@ -7,7 +7,7 @@ Test bracket notation with wildcard on empty array $data = []; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, "$[*]"); var_dump($result); diff --git a/tests/comparison_bracket_notation/040.phpt b/tests/comparison_bracket_notation/040.phpt index a0526d6..f1bd1e3 100644 --- a/tests/comparison_bracket_notation/040.phpt +++ b/tests/comparison_bracket_notation/040.phpt @@ -7,7 +7,7 @@ Test bracket notation with wildcard on empty object $data = []; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, "$[*]"); var_dump($result); diff --git a/tests/comparison_bracket_notation/041.phpt b/tests/comparison_bracket_notation/041.phpt index b82741c..499066c 100644 --- a/tests/comparison_bracket_notation/041.phpt +++ b/tests/comparison_bracket_notation/041.phpt @@ -11,7 +11,7 @@ $data = [ 42, ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, "$[*]"); var_dump($result); diff --git a/tests/comparison_bracket_notation/042.phpt b/tests/comparison_bracket_notation/042.phpt index 68156e3..3fabada 100644 --- a/tests/comparison_bracket_notation/042.phpt +++ b/tests/comparison_bracket_notation/042.phpt @@ -17,7 +17,7 @@ $data = [ ], ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, "$[*]"); var_dump($result); diff --git a/tests/comparison_bracket_notation/043.phpt b/tests/comparison_bracket_notation/043.phpt index 465a933..627b22b 100644 --- a/tests/comparison_bracket_notation/043.phpt +++ b/tests/comparison_bracket_notation/043.phpt @@ -20,7 +20,7 @@ $data = [ ], ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, "$[0:2][*]"); var_dump($result); diff --git a/tests/comparison_bracket_notation/044.phpt b/tests/comparison_bracket_notation/044.phpt index bc3a4f6..b02864a 100644 --- a/tests/comparison_bracket_notation/044.phpt +++ b/tests/comparison_bracket_notation/044.phpt @@ -13,7 +13,7 @@ $data = [ ], ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, "$[*].bar[*]"); var_dump($result); diff --git a/tests/comparison_bracket_notation/045.phpt b/tests/comparison_bracket_notation/045.phpt index 4338e97..71dc9f0 100644 --- a/tests/comparison_bracket_notation/045.phpt +++ b/tests/comparison_bracket_notation/045.phpt @@ -16,7 +16,7 @@ $data = [ ], ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, "$..[*]"); var_dump($result); diff --git a/tests/comparison_bracket_notation/046.phpt b/tests/comparison_bracket_notation/046.phpt index 4fea18e..2992725 100644 --- a/tests/comparison_bracket_notation/046.phpt +++ b/tests/comparison_bracket_notation/046.phpt @@ -9,7 +9,7 @@ $data = [ "key" => "value", ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, "$[key]"); var_dump($result); diff --git a/tests/comparison_dot_notation/001.phpt b/tests/comparison_dot_notation/001.phpt index 70e9144..b4594d6 100644 --- a/tests/comparison_dot_notation/001.phpt +++ b/tests/comparison_dot_notation/001.phpt @@ -14,7 +14,7 @@ $data = [ ], ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, "$.['key']"); var_dump($result); diff --git a/tests/comparison_dot_notation/002.phpt b/tests/comparison_dot_notation/002.phpt index 2b68707..bb6e4d1 100644 --- a/tests/comparison_dot_notation/002.phpt +++ b/tests/comparison_dot_notation/002.phpt @@ -14,7 +14,7 @@ $data = [ ], ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, '$.["key"]'); var_dump($result); diff --git a/tests/comparison_dot_notation/003.phpt b/tests/comparison_dot_notation/003.phpt index e3146de..f7fa50f 100644 --- a/tests/comparison_dot_notation/003.phpt +++ b/tests/comparison_dot_notation/003.phpt @@ -14,7 +14,7 @@ $data = [ ], ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, "$.[key]"); var_dump($result); diff --git a/tests/comparison_dot_notation/004.phpt b/tests/comparison_dot_notation/004.phpt index c11d3d9..83fa84f 100644 --- a/tests/comparison_dot_notation/004.phpt +++ b/tests/comparison_dot_notation/004.phpt @@ -9,7 +9,7 @@ $data = [ "key" => "value", ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, "$.key"); var_dump($result); diff --git a/tests/comparison_dot_notation/005.phpt b/tests/comparison_dot_notation/005.phpt index 8004cc6..0dd88ae 100644 --- a/tests/comparison_dot_notation/005.phpt +++ b/tests/comparison_dot_notation/005.phpt @@ -10,7 +10,7 @@ $data = [ 1, ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, "$.key"); var_dump($result); diff --git a/tests/comparison_dot_notation/006.phpt b/tests/comparison_dot_notation/006.phpt index d9a0444..ef8654f 100644 --- a/tests/comparison_dot_notation/006.phpt +++ b/tests/comparison_dot_notation/006.phpt @@ -12,7 +12,7 @@ $data = [ ], ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, "$.key"); var_dump($result); diff --git a/tests/comparison_dot_notation/007.phpt b/tests/comparison_dot_notation/007.phpt index 405452f..a2b399f 100644 --- a/tests/comparison_dot_notation/007.phpt +++ b/tests/comparison_dot_notation/007.phpt @@ -11,7 +11,7 @@ $data = [ ], ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, "$.id"); var_dump($result); diff --git a/tests/comparison_dot_notation/008.phpt b/tests/comparison_dot_notation/008.phpt index 13afabf..c5afd14 100644 --- a/tests/comparison_dot_notation/008.phpt +++ b/tests/comparison_dot_notation/008.phpt @@ -9,7 +9,7 @@ $data = [ "key" => [], ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, "$.key"); var_dump($result); diff --git a/tests/comparison_dot_notation/009.phpt b/tests/comparison_dot_notation/009.phpt index e612c97..a7621f3 100644 --- a/tests/comparison_dot_notation/009.phpt +++ b/tests/comparison_dot_notation/009.phpt @@ -9,7 +9,7 @@ $data = [ "key" => null, ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, "$.key"); var_dump($result); diff --git a/tests/comparison_dot_notation/010.phpt b/tests/comparison_dot_notation/010.phpt index fb4c6e1..ee961d5 100644 --- a/tests/comparison_dot_notation/010.phpt +++ b/tests/comparison_dot_notation/010.phpt @@ -9,7 +9,7 @@ $data = [ "key" => "value", ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, "$.missing"); var_dump($result); diff --git a/tests/comparison_dot_notation/011.phpt b/tests/comparison_dot_notation/011.phpt index 0c4c549..6ea401b 100644 --- a/tests/comparison_dot_notation/011.phpt +++ b/tests/comparison_dot_notation/011.phpt @@ -17,7 +17,7 @@ $data = [ ], ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, "$[0:2].key"); var_dump($result); diff --git a/tests/comparison_dot_notation/012.phpt b/tests/comparison_dot_notation/012.phpt index b02b5ff..2736bd9 100644 --- a/tests/comparison_dot_notation/012.phpt +++ b/tests/comparison_dot_notation/012.phpt @@ -45,7 +45,7 @@ $data = [ ], ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, "$..[1].key"); sortRecursively($result); diff --git a/tests/comparison_dot_notation/013.phpt b/tests/comparison_dot_notation/013.phpt index 8cdd985..89a5163 100644 --- a/tests/comparison_dot_notation/013.phpt +++ b/tests/comparison_dot_notation/013.phpt @@ -14,7 +14,7 @@ $data = [ ], ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, "$[*].a"); var_dump($result); diff --git a/tests/comparison_dot_notation/014.phpt b/tests/comparison_dot_notation/014.phpt index d73c7f3..753c289 100644 --- a/tests/comparison_dot_notation/014.phpt +++ b/tests/comparison_dot_notation/014.phpt @@ -11,7 +11,7 @@ $data = [ ], ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, "$[*].a"); var_dump($result); diff --git a/tests/comparison_dot_notation/015.phpt b/tests/comparison_dot_notation/015.phpt index e1aacae..82af848 100644 --- a/tests/comparison_dot_notation/015.phpt +++ b/tests/comparison_dot_notation/015.phpt @@ -14,7 +14,7 @@ $data = [ ], ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, "$[*].a"); var_dump($result); diff --git a/tests/comparison_dot_notation/016.phpt b/tests/comparison_dot_notation/016.phpt index 416b886..071d451 100644 --- a/tests/comparison_dot_notation/016.phpt +++ b/tests/comparison_dot_notation/016.phpt @@ -16,7 +16,7 @@ $data = [ ], ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, "$[?(@.id==42)].name"); var_dump($result); diff --git a/tests/comparison_dot_notation/017.phpt b/tests/comparison_dot_notation/017.phpt index 903e60e..d7791a7 100644 --- a/tests/comparison_dot_notation/017.phpt +++ b/tests/comparison_dot_notation/017.phpt @@ -23,7 +23,7 @@ $data = [ "key" => "top", ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, "$..key"); sortRecursively($result); diff --git a/tests/comparison_dot_notation/018.phpt b/tests/comparison_dot_notation/018.phpt index 16ce4ef..aa292f0 100644 --- a/tests/comparison_dot_notation/018.phpt +++ b/tests/comparison_dot_notation/018.phpt @@ -43,7 +43,7 @@ $data = [ ], ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, "$.store..price"); sortRecursively($result); diff --git a/tests/comparison_dot_notation/019.phpt b/tests/comparison_dot_notation/019.phpt index 722c770..ecfbf0d 100644 --- a/tests/comparison_dot_notation/019.phpt +++ b/tests/comparison_dot_notation/019.phpt @@ -17,7 +17,7 @@ $data = [ ], ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, "$[0,2].key"); var_dump($result); diff --git a/tests/comparison_dot_notation/020.phpt b/tests/comparison_dot_notation/020.phpt index bb26742..6489c99 100644 --- a/tests/comparison_dot_notation/020.phpt +++ b/tests/comparison_dot_notation/020.phpt @@ -18,7 +18,7 @@ $data = [ ], ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, "$['one','three'].key"); var_dump($result); diff --git a/tests/comparison_dot_notation/021.phpt b/tests/comparison_dot_notation/021.phpt index 9900b4d..79fa347 100644 --- a/tests/comparison_dot_notation/021.phpt +++ b/tests/comparison_dot_notation/021.phpt @@ -9,7 +9,7 @@ $data = [ "key-dash" => "value", ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, "$.key-dash"); var_dump($result); diff --git a/tests/comparison_dot_notation/022.phpt b/tests/comparison_dot_notation/022.phpt index f214c75..00f787e 100644 --- a/tests/comparison_dot_notation/022.phpt +++ b/tests/comparison_dot_notation/022.phpt @@ -10,7 +10,7 @@ $data = [ "\"key\"" => 42, ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, '$."key"'); var_dump($result); diff --git a/tests/comparison_dot_notation/023.phpt b/tests/comparison_dot_notation/023.phpt index 0b01222..4a20c2c 100644 --- a/tests/comparison_dot_notation/023.phpt +++ b/tests/comparison_dot_notation/023.phpt @@ -28,7 +28,7 @@ $data = [ "\"key\"" => 42, ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, '$.."key"'); var_dump($result); diff --git a/tests/comparison_dot_notation/024.phpt b/tests/comparison_dot_notation/024.phpt index eb170d3..c7b67b7 100644 --- a/tests/comparison_dot_notation/024.phpt +++ b/tests/comparison_dot_notation/024.phpt @@ -11,7 +11,7 @@ $data = [ "''" => "nice", ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, "$."); var_dump($result); diff --git a/tests/comparison_dot_notation/025.phpt b/tests/comparison_dot_notation/025.phpt index 75f6e8b..e4a8d99 100644 --- a/tests/comparison_dot_notation/025.phpt +++ b/tests/comparison_dot_notation/025.phpt @@ -9,7 +9,7 @@ $data = [ "in" => "value", ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, "$.in"); var_dump($result); diff --git a/tests/comparison_dot_notation/026.phpt b/tests/comparison_dot_notation/026.phpt index d47b6a5..1080613 100644 --- a/tests/comparison_dot_notation/026.phpt +++ b/tests/comparison_dot_notation/026.phpt @@ -9,7 +9,7 @@ $data = [ "length" => "value", ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, "$.length"); var_dump($result); diff --git a/tests/comparison_dot_notation/027.phpt b/tests/comparison_dot_notation/027.phpt index e86f8ae..2046f49 100644 --- a/tests/comparison_dot_notation/027.phpt +++ b/tests/comparison_dot_notation/027.phpt @@ -11,7 +11,7 @@ $data = [ 6, ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, "$.length"); var_dump($result); diff --git a/tests/comparison_dot_notation/028.phpt b/tests/comparison_dot_notation/028.phpt index dfdaa86..21ef544 100644 --- a/tests/comparison_dot_notation/028.phpt +++ b/tests/comparison_dot_notation/028.phpt @@ -9,7 +9,7 @@ $data = [ "null" => "value", ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, "$.null"); var_dump($result); diff --git a/tests/comparison_dot_notation/029.phpt b/tests/comparison_dot_notation/029.phpt index b30eca6..2d751b8 100644 --- a/tests/comparison_dot_notation/029.phpt +++ b/tests/comparison_dot_notation/029.phpt @@ -9,7 +9,7 @@ $data = [ "true" => "value", ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, "$.true"); var_dump($result); diff --git a/tests/comparison_dot_notation/030.phpt b/tests/comparison_dot_notation/030.phpt index 86f6b27..e338efe 100644 --- a/tests/comparison_dot_notation/030.phpt +++ b/tests/comparison_dot_notation/030.phpt @@ -9,7 +9,7 @@ $data = [ "$" => "value", ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, "$.$"); var_dump($result); diff --git a/tests/comparison_dot_notation/031.phpt b/tests/comparison_dot_notation/031.phpt index 3e95c3a..1ec7abe 100644 --- a/tests/comparison_dot_notation/031.phpt +++ b/tests/comparison_dot_notation/031.phpt @@ -9,7 +9,7 @@ $data = [ "屬性" => "value", ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, "$.屬性"); var_dump($result); diff --git a/tests/comparison_dot_notation/032.phpt b/tests/comparison_dot_notation/032.phpt index c250ac5..dcb1124 100644 --- a/tests/comparison_dot_notation/032.phpt +++ b/tests/comparison_dot_notation/032.phpt @@ -13,7 +13,7 @@ $data = [ "fifth", ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, "$.2"); var_dump($result); diff --git a/tests/comparison_dot_notation/033.phpt b/tests/comparison_dot_notation/033.phpt index a2270ad..0d119e3 100644 --- a/tests/comparison_dot_notation/033.phpt +++ b/tests/comparison_dot_notation/033.phpt @@ -11,7 +11,7 @@ $data = [ "c" => "third", ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, "$.2"); var_dump($result); diff --git a/tests/comparison_dot_notation/034.phpt b/tests/comparison_dot_notation/034.phpt index 71b8f16..67d95ee 100644 --- a/tests/comparison_dot_notation/034.phpt +++ b/tests/comparison_dot_notation/034.phpt @@ -13,7 +13,7 @@ $data = [ "fifth", ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, "$.-1"); var_dump($result); diff --git a/tests/comparison_dot_notation/035.phpt b/tests/comparison_dot_notation/035.phpt index 2e0dce7..784fa22 100644 --- a/tests/comparison_dot_notation/035.phpt +++ b/tests/comparison_dot_notation/035.phpt @@ -10,7 +10,7 @@ $data = [ "'key'" => 42, ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, "$.'key'"); var_dump($result); diff --git a/tests/comparison_dot_notation/036.phpt b/tests/comparison_dot_notation/036.phpt index 62c0410..5abd92a 100644 --- a/tests/comparison_dot_notation/036.phpt +++ b/tests/comparison_dot_notation/036.phpt @@ -28,7 +28,7 @@ $data = [ "'key'" => 42, ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, "$..'key'"); var_dump($result); diff --git a/tests/comparison_dot_notation/037.phpt b/tests/comparison_dot_notation/037.phpt index 5ee5f2d..7ead214 100644 --- a/tests/comparison_dot_notation/037.phpt +++ b/tests/comparison_dot_notation/037.phpt @@ -13,7 +13,7 @@ $data = [ "'some.key'" => 43, ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, "$.'some.key'"); var_dump($result); diff --git a/tests/comparison_dot_notation/038.phpt b/tests/comparison_dot_notation/038.phpt index fcf8473..c43cc17 100644 --- a/tests/comparison_dot_notation/038.phpt +++ b/tests/comparison_dot_notation/038.phpt @@ -12,7 +12,7 @@ $data = [ "" => 4, ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, "$. a"); var_dump($result); diff --git a/tests/comparison_dot_notation/039.phpt b/tests/comparison_dot_notation/039.phpt index 5bcda6c..aec58d1 100644 --- a/tests/comparison_dot_notation/039.phpt +++ b/tests/comparison_dot_notation/039.phpt @@ -17,7 +17,7 @@ $data = [ ], ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, "$.*"); var_dump($result); diff --git a/tests/comparison_dot_notation/040.phpt b/tests/comparison_dot_notation/040.phpt index ce83b22..7c42b25 100644 --- a/tests/comparison_dot_notation/040.phpt +++ b/tests/comparison_dot_notation/040.phpt @@ -7,7 +7,7 @@ Test dot notation with wildcard on empty array $data = []; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, "$.*"); var_dump($result); diff --git a/tests/comparison_dot_notation/041.phpt b/tests/comparison_dot_notation/041.phpt index ecdd54f..aded1a8 100644 --- a/tests/comparison_dot_notation/041.phpt +++ b/tests/comparison_dot_notation/041.phpt @@ -7,7 +7,7 @@ Test dot notation with wildcard on empty object $data = []; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, "$.*"); var_dump($result); diff --git a/tests/comparison_dot_notation/042.phpt b/tests/comparison_dot_notation/042.phpt index 74d4d99..bc39d74 100644 --- a/tests/comparison_dot_notation/042.phpt +++ b/tests/comparison_dot_notation/042.phpt @@ -18,7 +18,7 @@ $data = [ ], ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, "$.*"); sortRecursively($result); diff --git a/tests/comparison_dot_notation/043.phpt b/tests/comparison_dot_notation/043.phpt index 0bf4cfa..638a2a2 100644 --- a/tests/comparison_dot_notation/043.phpt +++ b/tests/comparison_dot_notation/043.phpt @@ -13,7 +13,7 @@ $data = [ ] ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, "$.*.bar.*"); var_dump($result); diff --git a/tests/comparison_dot_notation/044.phpt b/tests/comparison_dot_notation/044.phpt index 31a4e34..b132588 100644 --- a/tests/comparison_dot_notation/044.phpt +++ b/tests/comparison_dot_notation/044.phpt @@ -18,7 +18,7 @@ $data = [ ] ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, "$.*.*"); var_dump($result); diff --git a/tests/comparison_dot_notation/045.phpt b/tests/comparison_dot_notation/045.phpt index c1d5ffa..5165cee 100644 --- a/tests/comparison_dot_notation/045.phpt +++ b/tests/comparison_dot_notation/045.phpt @@ -17,7 +17,7 @@ $data = [ ], ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, "$..*"); sortRecursively($result); diff --git a/tests/comparison_dot_notation/046.phpt b/tests/comparison_dot_notation/046.phpt index 74c38a6..5e0061e 100644 --- a/tests/comparison_dot_notation/046.phpt +++ b/tests/comparison_dot_notation/046.phpt @@ -12,7 +12,7 @@ $data = [ 42, ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, "$..*"); sortRecursively($result); diff --git a/tests/comparison_dot_notation/047_php7.phpt b/tests/comparison_dot_notation/047_php7.phpt index 88add93..4d17ed7 100644 --- a/tests/comparison_dot_notation/047_php7.phpt +++ b/tests/comparison_dot_notation/047_php7.phpt @@ -8,11 +8,11 @@ Test dot notation with wildcard after recursive descent on scalar $data = 42; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, "$..*"); var_dump($result); ?> --EXPECTF-- -Warning: JsonPath::find() expects parameter 1 to be array, int given in %s047_php7.php on line %d +Warning: JsonPath\JsonPath::find(): expects parameter 1 to be array, int given in %s047_php7.php on line %d NULL diff --git a/tests/comparison_dot_notation/047_php8.phpt b/tests/comparison_dot_notation/047_php8.phpt index f56880d..0eba705 100644 --- a/tests/comparison_dot_notation/047_php8.phpt +++ b/tests/comparison_dot_notation/047_php8.phpt @@ -8,14 +8,14 @@ Test dot notation with wildcard after recursive descent on scalar $data = 42; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, "$..*"); var_dump($result); ?> --EXPECTF-- -Fatal error: Uncaught TypeError: JsonPath::find(): Argument #1 ($data) must be of type array, int given in %s047_php8.php:%d +Fatal error: Uncaught TypeError: JsonPath\JsonPath::find(): Argument #1 ($data) must be of type array, int given in %s047_php8.php:%d Stack trace: -#0 %s047_php8.php(%d): JsonPath->find(42, '$..*') -#1 {main} - thrown in %s047_php8.php on line %d +%s +%s +%s diff --git a/tests/comparison_dot_notation/048.phpt b/tests/comparison_dot_notation/048.phpt index 44f05ca..1bb43d7 100644 --- a/tests/comparison_dot_notation/048.phpt +++ b/tests/comparison_dot_notation/048.phpt @@ -10,7 +10,7 @@ $data = [ "\$a" => 2, ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, "\$a"); var_dump($result); diff --git a/tests/comparison_dot_notation/049.phpt b/tests/comparison_dot_notation/049.phpt index cb2f6bd..f9e4ce3 100644 --- a/tests/comparison_dot_notation/049.phpt +++ b/tests/comparison_dot_notation/049.phpt @@ -9,7 +9,7 @@ $data = [ "key" => "value", ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, ".key"); var_dump($result); diff --git a/tests/comparison_dot_notation/050.phpt b/tests/comparison_dot_notation/050.phpt index cc92c40..35b91b9 100644 --- a/tests/comparison_dot_notation/050.phpt +++ b/tests/comparison_dot_notation/050.phpt @@ -9,7 +9,7 @@ $data = [ "key" => "value", ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, "key"); var_dump($result); diff --git a/tests/comparison_filter/001.phpt b/tests/comparison_filter/001.phpt index 7308353..99b8639 100644 --- a/tests/comparison_filter/001.phpt +++ b/tests/comparison_filter/001.phpt @@ -12,7 +12,7 @@ $data = [ ], ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, "$[?(@.key)]"); var_dump($result); diff --git a/tests/comparison_filter/002.phpt b/tests/comparison_filter/002.phpt index c20a8c7..9cfd2bb 100644 --- a/tests/comparison_filter/002.phpt +++ b/tests/comparison_filter/002.phpt @@ -39,7 +39,7 @@ $data = [ ], ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, "$..*[?(@.id>2)]"); sortRecursively($result); diff --git a/tests/comparison_filter/003.phpt b/tests/comparison_filter/003.phpt index de14f49..ee767d9 100644 --- a/tests/comparison_filter/003.phpt +++ b/tests/comparison_filter/003.phpt @@ -30,7 +30,7 @@ $data = [ ], ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, "$..[?(@.id==2)]"); sortRecursively($result); diff --git a/tests/comparison_filter/004.phpt b/tests/comparison_filter/004.phpt index 0d2a543..84bf458 100644 --- a/tests/comparison_filter/004.phpt +++ b/tests/comparison_filter/004.phpt @@ -23,7 +23,7 @@ $data = [ ], ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, "$[?(@.key+50==100)]"); var_dump($result); diff --git a/tests/comparison_filter/005.phpt b/tests/comparison_filter/005.phpt index 2083a95..eeb6dd2 100644 --- a/tests/comparison_filter/005.phpt +++ b/tests/comparison_filter/005.phpt @@ -17,7 +17,7 @@ $data = [ ], ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, "$[?(@.key>42 && @.key<44)]"); var_dump($result); diff --git a/tests/comparison_filter/006.phpt b/tests/comparison_filter/006.phpt index d22644b..3e29b15 100644 --- a/tests/comparison_filter/006.phpt +++ b/tests/comparison_filter/006.phpt @@ -41,7 +41,7 @@ $data = [ ], ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, "$[?(@.key>0 && false)]"); var_dump($result); diff --git a/tests/comparison_filter/007.phpt b/tests/comparison_filter/007.phpt index 840e85b..0616fbe 100644 --- a/tests/comparison_filter/007.phpt +++ b/tests/comparison_filter/007.phpt @@ -41,7 +41,7 @@ $data = [ ], ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, "$[?(@.key>0 && true)]"); var_dump($result); diff --git a/tests/comparison_filter/008.phpt b/tests/comparison_filter/008.phpt index c391fe7..1b55232 100644 --- a/tests/comparison_filter/008.phpt +++ b/tests/comparison_filter/008.phpt @@ -17,7 +17,7 @@ $data = [ ], ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, "$[?(@.key>43 || @.key<43)]"); var_dump($result); diff --git a/tests/comparison_filter/009.phpt b/tests/comparison_filter/009.phpt index 3b2fc33..0303f8f 100644 --- a/tests/comparison_filter/009.phpt +++ b/tests/comparison_filter/009.phpt @@ -41,7 +41,7 @@ $data = [ ], ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, "$[?(@.key>0 || false)]"); var_dump($result); diff --git a/tests/comparison_filter/010.phpt b/tests/comparison_filter/010.phpt index d54735a..8857160 100644 --- a/tests/comparison_filter/010.phpt +++ b/tests/comparison_filter/010.phpt @@ -41,7 +41,7 @@ $data = [ ], ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, "$[?(@.key>0 || true)]"); var_dump($result); diff --git a/tests/comparison_filter/011.phpt b/tests/comparison_filter/011.phpt index 8dad048..d8e85c7 100644 --- a/tests/comparison_filter/011.phpt +++ b/tests/comparison_filter/011.phpt @@ -35,7 +35,7 @@ $data = [ ], ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, "$[?(@['key']==42)]"); var_dump($result); diff --git a/tests/comparison_filter/012.phpt b/tests/comparison_filter/012.phpt index c46534a..4a81846 100644 --- a/tests/comparison_filter/012.phpt +++ b/tests/comparison_filter/012.phpt @@ -23,7 +23,7 @@ $data = [ ], ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, "$[?(@['@key']==42)]"); var_dump($result); diff --git a/tests/comparison_filter/013.phpt b/tests/comparison_filter/013.phpt index d9ca3e0..dbe55d7 100644 --- a/tests/comparison_filter/013.phpt +++ b/tests/comparison_filter/013.phpt @@ -22,7 +22,7 @@ $data = [ ], ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, "$[?(@[-1]==2)]"); var_dump($result); diff --git a/tests/comparison_filter/014.phpt b/tests/comparison_filter/014.phpt index 61e8eb8..34dd1df 100644 --- a/tests/comparison_filter/014.phpt +++ b/tests/comparison_filter/014.phpt @@ -16,7 +16,7 @@ $data = [ ], ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, "$[?(@[1]=='b')]"); var_dump($result); diff --git a/tests/comparison_filter/015.phpt b/tests/comparison_filter/015.phpt index 7a0ad9c..6770d28 100644 --- a/tests/comparison_filter/015.phpt +++ b/tests/comparison_filter/015.phpt @@ -16,7 +16,7 @@ $data = [ ], ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, "$[?(@[1]=='b')]"); var_dump($result); diff --git a/tests/comparison_filter/016.phpt b/tests/comparison_filter/016.phpt index acb2663..7861ed8 100644 --- a/tests/comparison_filter/016.phpt +++ b/tests/comparison_filter/016.phpt @@ -19,7 +19,7 @@ $data = [ true, ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, "$[?(@)]"); var_dump($result); diff --git a/tests/comparison_filter/017.phpt b/tests/comparison_filter/017.phpt index 64fbc99..ecd8947 100644 --- a/tests/comparison_filter/017.phpt +++ b/tests/comparison_filter/017.phpt @@ -34,7 +34,7 @@ $data = [ ], ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, "$[?(@.a && (@.b || @.c))]"); var_dump($result); diff --git a/tests/comparison_filter/018.phpt b/tests/comparison_filter/018.phpt index 4578e0c..d8983fb 100644 --- a/tests/comparison_filter/018.phpt +++ b/tests/comparison_filter/018.phpt @@ -38,7 +38,7 @@ $data = [ [], ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, "$[?(@.a && @.b || @.c)]"); var_dump($result); diff --git a/tests/comparison_filter/019.phpt b/tests/comparison_filter/019.phpt index 7402c20..72acc4e 100644 --- a/tests/comparison_filter/019.phpt +++ b/tests/comparison_filter/019.phpt @@ -23,7 +23,7 @@ $data = [ ], ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, "$[?(@.key/10==5)]"); var_dump($result); diff --git a/tests/comparison_filter/020.phpt b/tests/comparison_filter/020.phpt index 3260704..b52959b 100644 --- a/tests/comparison_filter/020.phpt +++ b/tests/comparison_filter/020.phpt @@ -11,7 +11,7 @@ $data = [ ], ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, "$[?(@.key-dash == 'value')]"); var_dump($result); diff --git a/tests/comparison_filter/021.phpt b/tests/comparison_filter/021.phpt index 4cfd30b..4717814 100644 --- a/tests/comparison_filter/021.phpt +++ b/tests/comparison_filter/021.phpt @@ -14,7 +14,7 @@ $data = [ ], ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, "$[?(@.2 == 'second')]"); sortRecursively($result); diff --git a/tests/comparison_filter/022.phpt b/tests/comparison_filter/022.phpt index 0749074..ee1aeb2 100644 --- a/tests/comparison_filter/022.phpt +++ b/tests/comparison_filter/022.phpt @@ -14,7 +14,7 @@ $data = [ null, ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, "$[?()]"); var_dump($result); diff --git a/tests/comparison_filter/023.phpt b/tests/comparison_filter/023.phpt index e447f40..ed1b9ec 100644 --- a/tests/comparison_filter/023.phpt +++ b/tests/comparison_filter/023.phpt @@ -71,7 +71,7 @@ $data = [ ], ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, "$[?(@.key==42)]"); var_dump($result); diff --git a/tests/comparison_filter/024.phpt b/tests/comparison_filter/024.phpt index 92b8a3a..9c02973 100644 --- a/tests/comparison_filter/024.phpt +++ b/tests/comparison_filter/024.phpt @@ -17,7 +17,7 @@ $data = [ 100, ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, "$[?(@==42)]"); var_dump($result); diff --git a/tests/comparison_filter/025.phpt b/tests/comparison_filter/025.phpt index 168e3cb..32b819e 100644 --- a/tests/comparison_filter/025.phpt +++ b/tests/comparison_filter/025.phpt @@ -11,7 +11,7 @@ $data = [ ] ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, "$[?(@.key==43)]"); var_dump($result); diff --git a/tests/comparison_filter/026.phpt b/tests/comparison_filter/026.phpt index 5a93f61..5d3dfb9 100644 --- a/tests/comparison_filter/026.phpt +++ b/tests/comparison_filter/026.phpt @@ -35,7 +35,7 @@ $data = [ ], ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, "$[?(@.key==42)]"); var_dump($result); diff --git a/tests/comparison_filter/027.phpt b/tests/comparison_filter/027.phpt index 99d2228..2337f64 100644 --- a/tests/comparison_filter/027.phpt +++ b/tests/comparison_filter/027.phpt @@ -9,7 +9,7 @@ $data = [ "id" => 2, ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, "$[?(@.id==2)]"); var_dump($result); diff --git a/tests/comparison_filter/028.phpt b/tests/comparison_filter/028.phpt index 2db2bde..466c611 100644 --- a/tests/comparison_filter/028.phpt +++ b/tests/comparison_filter/028.phpt @@ -61,7 +61,7 @@ $data = [ ], ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, '$[?(@.d==["v1","v2"])]'); var_dump($result); diff --git a/tests/comparison_filter/029.phpt b/tests/comparison_filter/029.phpt index 51c85ac..3724139 100644 --- a/tests/comparison_filter/029.phpt +++ b/tests/comparison_filter/029.phpt @@ -22,7 +22,7 @@ $data = [ 2, ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, "$[?(@[0:1]==[1])]"); var_dump($result); diff --git a/tests/comparison_filter/030.phpt b/tests/comparison_filter/030.phpt index ebe5d90..f201d80 100644 --- a/tests/comparison_filter/030.phpt +++ b/tests/comparison_filter/030.phpt @@ -30,7 +30,7 @@ $data = [ 3, ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, "$[?(@.*==[1,2])]"); var_dump($result); diff --git a/tests/comparison_filter/031.phpt b/tests/comparison_filter/031.phpt index 9c86df5..ff69383 100644 --- a/tests/comparison_filter/031.phpt +++ b/tests/comparison_filter/031.phpt @@ -61,7 +61,7 @@ $data = [ ], ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, "$[?(@.d==['v1','v2'])]"); var_dump($result); diff --git a/tests/comparison_filter/032.phpt b/tests/comparison_filter/032.phpt index 0d39d2d..efd11b6 100644 --- a/tests/comparison_filter/032.phpt +++ b/tests/comparison_filter/032.phpt @@ -17,7 +17,7 @@ $data = [ ], ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, "$[?((@.key<44)==false)]"); var_dump($result); diff --git a/tests/comparison_filter/033.phpt b/tests/comparison_filter/033.phpt index 5e5641e..271ed8b 100644 --- a/tests/comparison_filter/033.phpt +++ b/tests/comparison_filter/033.phpt @@ -44,7 +44,7 @@ $data = [ ], ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, "$[?(@.key==false)]"); var_dump($result); diff --git a/tests/comparison_filter/034.phpt b/tests/comparison_filter/034.phpt index c3bea3e..9d35956 100644 --- a/tests/comparison_filter/034.phpt +++ b/tests/comparison_filter/034.phpt @@ -44,7 +44,7 @@ $data = [ ], ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, "$[?(@.key==null)]"); var_dump($result); diff --git a/tests/comparison_filter/035.phpt b/tests/comparison_filter/035.phpt index d8d9c93..a434d09 100644 --- a/tests/comparison_filter/035.phpt +++ b/tests/comparison_filter/035.phpt @@ -22,7 +22,7 @@ $data = [ 2, ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, "$[?(@[0:1]==1)]"); var_dump($result); diff --git a/tests/comparison_filter/036.phpt b/tests/comparison_filter/036.phpt index 7a0f4a5..744774b 100644 --- a/tests/comparison_filter/036.phpt +++ b/tests/comparison_filter/036.phpt @@ -40,7 +40,7 @@ $data = [ 3, ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, "$[?(@[*]==2)]"); var_dump($result); diff --git a/tests/comparison_filter/037.phpt b/tests/comparison_filter/037.phpt index f2133e1..ddeb193 100644 --- a/tests/comparison_filter/037.phpt +++ b/tests/comparison_filter/037.phpt @@ -40,7 +40,7 @@ $data = [ 3, ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, "$[?(@.*==2)]"); var_dump($result); diff --git a/tests/comparison_filter/038.phpt b/tests/comparison_filter/038.phpt index a06efd0..1e75287 100644 --- a/tests/comparison_filter/038.phpt +++ b/tests/comparison_filter/038.phpt @@ -26,7 +26,7 @@ $data = [ ], ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, "$[?(@.key==-0.123e2)]"); var_dump($result); diff --git a/tests/comparison_filter/039.phpt b/tests/comparison_filter/039.phpt index d6c1049..0dbff23 100644 --- a/tests/comparison_filter/039.phpt +++ b/tests/comparison_filter/039.phpt @@ -23,7 +23,7 @@ $data = [ ], ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, "$[?(@.key==010)]"); var_dump($result); diff --git a/tests/comparison_filter/040.phpt b/tests/comparison_filter/040.phpt index ecbba2d..4129464 100644 --- a/tests/comparison_filter/040.phpt +++ b/tests/comparison_filter/040.phpt @@ -58,7 +58,7 @@ $data = [ "v", ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, "$[?(@.d=={\"k\":\"v\"})]"); var_dump($result); diff --git a/tests/comparison_filter/041.phpt b/tests/comparison_filter/041.phpt index e2ca1b6..b84be65 100644 --- a/tests/comparison_filter/041.phpt +++ b/tests/comparison_filter/041.phpt @@ -59,7 +59,7 @@ $data = [ ], ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, "$[?(@.key==\"value\")]"); var_dump($result); diff --git a/tests/comparison_filter/042.phpt b/tests/comparison_filter/042.phpt index bdbaee6..d5cab6f 100644 --- a/tests/comparison_filter/042.phpt +++ b/tests/comparison_filter/042.phpt @@ -17,7 +17,7 @@ $data = [ ], ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, "$[?(@.key==\"hi@example.com\")]"); var_dump($result); diff --git a/tests/comparison_filter/043.phpt b/tests/comparison_filter/043.phpt index 523d92f..207c99b 100644 --- a/tests/comparison_filter/043.phpt +++ b/tests/comparison_filter/043.phpt @@ -17,7 +17,7 @@ $data = [ ], ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, "$[?(@.key==\"some.value\")]"); var_dump($result); diff --git a/tests/comparison_filter/044.phpt b/tests/comparison_filter/044.phpt index 9084601..3a35a63 100644 --- a/tests/comparison_filter/044.phpt +++ b/tests/comparison_filter/044.phpt @@ -14,7 +14,7 @@ $data = [ ], ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, "$[?(@.key=='value')]"); var_dump($result); diff --git a/tests/comparison_filter/045.phpt b/tests/comparison_filter/045.phpt index 37f567a..af068b0 100644 --- a/tests/comparison_filter/045.phpt +++ b/tests/comparison_filter/045.phpt @@ -44,7 +44,7 @@ $data = [ ], ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, "$[?(@.key==true)]"); var_dump($result); diff --git a/tests/comparison_filter/046.phpt b/tests/comparison_filter/046.phpt index 239b688..b919b43 100644 --- a/tests/comparison_filter/046.phpt +++ b/tests/comparison_filter/046.phpt @@ -20,7 +20,7 @@ $data = [ ], ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, "$.items[?(@.key==$.value)]"); var_dump($result); diff --git a/tests/comparison_filter/047.phpt b/tests/comparison_filter/047.phpt index fb580ce..30c1e7f 100644 --- a/tests/comparison_filter/047.phpt +++ b/tests/comparison_filter/047.phpt @@ -47,7 +47,7 @@ $data = [ ], ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, "$[?(@.key>42)]"); var_dump($result); diff --git a/tests/comparison_filter/048.phpt b/tests/comparison_filter/048.phpt index 802fcd7..514496a 100644 --- a/tests/comparison_filter/048.phpt +++ b/tests/comparison_filter/048.phpt @@ -47,7 +47,7 @@ $data = [ ], ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, "$[?(@.key>=42)]"); var_dump($result); diff --git a/tests/comparison_filter/049.phpt b/tests/comparison_filter/049.phpt index 4f8eeb6..3f5d684 100644 --- a/tests/comparison_filter/049.phpt +++ b/tests/comparison_filter/049.phpt @@ -23,7 +23,7 @@ $data = [ ], ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, "$[?(@.d in [2, 3])]"); var_dump($result); diff --git a/tests/comparison_filter/050.phpt b/tests/comparison_filter/050.phpt index 987863f..24e171c 100644 --- a/tests/comparison_filter/050.phpt +++ b/tests/comparison_filter/050.phpt @@ -37,7 +37,7 @@ $data = [ ], ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, "$[?(2 in @.d)]"); var_dump($result); diff --git a/tests/comparison_filter/051.phpt b/tests/comparison_filter/051.phpt index 78af7fb..12257d5 100644 --- a/tests/comparison_filter/051.phpt +++ b/tests/comparison_filter/051.phpt @@ -47,7 +47,7 @@ $data = [ ], ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, "$[?(@.key<42)]"); var_dump($result); diff --git a/tests/comparison_filter/052.phpt b/tests/comparison_filter/052.phpt index ac673f3..2dc0de7 100644 --- a/tests/comparison_filter/052.phpt +++ b/tests/comparison_filter/052.phpt @@ -47,7 +47,7 @@ $data = [ ], ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, "$[?(@.key<=42)]"); var_dump($result); diff --git a/tests/comparison_filter/053.phpt b/tests/comparison_filter/053.phpt index 8633653..5166cee 100644 --- a/tests/comparison_filter/053.phpt +++ b/tests/comparison_filter/053.phpt @@ -23,7 +23,7 @@ $data = [ ], ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, "$[?(@.key*2==100)]"); var_dump($result); diff --git a/tests/comparison_filter/054.phpt b/tests/comparison_filter/054.phpt index b81a003..e8c3441 100644 --- a/tests/comparison_filter/054.phpt +++ b/tests/comparison_filter/054.phpt @@ -47,7 +47,7 @@ $data = [ ], ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, "$[?(!(@.key==42))]"); var_dump($result); diff --git a/tests/comparison_filter/055.phpt b/tests/comparison_filter/055.phpt index c4260b6..917f07a 100644 --- a/tests/comparison_filter/055.phpt +++ b/tests/comparison_filter/055.phpt @@ -47,7 +47,7 @@ $data = [ ], ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, "$[?(!(@.key<42))]"); var_dump($result); diff --git a/tests/comparison_filter/056.phpt b/tests/comparison_filter/056.phpt index 3ff91cb..8249e25 100644 --- a/tests/comparison_filter/056.phpt +++ b/tests/comparison_filter/056.phpt @@ -74,7 +74,7 @@ $data = [ ], ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, "$[?(@.key!=42)]"); var_dump($result); diff --git a/tests/comparison_filter/057.phpt b/tests/comparison_filter/057.phpt index 7458b0a..7c27a84 100644 --- a/tests/comparison_filter/057.phpt +++ b/tests/comparison_filter/057.phpt @@ -23,7 +23,7 @@ $data = [ ], ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, "$[?(@.name=~/hello.*/)]"); var_dump($result); diff --git a/tests/comparison_filter/058.phpt b/tests/comparison_filter/058.phpt index ba91c11..3f68745 100644 --- a/tests/comparison_filter/058.phpt +++ b/tests/comparison_filter/058.phpt @@ -28,7 +28,7 @@ $data = [ ], ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, "$[?(@.name=~/@.pattern/)]"); var_dump($result); diff --git a/tests/comparison_filter/059.phpt b/tests/comparison_filter/059.phpt index 3daca81..d40b336 100644 --- a/tests/comparison_filter/059.phpt +++ b/tests/comparison_filter/059.phpt @@ -28,7 +28,7 @@ $data = [ ], ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, "$[?(@[*]>=4)]"); var_dump($result); diff --git a/tests/comparison_filter/060.phpt b/tests/comparison_filter/060.phpt index 1abac0e..80b2507 100644 --- a/tests/comparison_filter/060.phpt +++ b/tests/comparison_filter/060.phpt @@ -35,7 +35,7 @@ $data = [ ], ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, "$.x[?(@[*]>=$.y[*])]"); var_dump($result); diff --git a/tests/comparison_filter/061.phpt b/tests/comparison_filter/061.phpt index ed18828..4ae5596 100644 --- a/tests/comparison_filter/061.phpt +++ b/tests/comparison_filter/061.phpt @@ -74,7 +74,7 @@ $data = [ ], ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, "$[?(@.key=42)]"); var_dump($result); diff --git a/tests/comparison_filter/062.phpt b/tests/comparison_filter/062.phpt index 7e44d80..1689c4e 100644 --- a/tests/comparison_filter/062.phpt +++ b/tests/comparison_filter/062.phpt @@ -41,7 +41,7 @@ $data = [ ], ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, "$[?(@.a[?(@.price>10)])]"); var_dump($result); diff --git a/tests/comparison_filter/063.phpt b/tests/comparison_filter/063.phpt index 7378929..094dd50 100644 --- a/tests/comparison_filter/063.phpt +++ b/tests/comparison_filter/063.phpt @@ -18,7 +18,7 @@ $data = [ ], ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, "$[?(@.address.city=='Berlin')]"); var_dump($result); diff --git a/tests/comparison_filter/064.phpt b/tests/comparison_filter/064.phpt index 8fd941e..2e29a32 100644 --- a/tests/comparison_filter/064.phpt +++ b/tests/comparison_filter/064.phpt @@ -23,7 +23,7 @@ $data = [ ], ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, "$[?(@.key-50==-100)]"); var_dump($result); diff --git a/tests/comparison_filter/065.phpt b/tests/comparison_filter/065.phpt index f5dfffd..469d2a2 100644 --- a/tests/comparison_filter/065.phpt +++ b/tests/comparison_filter/065.phpt @@ -19,7 +19,7 @@ $data = [ "", ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, "$[?(1==1)]"); var_dump($result); diff --git a/tests/comparison_filter/066.phpt b/tests/comparison_filter/066.phpt index 9e6ec0e..5fde90f 100644 --- a/tests/comparison_filter/066.phpt +++ b/tests/comparison_filter/066.phpt @@ -74,7 +74,7 @@ $data = [ ], ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, "$[?(@.key===42)]"); var_dump($result); diff --git a/tests/comparison_filter/067.phpt b/tests/comparison_filter/067.phpt index 2491037..a79c7dc 100644 --- a/tests/comparison_filter/067.phpt +++ b/tests/comparison_filter/067.phpt @@ -44,7 +44,7 @@ $data = [ ], ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, "$[?(@.key)]"); var_dump($result); diff --git a/tests/comparison_filter/068.phpt b/tests/comparison_filter/068.phpt index b22f4f8..1374683 100644 --- a/tests/comparison_filter/068.phpt +++ b/tests/comparison_filter/068.phpt @@ -14,7 +14,7 @@ $data = [ ], ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, "$.*[?(@.key)]"); var_dump($result); diff --git a/tests/comparison_filter/069.phpt b/tests/comparison_filter/069.phpt index a401c4e..128b694 100644 --- a/tests/comparison_filter/069.phpt +++ b/tests/comparison_filter/069.phpt @@ -30,7 +30,7 @@ $data = [ ], ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, "$..[?(@.id)]"); sortRecursively($result); diff --git a/tests/comparison_filter/070.phpt b/tests/comparison_filter/070.phpt index 86d7117..d315965 100644 --- a/tests/comparison_filter/070.phpt +++ b/tests/comparison_filter/070.phpt @@ -19,7 +19,7 @@ $data = [ "", ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, "$[?(false)]"); var_dump($result); diff --git a/tests/comparison_filter/071.phpt b/tests/comparison_filter/071.phpt index bfaef4d..b71a4d7 100644 --- a/tests/comparison_filter/071.phpt +++ b/tests/comparison_filter/071.phpt @@ -38,7 +38,7 @@ $data = [ [], ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, "$[?(@..child)]"); var_dump($result); diff --git a/tests/comparison_filter/072.phpt b/tests/comparison_filter/072.phpt index 525f022..bc68909 100644 --- a/tests/comparison_filter/072.phpt +++ b/tests/comparison_filter/072.phpt @@ -19,7 +19,7 @@ $data = [ "", ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, "$[?(null)]"); var_dump($result); diff --git a/tests/comparison_filter/073.phpt b/tests/comparison_filter/073.phpt index 7b0410a..743dd6e 100644 --- a/tests/comparison_filter/073.phpt +++ b/tests/comparison_filter/073.phpt @@ -19,7 +19,7 @@ $data = [ "", ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, "$[?(true)]"); var_dump($result); diff --git a/tests/comparison_filter/074.phpt b/tests/comparison_filter/074.phpt index 6d82a19..bb4093d 100644 --- a/tests/comparison_filter/074.phpt +++ b/tests/comparison_filter/074.phpt @@ -74,7 +74,7 @@ $data = [ ], ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, "$[?@.key==42]"); var_dump($result); diff --git a/tests/comparison_filter/075.phpt b/tests/comparison_filter/075.phpt index 185a906..f724736 100644 --- a/tests/comparison_filter/075.phpt +++ b/tests/comparison_filter/075.phpt @@ -44,7 +44,7 @@ $data = [ ], ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, "$[?(!@.key)]"); var_dump($result); diff --git a/tests/comparison_misc/001.phpt b/tests/comparison_misc/001.phpt index 59283d6..5c917b9 100644 --- a/tests/comparison_misc/001.phpt +++ b/tests/comparison_misc/001.phpt @@ -10,7 +10,7 @@ $data = [ "" => 21, ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, ""); var_dump($result); diff --git a/tests/comparison_misc/002.phpt b/tests/comparison_misc/002.phpt index 94c8aa8..9ab41fc 100644 --- a/tests/comparison_misc/002.phpt +++ b/tests/comparison_misc/002.phpt @@ -11,7 +11,7 @@ $data = [ "more" => 3, ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, "$(key,more)"); var_dump($result); diff --git a/tests/comparison_misc/003.phpt b/tests/comparison_misc/003.phpt index 8aab352..78bb777 100644 --- a/tests/comparison_misc/003.phpt +++ b/tests/comparison_misc/003.phpt @@ -13,7 +13,7 @@ $data = [ "fifth", ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, "$[(@.length-1)]"); var_dump($result); diff --git a/tests/comparison_recursive_descent/001.phpt b/tests/comparison_recursive_descent/001.phpt index 98f813a..4621331 100644 --- a/tests/comparison_recursive_descent/001.phpt +++ b/tests/comparison_recursive_descent/001.phpt @@ -17,7 +17,7 @@ $data = [ ], ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, "$.."); var_dump($result); diff --git a/tests/comparison_recursive_descent/002.phpt b/tests/comparison_recursive_descent/002.phpt index a0e1c8c..923e0cd 100644 --- a/tests/comparison_recursive_descent/002.phpt +++ b/tests/comparison_recursive_descent/002.phpt @@ -16,7 +16,7 @@ $data = [ ], ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, "$.key.."); var_dump($result); diff --git a/tests/comparison_root/001.phpt b/tests/comparison_root/001.phpt index a3809b9..2aeffc5 100644 --- a/tests/comparison_root/001.phpt +++ b/tests/comparison_root/001.phpt @@ -16,7 +16,7 @@ $data = [ ], ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, "$"); sortRecursively($result); diff --git a/tests/comparison_root/002_php7.phpt b/tests/comparison_root/002_php7.phpt index a79f312..63e4fed 100644 --- a/tests/comparison_root/002_php7.phpt +++ b/tests/comparison_root/002_php7.phpt @@ -8,11 +8,11 @@ Test root on scalar $data = 42; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, "$"); var_dump($result); ?> --EXPECTF-- -Warning: JsonPath::find() expects parameter 1 to be array, int given in %s002_php7.php on line %d +Warning: JsonPath\JsonPath::find(): expects parameter 1 to be array, int given in %s002_php7.php on line %d NULL diff --git a/tests/comparison_root/002_php8.phpt b/tests/comparison_root/002_php8.phpt index bf0bbe2..b9355cc 100644 --- a/tests/comparison_root/002_php8.phpt +++ b/tests/comparison_root/002_php8.phpt @@ -8,14 +8,14 @@ Test root on scalar $data = 42; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, "$"); var_dump($result); ?> --EXPECTF-- -Fatal error: Uncaught TypeError: JsonPath::find(): Argument #1 ($data) must be of type array, int given in %s002_php8.php:%d +Fatal error: Uncaught TypeError: JsonPath\JsonPath::find(): Argument #1 ($data) must be of type array, int given in %s002_php8.php:%d Stack trace: -#0 %s002_php8.php(%d): JsonPath->find(42, '$') -#1 {main} - thrown in %s002_php8.php on line %d +%s +%s +%s diff --git a/tests/comparison_root/003_php7.phpt b/tests/comparison_root/003_php7.phpt index 1f668e3..5bc1c9e 100644 --- a/tests/comparison_root/003_php7.phpt +++ b/tests/comparison_root/003_php7.phpt @@ -8,11 +8,11 @@ Test root on scalar false $data = false; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, "$"); var_dump($result); ?> --EXPECTF-- -Warning: JsonPath::find() expects parameter 1 to be array, bool given in %s003_php7.php on line %d +Warning: JsonPath\JsonPath::find(): expects parameter 1 to be array, bool given in %s003_php7.php on line %d NULL diff --git a/tests/comparison_root/003_php8.phpt b/tests/comparison_root/003_php8.phpt index 3208a2a..8f814df 100644 --- a/tests/comparison_root/003_php8.phpt +++ b/tests/comparison_root/003_php8.phpt @@ -8,14 +8,14 @@ Test root on scalar false $data = false; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, "$"); var_dump($result); ?> --EXPECTF-- -Fatal error: Uncaught TypeError: JsonPath::find(): Argument #1 ($data) must be of type array, bool given in %s003_php8.php:%d +Fatal error: Uncaught TypeError: JsonPath\JsonPath::find(): Argument #1 ($data) must be of type array, bool given in %s003_php8.php:%d Stack trace: -#0 %s003_php8.php(%d): JsonPath->find(false, '$') -#1 {main} - thrown in %s003_php8.php on line %d +%s +%s +%s diff --git a/tests/comparison_root/004_php7.phpt b/tests/comparison_root/004_php7.phpt index 961b6f3..b8a0a1e 100644 --- a/tests/comparison_root/004_php7.phpt +++ b/tests/comparison_root/004_php7.phpt @@ -8,11 +8,11 @@ Test root on scalar true $data = true; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, "$"); var_dump($result); ?> --EXPECTF-- -Warning: JsonPath::find() expects parameter 1 to be array, bool given in %s004_php7.php on line %d +Warning: JsonPath\JsonPath::find(): expects parameter 1 to be array, bool given in %s004_php7.php on line %d NULL diff --git a/tests/comparison_root/004_php8.phpt b/tests/comparison_root/004_php8.phpt index 3f2bce6..4fd994f 100644 --- a/tests/comparison_root/004_php8.phpt +++ b/tests/comparison_root/004_php8.phpt @@ -8,14 +8,14 @@ Test root on scalar true $data = true; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, "$"); var_dump($result); ?> --EXPECTF-- -Fatal error: Uncaught TypeError: JsonPath::find(): Argument #1 ($data) must be of type array, bool given in %s004_php8.php:%d +Fatal error: Uncaught TypeError: JsonPath\JsonPath::find(): Argument #1 ($data) must be of type array, bool given in %s004_php8.php:%d Stack trace: -#0 %s004_php8.php(%d): JsonPath->find(true, '$') -#1 {main} - thrown in %s004_php8.php on line %d +%s +%s +%s diff --git a/tests/comparison_union/001.phpt b/tests/comparison_union/001.phpt index bd802da..90cc650 100644 --- a/tests/comparison_union/001.phpt +++ b/tests/comparison_union/001.phpt @@ -11,7 +11,7 @@ $data = [ "third", ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, "$[0,1]"); var_dump($result); diff --git a/tests/comparison_union/002.phpt b/tests/comparison_union/002.phpt index 1e51502..becaf74 100644 --- a/tests/comparison_union/002.phpt +++ b/tests/comparison_union/002.phpt @@ -9,7 +9,7 @@ $data = [ "a", ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, "$[0,0]"); var_dump($result); diff --git a/tests/comparison_union/003.phpt b/tests/comparison_union/003.phpt index 30eb410..2ed55f8 100644 --- a/tests/comparison_union/003.phpt +++ b/tests/comparison_union/003.phpt @@ -9,7 +9,7 @@ $data = [ "a" => 1, ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, "$['a','a']"); var_dump($result); diff --git a/tests/comparison_union/004.phpt b/tests/comparison_union/004.phpt index b571de7..f93ad91 100644 --- a/tests/comparison_union/004.phpt +++ b/tests/comparison_union/004.phpt @@ -32,7 +32,7 @@ $data = [ ], ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, "$[?(@.key<3),?(@.key>6)]"); var_dump($result); diff --git a/tests/comparison_union/005.phpt b/tests/comparison_union/005.phpt index 60d8a32..e0a530a 100644 --- a/tests/comparison_union/005.phpt +++ b/tests/comparison_union/005.phpt @@ -10,7 +10,7 @@ $data = [ "another" => "entry", ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, "$['key','another']"); var_dump($result); diff --git a/tests/comparison_union/006.phpt b/tests/comparison_union/006.phpt index 5122de2..7fd5772 100644 --- a/tests/comparison_union/006.phpt +++ b/tests/comparison_union/006.phpt @@ -10,7 +10,7 @@ $data = [ "another" => "entry", ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, "$['missing','key']"); var_dump($result); diff --git a/tests/comparison_union/007.phpt b/tests/comparison_union/007.phpt index 73b9ef4..3b57c46 100644 --- a/tests/comparison_union/007.phpt +++ b/tests/comparison_union/007.phpt @@ -18,7 +18,7 @@ $data = [ ], ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, "$[:]['c','d']"); var_dump($result); diff --git a/tests/comparison_union/008.phpt b/tests/comparison_union/008.phpt index 8e61bc4..275eadc 100644 --- a/tests/comparison_union/008.phpt +++ b/tests/comparison_union/008.phpt @@ -18,7 +18,7 @@ $data = [ ], ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, "$[0]['c','d']"); var_dump($result); diff --git a/tests/comparison_union/009.phpt b/tests/comparison_union/009.phpt index 5aa8c0d..a3c6056 100644 --- a/tests/comparison_union/009.phpt +++ b/tests/comparison_union/009.phpt @@ -18,7 +18,7 @@ $data = [ ], ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, "$.*['c','d']"); var_dump($result); diff --git a/tests/comparison_union/010.phpt b/tests/comparison_union/010.phpt index 54cb7df..429e2a1 100644 --- a/tests/comparison_union/010.phpt +++ b/tests/comparison_union/010.phpt @@ -31,7 +31,7 @@ $data = [ ], ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, "$..['c','d']"); sortRecursively($result); diff --git a/tests/comparison_union/011.phpt b/tests/comparison_union/011.phpt index e9b10ee..2b8af4d 100644 --- a/tests/comparison_union/011.phpt +++ b/tests/comparison_union/011.phpt @@ -13,7 +13,7 @@ $data = [ 5, ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, "$[4,1]"); var_dump($result); diff --git a/tests/comparison_union/012.phpt b/tests/comparison_union/012.phpt index 2a4108b..955f5f0 100644 --- a/tests/comparison_union/012.phpt +++ b/tests/comparison_union/012.phpt @@ -18,7 +18,7 @@ $data = [ ], ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, "$.*[0,:5]"); var_dump($result); diff --git a/tests/comparison_union/013.phpt b/tests/comparison_union/013.phpt index 344ea50..693659b 100644 --- a/tests/comparison_union/013.phpt +++ b/tests/comparison_union/013.phpt @@ -13,7 +13,7 @@ $data = [ 5, ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, "$[1:3,4]"); var_dump($result); diff --git a/tests/comparison_union/014.phpt b/tests/comparison_union/014.phpt index 489c06e..fcdeb82 100644 --- a/tests/comparison_union/014.phpt +++ b/tests/comparison_union/014.phpt @@ -11,7 +11,7 @@ $data = [ "third", ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, "$[ 0 , 1 ]"); var_dump($result); diff --git a/tests/comparison_union/015.phpt b/tests/comparison_union/015.phpt index 54d6908..a5c08c8 100644 --- a/tests/comparison_union/015.phpt +++ b/tests/comparison_union/015.phpt @@ -13,7 +13,7 @@ $data = [ "fifth", ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, "$[*,1]"); var_dump($result); diff --git a/tests/expressions/001.phpt b/tests/expressions/001.phpt index 2d996c0..2d576f1 100644 --- a/tests/expressions/001.phpt +++ b/tests/expressions/001.phpt @@ -5,7 +5,7 @@ Ensure order of operations are enforced --FILE-- [ diff --git a/tests/expressions/002.phpt b/tests/expressions/002.phpt index 9d761bb..ff17e56 100644 --- a/tests/expressions/002.phpt +++ b/tests/expressions/002.phpt @@ -54,7 +54,7 @@ $json = array( ) ); -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); print_r($jsonPath->find($json, '$..book[?(@.author==$.authors[2])].isbn')); diff --git a/tests/expressions/003.phpt b/tests/expressions/003.phpt index 2b55068..3af9f1a 100644 --- a/tests/expressions/003.phpt +++ b/tests/expressions/003.phpt @@ -47,7 +47,7 @@ $data = [ ], ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, "$[?(!!(@.key==42))]"); var_dump($result); diff --git a/tests/isset/001.phpt b/tests/isset/001.phpt index 1cff679..e0fbf55 100644 --- a/tests/isset/001.phpt +++ b/tests/isset/001.phpt @@ -21,7 +21,7 @@ $obj = array( ) ); -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); print_r($jsonPath->find($obj, '$.book[?(@["id"]["isbn"])]')); diff --git a/tests/isset/002.phpt b/tests/isset/002.phpt index c331073..46d5a84 100644 --- a/tests/isset/002.phpt +++ b/tests/isset/002.phpt @@ -31,7 +31,7 @@ $obj = array( ) ); -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); print_r($jsonPath->find($obj, '$.book[?(@["id"]["isbn"] && @.author == "Nigel Rees")]')); diff --git a/tests/isset/003.phpt b/tests/isset/003.phpt index b82cbdf..cb19158 100644 --- a/tests/isset/003.phpt +++ b/tests/isset/003.phpt @@ -31,7 +31,7 @@ $obj = array( ) ); -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); print_r($jsonPath->find($obj, '$.book[?(@["id"]["isbn"] && "Nigel Rees" == @.author)]')); diff --git a/tests/issue_27/001.phpt b/tests/issue_27/001.phpt index 03353dd..944c4ee 100644 --- a/tests/issue_27/001.phpt +++ b/tests/issue_27/001.phpt @@ -5,7 +5,7 @@ Test typical use cases --FILE-- diff --git a/tests/lex_errs/001.phpt b/tests/lex_errs/001.phpt index 590f75a..d7040c4 100644 --- a/tests/lex_errs/001.phpt +++ b/tests/lex_errs/001.phpt @@ -5,7 +5,7 @@ Ensure exception is thrown for missing closing bracket --FILE-- find([], "$.testl['test'"); --EXPECTF-- diff --git a/tests/lex_errs/002.phpt b/tests/lex_errs/002.phpt index 5c00986..1ce118b 100644 --- a/tests/lex_errs/002.phpt +++ b/tests/lex_errs/002.phpt @@ -5,7 +5,7 @@ Ensure exception is thrown for missing closing bracket --FILE-- find([], '$.testl["test"'); --EXPECTF-- diff --git a/tests/lex_errs/004.phpt b/tests/lex_errs/004.phpt index eae9826..4f9e254 100644 --- a/tests/lex_errs/004.phpt +++ b/tests/lex_errs/004.phpt @@ -5,7 +5,7 @@ Ensure exception is thrown for missing double && --FILE-- find([], '$.book[?(@.id.isbn == "684832674" & @.author == "Herman Melville")]'); --EXPECTF-- diff --git a/tests/lex_errs/005.phpt b/tests/lex_errs/005.phpt index 01ff190..373040e 100644 --- a/tests/lex_errs/005.phpt +++ b/tests/lex_errs/005.phpt @@ -5,7 +5,7 @@ Ensure exception is thrown for missing double || --FILE-- find([], '$.book[?(@.id.isbn == "684832674" | @.author == "Herman Melville")]'); --EXPECTF-- diff --git a/tests/parse_errs/001.phpt b/tests/parse_errs/001.phpt index df8da1d..a2e7cf2 100644 --- a/tests/parse_errs/001.phpt +++ b/tests/parse_errs/001.phpt @@ -5,7 +5,7 @@ Ensure exception is thrown for missing closing bracket --FILE-- find([], '$.book['); --EXPECTF-- diff --git a/tests/parse_errs/002.phpt b/tests/parse_errs/002.phpt index 698fc81..6a61c3f 100644 --- a/tests/parse_errs/002.phpt +++ b/tests/parse_errs/002.phpt @@ -5,7 +5,7 @@ Ensure exception is thrown for missing closing bracket --FILE-- find([], '$.store.book[?(@.author == "Evelyn Waugh"'); --EXPECTF-- diff --git a/tests/regex/001.phpt b/tests/regex/001.phpt index ecf472f..de85b74 100644 --- a/tests/regex/001.phpt +++ b/tests/regex/001.phpt @@ -5,7 +5,7 @@ Test regex with a match --FILE-- array( diff --git a/tests/regex/002.phpt b/tests/regex/002.phpt index 72a3782..8050c64 100644 --- a/tests/regex/002.phpt +++ b/tests/regex/002.phpt @@ -5,7 +5,7 @@ Test regex without a match --FILE-- array( diff --git a/tests/regex/003.phpt b/tests/regex/003.phpt index 503450d..807315f 100644 --- a/tests/regex/003.phpt +++ b/tests/regex/003.phpt @@ -15,12 +15,12 @@ $data = [ ], ]; -$jsonPath = new JsonPath(); +$jsonPath = new \JsonPath\JsonPath(); $result = $jsonPath->find($data, '$.test[?(@.val_str =~ "/invalid([a-]+/")]'); var_dump($result); --EXPECTF-- -Warning: JsonPath::find(): Compilation failed: missing closing parenthesis at offset 13 in %s +Warning: JsonPath\JsonPath::find(): Compilation failed: missing closing parenthesis at offset 13 in %s Fatal error: Uncaught RuntimeException: Invalid regex pattern `/invalid([a-]+/` in %s Stack trace: