m2mdas / phpcomplete-extended

A fast, extensible, context aware autocomplete plugin for PHP composer projects with code inspection features.
MIT License
216 stars 23 forks source link

Fails with FOSRestBundle and Symfony2 #52

Open jhogendorn opened 9 years ago

jhogendorn commented 9 years ago

Command on L1440 ends up as: php /Users/jhogendorn/.dotfiles/vim/.vim/bundle/phpcomplete-extended/bin/IndexGenerator.php generate -u /Users/jhogendorn/.vim/bundle/phpcomplete-extended-symfony/bin/symfony.php

PHP Fatal error:  Declaration of FOS\RestBundle\Request\RequestBodyParamConverter20::apply() must be compatible with Sensio\Bundle\FrameworkExtraBundle\Request\ParamConverter\ParamConverterInterface::apply(Symfony\Component\HttpFoundation\Request $request, Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter $configuration) in /Users/jhogendorn/Code/bds/api/vendor/friendsofsymfony/rest-bundle/FOS/RestBundle/Request/RequestBodyParamConverter20.php on line 40
PHP Stack trace:
PHP   1. {main}() /Users/jhogendorn/.dotfiles/vim/.vim/bundle/phpcomplete-extended/bin/IndexGenerator.php:0
PHP   2. IndexGenerator->generateIndex() /Users/jhogendorn/.dotfiles/vim/.vim/bundle/phpcomplete-extended/bin/IndexGenerator.php:57
PHP   3. IndexGenerator->processClass() /Users/jhogendorn/.dotfiles/vim/.vim/bundle/phpcomplete-extended/bin/IndexGenerator.php:491
PHP   4. IndexGenerator->getClassInfo() /Users/jhogendorn/.dotfiles/vim/.vim/bundle/phpcomplete-extended/bin/IndexGenerator.php:594
PHP   5. ReflectionClass->__construct() /Users/jhogendorn/.dotfiles/vim/.vim/bundle/phpcomplete-extended/bin/IndexGenerator.php:778
PHP   6. spl_autoload_call() /Users/jhogendorn/.dotfiles/vim/.vim/bundle/phpcomplete-extended/bin/IndexGenerator.php:778
PHP   7. Composer\Autoload\ClassLoader->loadClass() /Users/jhogendorn/.dotfiles/vim/.vim/bundle/phpcomplete-extended/bin/IndexGenerator.php:778
PHP   8. Composer\Autoload\includeFile() /Users/jhogendorn/Code/bds/api/vendor/composer/ClassLoader.php:301

Fatal error: Declaration of FOS\RestBundle\Request\RequestBodyParamConverter20::apply() must be compatible with Sensio\Bundle\FrameworkExtraBundle\Request\ParamConverter\ParamConverterInterface::apply(Symfony\Component\HttpFoundation\Request $request, Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter $configuration) in /Users/jhogendorn/Code/bds/api/vendor/friendsofsymfony/rest-bundle/FOS/RestBundle/Request/RequestBodyParamConverter20.php on line 40

Call Stack:
    0.0018     579016   1. {main}() /Users/jhogendorn/.dotfiles/vim/.vim/bundle/phpcomplete-extended/bin/IndexGenerator.php:0
    0.0163    2634432   2. IndexGenerator->generateIndex() /Users/jhogendorn/.dotfiles/vim/.vim/bundle/phpcomplete-extended/bin/IndexGenerator.php:57
    7.0121  176670760   3. IndexGenerator->processClass() /Users/jhogendorn/.dotfiles/vim/.vim/bundle/phpcomplete-extended/bin/IndexGenerator.php:491
    7.0121  176670896   4. IndexGenerator->getClassInfo() /Users/jhogendorn/.dotfiles/vim/.vim/bundle/phpcomplete-extended/bin/IndexGenerator.php:594
    7.0121  176678816   5. ReflectionClass->__construct() /Users/jhogendorn/.dotfiles/vim/.vim/bundle/phpcomplete-extended/bin/IndexGenerator.php:778
    7.0121  176679280   6. spl_autoload_call() /Users/jhogendorn/.dotfiles/vim/.vim/bundle/phpcomplete-extended/bin/IndexGenerator.php:778
    7.0121  176679352   7. Composer\Autoload\ClassLoader->loadClass() /Users/jhogendorn/.dotfiles/vim/.vim/bundle/phpcomplete-extended/bin/IndexGenerator.php:778
    7.0121  176679352   8. Composer\Autoload\includeFile() /Users/jhogendorn/Code/bds/api/vendor/composer/ClassLoader.php:301

Seems related to this issue:

https://github.com/FriendsOfSymfony/FOSRestBundle/issues/622

Which was ostensibly resolved by

https://github.com/FriendsOfSymfony/FOSRestBundle/pull/633

Resolution is probably something similar.

girvo commented 9 years ago

I've also run into this issue, which is a bit of a deal breaker unfortunately!

mkusher commented 9 years ago

@girvo since m2mdas doesn't support this plugin anymore, you may want to try my one: https://github.com/mkusher/padawan.php