m2mdas / phpcomplete-extended-laravel Goto Github PK
View Code? Open in Web Editor NEWAn extension of phpcomplete-extended autocomplete plugin for laravel projects
License: MIT License
An extension of phpcomplete-extended autocomplete plugin for laravel projects
License: MIT License
The Service Provider class got a new method so the wrappers in bin/ have to be reviewed. (The new function is when())
My last issue. I swear :)
Hey,
I get an error whilst generating my indexes
Generating index...
PHP Fatal error: Cannot use Exception as Exception because the name is already in use in /Users/sam/www/src/vendor/mockery/mockery/library/Mockery/Instant
iator.php on line 23
Fatal error: Cannot use Exception as Exception because the name is already in use in /Users/sam/www/src/vendor/mockery/mockery/library/Mockery/Instantiator
.php on line 23 ```
I've installed vimproc using NeoBundle and verified that the vimproc_linux64.so file exists with 775 permissions. Vim runs without errors unless phpcomplete is tripped. It asks if I want to create an index file, then when I select "yes" Vim throws these errors:
vimproc's DLL: "/home/zero/.vim/bundle/vimproc/autoload/vimproc_linux64.so" is not found. Please read :help vimproc and make it.
Error detected while processing /home/zero/.vim/bundle/phpcomplete-extended/plugin/phpcomplete_extended.vim:
line 32:
Vimproc is a requirement for phpcomplete-extended plugin
Error detected while processing function phpcomplete_extended#readDataForProject..phpcomplete_extended#loadProject..101_loadIndex..phpcomplete_extended#generateIndex:
line 2:
The composer command "php composer.phar" is not a valid Composer command. Please set g:phpcomplete_index_composer_command in your .vimrc file
Error detected while processing function phpcomplete_extended#readDataForProject..phpcomplete_extended#loadProject..101_loadIndex..101_readIndex:
line 2:
Could not read index file .phpcomplete_extended/phpcomplete_index
I've also tried compiling vimproc using make, and it didn't help my issue.
I'm running ubuntu 12.04 and vim 7.03. I have this issue even when I clear my .vimrc of everything but the bundles required for phpcomplete.
Any help would be appreciated.
Hello,
if I call model's facade method without assigning mthod's result to variable, I get proper autocompletion results.
Example:
function a(){
Model::
}
viz:attached image
But in the case when I want to assign result from model's method to variable, I get objectionable autocompletion results, more exactly I get all results from index file.
Example:
function b(){
$var = Model::
}
Viz image 2.
Hello,
Firstly thanks for maintaining these projects, much appreciated!
I have a question, I hope you can help me:
When I try to tun vim and when it starts to index, it throws an error. The error is same with :PHPCompleteExtendedGenerateIndex
, which is like:
Generating autoload classmap
Generating index...
{"error":{"type":"ErrorException","message":"Array to string conversion","file":"\/myLaravelhome\/vendor\/cartalyst\/sentry\/src\/Cartalyst\/Sentr
y\/SentryServiceProvider.php","line":91}}
Here's the line that occurs: https://github.com/cartalyst/sentry/blob/master/src/Cartalyst/Sentry/SentryServiceProvider.php#L91
Both this plugin and phpcomplete-extended are installed.
Edit: using Ubuntu 14.04 and PHP 5.5.9 if that would help.
What could be the issue, is there any way to fix this?
Thanks,
Error (manually typed so excuse any typo's) :
{"error":{"type":"PDOException","message":"could not find driver","file":"\/media\/ol\/x\/iiif\/main\/vendor\/laravel\/framework\/src\/Illuminate\/Database\/Connectors\/Connector.php",line":47}}
First 58 lines of file:
<?php namespace Illuminate\Database\Connectors;
use PDO;
class Connector {
/**
* The default PDO connection options.
*
* @var array
*/
protected $options = array(
PDO::ATTR_CASE => PDO::CASE_NATURAL,
PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,
PDO::ATTR_ORACLE_NULLS => PDO::NULL_NATURAL,
PDO::ATTR_STRINGIFY_FETCHES => false,
PDO::ATTR_EMULATE_PREPARES => false,
);
/**
* Get the PDO options based on the configuration.
*
* @param array $config
* @return array
*/
public function getOptions(array $config)
{
$options = array_get($config, 'options', array());
return array_diff_key($this->options, $options) + $options;
}
/**
* Create a new PDO connection.
*
* @param string $dsn
* @param array $config
* @param array $options
* @return PDO
*/
public function createConnection($dsn, array $config, array $options)
{
$username = array_get($config, 'username');
$password = array_get($config, 'password');
return new PDO($dsn, $username, $password, $options); // <--- Line 47
}
/**
* Get the default PDO connection options.
*
* @return array
*/
public function getDefaultOptions()
{
return $this->options;
}
hi,
when i work on a plugin on workbench, the plugin is not being loaded. i'm getting always "Not a Valid Laravel project"
what i found.
on https://github.com/m2mdas/phpcomplete-extended/blob/master/autoload/phpcomplete_extended.vim#L1352 is that the function getcwd()
is returning the wrong path. and it's not the same as the one given when i type :pwd on vim
i should say, to set my current path relative to my project root, i use this:
func! s:etwd()
let cph = expand('%:p:h', 1)
if match(cph, '\v^<.+>://') >= 0 | retu | en
for mkr in ['.git/', '.hg/', '.vimprojects']
let wd = call('find'.(mkr =~ '/$' ? 'dir' : 'file'), [mkr, cph.';'])
if wd != '' | let &acd = 0 | brea | en
endfo
exe 'lc!' fnameescape(wd == '' ? cph : substitute(wd, mkr.'$', '.', ''))
endfunc
au BufEnter * cal s:etwd()
so actually would be nice to replace getcwd()
with a better method to get the current project root directory.
Hi ๐
I got this error when running :PHPCompleteExtendedGenerateIndex --verbose
Generating autoload classmap
Generating index...
PHP Fatal error: Class 'Illuminate\Routing\Router' not found in /Users/xx/xx/bigvim/bundle/phpcomplete-extended-laravel/bin/laravel.php on line 416
Fatal error: Class 'Illuminate\Routing\Router' not found in /Users/xx/xx/bigvim/bundle/phpcomplete-extended-laravel/bin/laravel.php on line 416
Press ENTER or type command to continue
Anything idea about this ?
Hello! I'm getting this error when trying to build index:
{"error":{"type":"PDOException","message":"SQLSTATE[HY000] [2002] Can't connect to local MySQL server through socket '/var/run/mysqld/my
sqld.sock' (2)","file":"/home/rpeshkov/Vagrant/laratest/laratest-src/vendor/laravel/framework/src/Illuminate/Database/Connectors
Loading Index
Error detected while processing function phpcomplete_extended#readDataForProject..phpcomplete_extended#loadProject..53_loadIndex..
53_readIndex:
line 2:
Could not read index file .phpcomplete_extended/phpcomplete_index
Laravel app and MySQL server is running on virtual machine while Vim is running locally. Source files are shared between local and virtual machine by NFS. Is there any workaround for phpcomplete-extended-laravel attempts to connect to SQL server?
Hi, I get the following when indexing a laravel 4.1 project:
Declaration of RouterWrapper::resource() should be compatible with Illuminate\Routing\Router::resource(โฆ)
Is it possible to suppress PHP_ERRORS and/or strict warnings while indexing?
I have a Laravel project with the structure below. If I open server.php, the plugin detects the composer.json file and generates the index correctly. However, if I open BaseController.php the plugin does not correctly detect that BaseController.php is part of a Laravel project and does not provide code completion.
-{app}
-server.php
-composer.json
-src
-controllers
-BaseController.php
I am creating an index on a rather large Laravel project. I am getting the error below:
The lines of code in question are:
// Set the EAV facade.
$this->app['eav'] = $this->app->share(
function ($app) {
$manager_class = (string)$app['config']['eav::attribute_manager'];
//Error occurs on next line, line 78
$eav = new $manager_class($app['config']['eav::config.cache'], $app['config']['eav::config.cache_entry']);
$eav->setEavModels($app['config']['eav::config.eav_models']);
$eav->setDataTypes($app['config']['eav::config.data_types']);
$eav->setRelatableModels($app['config']['eav::relatable_models']);
return $eav;
}
);
Call Stack:
0.0017 567280 1. {main}() /Users/lmauldin/.vim/bundle/phpcomplete-extended/bin/IndexGenerator.php:0
0.0096 1678192 2. IndexGenerator->addPlugin() /Users/lmauldin/.vim/bundle/phpcomplete-extended/bin/IndexGenerator.php:54
0.0101 1779648 3. include('/Users/lmauldin/.vim/bundle/phpcomplete-extended-laravel/bin/laravel.php') /Users/lmauldin/.vim/bundle/phpcomplete-extended/bin/IndexGenerator.php:247
PHP Fatal error: Class 'Array' not found in /Users/lmauldin/dev/pe/apps/ngt/vendor/evolution/eav/src/Evolution/Eav/EavServiceProvider.php on line 78
PHP Stack trace:
PHP 1. {main}() /Users/lmauldin/.vim/bundle/phpcomplete-extended/bin/IndexGenerator.php:0
PHP 2. IndexGenerator->generateIndex() /Users/lmauldin/.vim/bundle/phpcomplete-extended/bin/IndexGenerator.php:57
PHP 3. IndexGenerator->execHook() /Users/lmauldin/.vim/bundle/phpcomplete-extended/bin/IndexGenerator.php:527
PHP 4. call_user_func_array() /Users/lmauldin/.vim/bundle/phpcomplete-extended/bin/IndexGenerator.php:277
PHP 5. laravel->postCreateIndex() /Users/lmauldin/.vim/bundle/phpcomplete-extended/bin/IndexGenerator.php:277
PHP 6. laravel->processIndex() /Users/lmauldin/.vim/bundle/phpcomplete-extended-laravel/bin/laravel.php:209
PHP 7. laravel->processIoc() /Users/lmauldin/.vim/bundle/phpcomplete-extended-laravel/bin/laravel.php:266
PHP 8. Illuminate\Foundation\Application->make() /Users/lmauldin/.vim/bundle/phpcomplete-extended-laravel/bin/laravel.php:287
PHP 9. Illuminate\Container\Container->make() /Users/lmauldin/dev/pe/apps/ngt/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:423
PHP 10. Illuminate\Container\Container->build() /Users/lmauldin/dev/pe/apps/ngt/workbench/evolution/tasking/vendor/illuminate/container/Illuminate/Container/Container.php:416
PHP 11. Illuminate\Container\Container->Illuminate\Container{closure}() /Users/lmauldin/dev/pe/apps/ngt/workbench/evolution/tasking/vendor/illuminate/container/Illuminate/Container/Container.php:473
PHP 12. Evolution\Eav\EavServiceProvider->Evolution\Eav{closure}() /Users/lmauldin/dev/pe/apps/ngt/workbench/evolution/tasking/vendor/illuminate/container/Illuminate/Container/Container.php:207
{"error":{"type":"Symfony\Component\Debug\Exception\FatalErrorException","message":"Class 'Array' not found","file":"/Users/lmauldin/dev/pe/apps/ngt/vendor/evolution/eav/src/Evolution/Eav/EavServiceProvider.php","line":78}}{"error":{"type":"Symfony\C
omponent\Debug\Exception\FatalErrorException","message":"Class 'Array' not found","file":"/Users/lmauldin/dev/pe/apps/ngt/vendor/evolution/eav/src/Evolution/Eav/EavServiceProvider.php","line":78}}
it would be nice to include the workbench for the autocompletion. what do you mean?
thanks. btw. nice work :)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.