Peekmo / atom-autocomplete-php

Autocomplete for PHP in atom editor
MIT License
136 stars 34 forks source link

hp-proxy.coffee::execute —> exec.spawnSync(…) returns an empty string. #325

Open stphane opened 7 years ago

stphane commented 7 years ago

An exception accurs in php-proxy.coffee::execute on line 48. «res = JSON.parse(stdout)» because stdout variable, which holds exec.spawnSync(config.config.php, args, options).output[1].toString('ascii') return value, is empty.
This error pops every time I hit save or simply open up the editor, resulting in the following message "Unexpected end of JSON input"

Stack trace

execute (php-proxy.coffee [sm]:50) methods (php-proxy.coffee [sm]:201) getMemberContext (php-file-parser…offee [sm]:680) module.exports.FunctionProvider.getTooltipForWord (function-provid…coffee [sm]:18) module.exports.AbstractProvider.showPopoverFor (abstract-provid…offee [sm]:109) (anonymous function) (abstract-provid…coffee [sm]:78) dispatch (jquery.js:4435) elemData.handle (jquery.js:4121)

Configuration is okey. PHP, composer and autoload are correctly set. My project uses Silex framework.

soifou commented 7 years ago

Exact same problem here. Atom 1.19.2, Debian 8, PHP 7.0.

Seems like php xml extension is required to use this package and it was missing on my system... A sudo apt install php7.0-xml resolved it.

Would be nice Atom Autocomplete PHP: Configuration also check the required php extension list.