-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Returns only completions being already used in this file #86
Comments
Have you run |
The latest stable release on packagist has some problem with index file generation, see #76 |
@danrot You can try out my develop branch
then either configure Also, the indexing file doesn't exclude test file, so may cause some exceptions during indexing process, such as After all this, I've achieved this screen shot: |
@pbogut Yeah, I ran $ padawan generate
[Symfony\Component\Debug\Exception\FatalThrowableError]
Call to a member function getIndex() on boolean
generate [<path>] Another question: Since #76 was already merged, shouldn't it be enough to test the |
@danrot Please try Yes, you can specify |
@halftan Did that, |
@danrot is there anything suspicious in |
Not really... That's all I see in the logs when trying to autocomplete the above values.
|
Although, when generating with
Is it possible that the index is corrupt because of that? |
@danrot very likely. May I have your Symfony version? I need to test the indexing functionality against the same code. |
@halftan Symfony version is 3.2.1, just did a |
Here's my output:
Clearly the index file would not be generated since the exception. Class git remote add halftan https://github.com/halftan/padawan.php.git
git fetch
git checkout master
git merge halftan/enhancement/exclude-test-files-from-indexing PS: I'm using PHP7.1. If you're still facing this problem try upgrading your PHP to a newer version ( > 7.0 ). I'll switch to PHP 5.6 and run this procedure again to see if it's a PHP version issue. |
Checked PHP version 5.6 and everything's all right. Besides, the indexing took about 2 times the time PHP 7.1 used. |
Updated to PHP 7.1, changed padawan to dev-master and pulled the changes from origin (since #87 has already been merged in the meantime). Still the same error as I got previously (Illegal offset type). I think I am going to debug that one later, and try to see what the illegal offset type is, that should probably help. |
can you see any line looks like
|
Yeah, got that line... |
Please run this under your project's root dir <?php
require 'Your/padawan.php/directory/vendor/autoload.php';
$data = file_get_contents('.padawan/project');
if (function_exists('igbinary_serialize')) {
$data = igbinary_unserialize($data);
} else {
$data = unserialize($data);
}
print_r(array_keys($data->getIndex()->getClasses()['Symfony\Bundle\FrameworkBundle\Controller\Controller']->methods->all())); see if the output is:
|
Yeah, I exactly have that output. And regarding Illegal offset warning, I var_dumped the
Any idea why that is? But since the output of your previous script is correct it's probably not related to that, right? |
@danrot Thanks a lot for your information, I'll keep you inform in this thread once it's been resolved. |
Back to completion candidate's issue. Since @danrot 's index file is all right, I could only suspect that something's wrong in please apply this patch on the dev-master branch, and start |
I don't know what the wrong behavior was caused by, but it is gone now 😕 But it only works with the latest master branch, otherwise I get the same error as you now (Parent class and child class could not be same). So I'll keep it like that for now. Any ideas when the next release is coming with these fixes? |
Maybe after the features (PR no. greater than 79) are merged. I'm testing these features now. I'll remove the WIP label once I think it's stable enough, then it depends on the project owner to accept it or not. |
I am testing using deoplete-padawan with neovim, but I think the problem I am encountering is a general one (although I am not really sure).
Have a look at this screenshot:
This is the Symfony controller of the standard edition. The
Controller
class it inherits from has plenty of method defined, but I get only the ones either defined or already used in this class.As already said I am using deoplete-padawan with the latest stable release:
The text was updated successfully, but these errors were encountered: