nahid / jsonq

A PHP query builder for JSON
Creative Commons Zero v1.0 Universal
870 stars 105 forks source link

installation error #60

Closed mecevik closed 3 years ago

mecevik commented 3 years ago

I installed it with composer and included it on my own code and I get syntax error, unexpected 'use' (T_USE). Here is my code `require DIR . '/vendor/autoload.php'

use Nahid/JsonQ/Jsonq;` any solutions?

nahid commented 3 years ago

This is not JsonQ related problem. You can share your code here, I'll try to solve this.

mecevik commented 3 years ago

This is not JsonQ related problem. You can share your code here, I'll try to solve this.

Thanks for your reply. Sorry for returning back late, I think it was the installation fault originated from me. I tried the installation over examples and it now works but a problem came with it. When I tried to the get.php example I got the error below:

Fatal error: Uncaught Error: Call to undefined function dump() in C:\xampp2\htdocs\json\get.php:19 Stack trace: #0 {main} thrown in C:\xampp2\htdocs\json\get.php on line 19

When I delete dump function no error is shown.I tried it with var_dump function and it returns full object.

Can you help me with this?

nahid commented 3 years ago

dump() function comes from symphony var-dumper. I think it was missing.

mecevik commented 3 years ago

dump() function comes from symphony var-dumper. I think it was missing.

You mean you should install var-dumper library, right? Is there any package that should be installed too?