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

Error in classmap generation #13

Open gonzaloserrano opened 11 years ago

gonzaloserrano commented 11 years ago

Hi, i'm trying to make things work... not much luck actually with autocompletion, but also im getting this errors while generating a symfony2 project classmap:


Generating index... Error detected while processing function phpcomplete_extended#readDataForProject..phpcomplete_extended#loadProject..173_loadIndex..173_readIndex: line 2: E605: Exception not caught: file /Users/gonzalo/Development/socialpoint/sp-platform-monstercity/.phpcomplete_extended/phpcomplete_index Error detected while processing function phpcomplete_extended#readDataForProject..phpcomplete_extended#loadProject..173_loadIndex: line 43: E171: Missing :endif Error detected while processing function phpcomplete_extended#readDataForProject: line 4: E171: Missing :endif


VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Aug 20 2013 15:11:25) MacOS X (unix) version Compiled by Homebrew

phpcomplete-extended & phpcomplete-extended-symfony in master versions


Any ideas?

m2mdas commented 11 years ago

Hi,
It seems that index generation failed. Can you issue :PHPCompleteExtendedGenerateIndex command and check the output?

gonzaloserrano commented 11 years ago

Yes, here you are:

Generating index...

Fatal error: Uncaught exception 'ErrorException' with message 'Notice: Undefined index: Symfony\Bundle\FrameworkBundle\FrameworkBundle in /Users/gonzalo/.spf13-vim-3/.vim/bundle/phpcomplete- extended-symfony/bin/symfony.php line 268' in /Users/gonzalo/.spf13-vim-3/.vim/bundle/phpcomplete-extended-symfony/bin/symfony.php on line 268

ErrorException: Notice: Undefined index: Symfony\Bundle\FrameworkBundle\FrameworkBundle in /Users/gonzalo/.spf13-vim-3/.vim/bundle/phpcomplete-extended-symfony/bin/symfony.php line 268 in /U sers/gonzalo/.spf13-vim-3/.vim/bundle/phpcomplete-extended-symfony/bin/symfony.php on line 268

Call Stack: 0.0059 543520 1. {main}() /Users/gonzalo/.spf13-vim-3/.vim/bundle/phpcomplete-extended/bin/IndexGenerator.php:0 0.0216 1272448 2. IndexGenerator->generateIndex() /Users/gonzalo/.spf13-vim-3/.vim/bundle/phpcomplete-extended/bin/IndexGenerator.php:50 2.3572 69255304 3. IndexGenerator->execHook() /Users/gonzalo/.spf13-vim-3/.vim/bundle/phpcoPHP Fatal error: Uncaught exception 'ErrorException' with message 'Notice: Undefined index : Symfony\Bundle\FrameworkBundle\FrameworkBundle in /Users/gonzalo/.spf13-vim-3/.vim/bundle/phpcomplete-extended-symfony/bin/symfony.php line 268' in /Users/gonzalo/.spf13-vim-3/.vim/bundle/ phpcomplete-extended-symfony/bin/symfony.php:268 Stack trace:

0 /Users/gonzalo/.spf13-vim-3/.vim/bundle/phpcomplete-extended-symfony/bin/symfony.php(268): Symfony\Component\HttpKernel\Debug\ErrorHandler->handle(8, 'Undefined index...', '/Users/gonzalo

/...', 268, Array)

1 /Users/gonzalo/.spf13-vim-3/.vim/bundle/phpcomplete-extended-symfony/bin/symfony.php(219): symfony->processBundles(Array)

2 /Users/gonzalo/.spf13-vim-3/.vim/bundle/phpcomplete-extended-symfony/bin/symfony.php(161): symfony->process(Array)

3 [internal function]: symfony->postCreateIndex(Array, Object(IndexGenerator))

4 /Users/gonzalo/.spf13-vim-3/.vim/bundle/phpcomplete-extended/bin/IndexGenerator.php(225): call_user_func_array(Array, Arramplete-extended/bin/IndexGenerator.php:468

2.3572   69257720   4. call_user_func_array() /Users/gonzalo/.spf13-vim-3/.vim/bundle/phpcomplete-extended/bin/IndexGenerator.php:225
2.3572   69258152   5. symfony->postCreateIndex() /Users/gonzalo/.spf13-vim-3/.vim/bundle/phpcomplete-extended/bin/IndexGenerator.php:225
2.3572   69258184   6. symfony->process() /Users/gonzalo/.spf13-vim-3/.vim/bundle/phpcomplete-extended-symfony/bin/symfony.php:161
8.3857   96609688   7. symfony->processBundles() /Users/gonzalo/.spf13-vim-3/.vim/bundle/phpcomplete-extended-symfony/bin/symfony.php:219
8.3857   96617440   8. Symfony\Component\HttpKernel\Debug\ErrorHandler->handle() /Users/gonzalo/.spf13-vim-3/.vim/bundle/phpcomplete-extended-symfony/bin/symfony.php:268

y)

5 /Users/gonzalo/.spf13-vim-3/.vim/bun in /Users/gonzalo/.spf13-vim-3/.vim/bundle/phpcomplete-extended-symfony/bin/symfony.php on line 268

m2mdas commented 11 years ago

Hmm, the problem seems to be in phpcomplete-extended-symfony plugin. I have updated the plugin. Please update the plugin and run :PHPCompleteExtendedGenerateIndex again.

gonzaloserrano commented 11 years ago

Looks like it's fixed, at least there are no error messages.

Now i have to figure out how to make it work with spf13 & supertab plugins because now it does not work, but this is another story ;)

ps. i put this in my .vimrc:

autocmd FileType php setlocal omnifunc=phpcomplete_extended#CompletePHP let g:phpcomplete_index_composer_command="composer.phar"

Thanks