padawan-php / padawan.php

php intelligent code completion http server
http://mkusher.name/padawan/
MIT License
253 stars 30 forks source link

Its not working with PHP7.1.2 #98

Closed pbogut closed 7 years ago

pbogut commented 7 years ago

Running php vendor/bin/padawan-server with PHP 7.1.2 is causing fatal error:

PHP Fatal error:  Cannot use lexical variable $parameters as a parameter name in /home/pbogut/.config/nvim/plugged/deoplete-padawan/vendor/mnapoli/php-di/src/DI/Definition/Resolver/ClassDefinitionResolver.php on line 146
Fatal error: Cannot use lexical variable $parameters as a parameter name in /home/pbogut/.config/nvim/plugged/deoplete-padawan/vendor/mnapoli/php-di/src/DI/Definition/Resolver/ClassDefinitionResolver.php on line 146
halftan commented 7 years ago

@pbogut Seems like it's related with PHP-DI. Which version of PHP-DI are you using? and if you could get backtrace of this error, please paste it here.

pbogut commented 7 years ago

I've installed Padawah 0.2.1 by mistake, sorry.

With master I have different error:

PHP Fatal error:  Uncaught ArgumentCountError: Too few arguments to function React\Socket\Server::__construct(), 1 passed in /home/pbogut/padawan/vendor/mkusher/padawan/bin/padawan-server on line 70 and at least 2 expected in /home/pbogut/padawan/vendor/react/socket/src/Server.php:127
Stack trace:
#0 /home/pbogut/padawan/vendor/mkusher/padawan/bin/padawan-server(70): React\Socket\Server->__construct(Object(React\EventLoop\StreamSelectLoop))
#1 /home/pbogut/padawan/vendor/mkusher/padawan/bin/padawan-server(37): runServer()
#2 {main}
  thrown in /home/pbogut/padawan/vendor/react/socket/src/Server.php on line 127
Fatal error: Uncaught ArgumentCountError: Too few arguments to function React\Socket\Server::__construct(), 1 passed in /home/pbogut/padawan/vendor/mkusher/padawan/bin/padawan-server on line 70 and at least 2 expected in /home/pbogut/padawan/vendor/react/socket/src/Server.php:127
Stack trace:
#0 /home/pbogut/padawan/vendor/mkusher/padawan/bin/padawan-server(70): React\Socket\Server->__construct(Object(React\EventLoop\StreamSelectLoop))
#1 /home/pbogut/padawan/vendor/mkusher/padawan/bin/padawan-server(37): runServer()
#2 {main}
  thrown in /home/pbogut/padawan/vendor/react/socket/src/Server.php on line 127

I've installed it from composer.json

{
    "minimum-stability": "dev",
    "require": {
        "mkusher/padawan": "dev-master"
    }
}

So to reproduce create composer.json with content above in the empty directory. Run composer install and then try to ./vendor/bin/padawan-server.

halftan commented 7 years ago

@pbogut This has been fixed with https://github.com/padawan-php/padawan.php/pull/102. Please wait for packagist to refresh padawan's dev-master and run composer update and try again.

Packagist haven't reloaded the latest commits yet.

halftan commented 7 years ago

Wait a second, is it possible that packagist's service hook is down? @mkusher please take a look at repo's service hook.

mkusher commented 7 years ago

@halftan yes, somewhy it's down, updated manually, will check settings

pbogut commented 7 years ago

Works now, thanks.