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

Errors in Laravel project #15

Closed markwu closed 10 years ago

markwu commented 11 years ago

hi m2mdas:

I try phpcomplete-extended with laravel project, and it shows me the following errors:

{"error":{"type":"PDOException","message":"SQLSTATE[28000] [1045] Access denied for user 'root'@'localhost' (using password: NO)","file":"\/home\/www\/sites\/caravel.tw\/vendor\/laravel\/framework\/src\/Illuminate\/Database\/Connectors\/Connector.php","line":47}}
Loading Index
處理 function phpcomplete_extended#readDataForProject..phpcomplete_extended#loadProject..<SNR>228_loadIndex..<SNR>228_readIndex 時發生錯誤:
行    2:
E605: 未攔截的例外: file /home/www/sites/caravel.tw/.phpcomplete_extended/phpcomplete_index
處理 function phpcomplete_extended#readDataForProject..phpcomplete_extended#loadProject..<SNR>228_loadIndex 時發生錯誤:
行   43:
E171: 缺少 :endif
處理 function phpcomplete_extended#readDataForProject 時發生錯誤:
行    4:
E171: 缺少 :endif
Press ENTER or type command to continue

I also follow steps from this issue #13 , the result of :PHPCompleteExtendedGenerateIndex is:

Generating index...
 {"error":{"type":"PDOException","message":"SQLSTATE[28000] [1045] Access denied for user 'root'@'localhost' (using password: NO)","file":"\/home\/www\/sites\/caravel.tw\/vendor\/laravel\/framework\/src\/Illuminate\/Database\/Connectors\/Connector.php","line":47}}
Press ENTER or type command to continue

BTW, I download Laravel project through the following command composer create-project laravel/laravel your-project-name --prefer-dist


And, My vim has the following three plugins:

NeoBundle 'm2mdas/phpcomplete-extended' NeoBundle 'm2mdas/phpcomplete-extended-laravel' NeoBundle 'm2mdas/phpcomplete-extended-symfony'

Any ideas?

m2mdas commented 11 years ago

You have to give database configuration in app/config/database.php. This error occurs when the laravel indexer script tries to create DB facade which needs the configuration.

markwu commented 10 years ago

I think this can closed. Sorry for late reply.