Comments (12)
Hello
Could you follow the steps listed here [1]? It will allow you to see what exactly is going wrong or is being output. The package is failing because the PHP side is outputting some expected (and not just the output JSON); judging from the 'W' in the console, I'd guess it's a warning of some kind.
[1] #41 (comment)
from php-ide-serenata.
So I get warning messages like this:
...
- WARNING: Could not find a record for the interface Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface of FQSEN Symfony\Component\HttpKernel\DependencyInjection\AddClassesToCachePass
- Indexing /Users/eric/Dev/Web/acl-demo/vendor/symfony/http-kernel/DependencyInjection/Extension.php
- WARNING: Could not find a record for parent FQSEN Symfony\Component\DependencyInjection\Extension\Extension of FQSEN Symfony\Component\HttpKernel\DependencyInjection\Extension
- Indexing /Users/eric/Dev/Web/acl-demo/vendor/symfony/http-kernel/DependencyInjection/ConfigurableExtension.php
- Indexing /Users/eric/Dev/Web/acl-demo/vendor/symfony/http-kernel/TerminableInterface.php
- Indexing /Users/eric/Dev/Web/acl-demo/vendor/symfony/http-kernel/HttpKernel.php
- Indexing /Users/eric/Dev/Web/acl-demo/vendor/symfony/http-kernel/DependencyInjection/ContainerAwareHttpKernel.php
- Indexing /Users/eric/Dev/Web/acl-demo/vendor/symfony/http-kernel/DependencyInjection/FragmentRendererPass.php
- WARNING: Could not find a record for the interface Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface of FQSEN Symfony\Component\HttpKernel\DependencyInjection\FragmentRendererPass
- Indexing /Users/eric/Dev/Web/acl-demo/vendor/symfony/http-kernel/Fragment/FragmentHandler.php
- Indexing /Users/eric/Dev/Web/acl-demo/vendor/symfony/http-kernel/DependencyInjection/LazyLoadingFragmentHandler.php
- Indexing /Users/eric/Dev/Web/acl-demo/vendor/symfony/http-kernel/DependencyInjection/MergeExtensionConfigurationPass.php
- WARNING: Could not find a record for parent FQSEN Symfony\Component\DependencyInjection\Compiler\MergeExtensionConfigurationPass of FQSEN Symfony\Component\HttpKernel\DependencyInjection\MergeExtensionConfigurationPass
...
from the indexing output. They're all the same structure of message, they just vary based on which class or interface it complains about.
I should have also said that the errors are happening when attempting to type code. The autocompletion doesn't appear as expected as a result.
from php-ide-serenata.
Are there any warnings shown when you omit the --show-output
parameter (don't forget to remove the database first or use another one or it will skip indexing because the files were not modified)?
from php-ide-serenata.
Nope, not warnings are printed without the --show-output
flag.
┌─( ~/.a/p/php-integrator-base )──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────( @Nitrogen )─┐
└─❱❱❱ php php/src/Main.php TestDatabase.sqlite --reindex /Users/eric/Dev/Web/acl-demo +438 11:58 ❰─┘
{"success":true,"result":null}%
from php-ide-serenata.
Ok, are you inside a class when this error occurs? And does the error occur when typing class members after $this
, self
, parent
or static
or even when trying to type global function names or constants?
In case of the latter; the autocompletion providers are using promises, what you can also try is going into the Main.coffee file of php-integrator-autocomplete-plus and try commenting out the providers being added one by one to see which one is the culprit (or perhaps it can also be deduced from the Promise rejection instead, which may be easier).
And also: nice (Fish?) shell theme.
from php-ide-serenata.
It's happened both inside and outside of a class. Outside of a class, I was inside a function calling trying to type out a closure. Inside the class, I was simply trying to call a global function.
I'll try some more troubleshooting on it later today.
from php-ide-serenata.
Okay, I've done some troubleshooting. It turns out it's with the FunctionProvider
that causes the error.
For reference, I'm working with a Laravel codebase. For example, writing the following:
Route::get('example', function() {
return 'test';
});
causes the error on the second parameter which is a closure. This also happens whenever autocompletion attempts to complete a function.
Also, thanks for the compliment about the shell theme. I use Zsh and Prezto with the Garrett theme.
from php-ide-serenata.
Alright, thanks for helping me track this down. Since it's the function provider that is generating the error and it only uses one method that uses a promise (@service.getGlobalFunctions
), the PHP side for fetching the global functions must be returning some malformed data.
Could you run the following command (after the TestDatabase.sqlite is already present and the --index command you previously ran finished)?
php php/src/Main.php TestDatabase.sqlite --functions
Let me know if any warnings or errors show up. It should output a big JSON string and nothing else.
from php-ide-serenata.
I get a bunch of warnings:
Warning: Invalid argument supplied for foreach() in /Users/eric/.atom/packages/php-integrator-base/php/src/IndexDataAdapter.php on line 473
PHP Warning: Invalid argument supplied for foreach() in /Users/eric/.atom/packages/php-integrator-base/php/src/IndexDataAdapter.php on line 473
I don't know how many times this warning is repeated, but there are quite a few instances of it. It still returns JSON, but it prints out tons of warnings.
from php-ide-serenata.
Ok, I think I figured out what the problem is. I've released 0.4.7, could you give it a try to see if this fixes things? It should automatically reindex your entire project as I've bumped the database version, but in case it doesn't, you can always remove the databases in the indexes
subfolder of the package.
from php-ide-serenata.
That seemed to fix the problem. Thanks so much for your help!
from php-ide-serenata.
No problem, thanks for taking the time to track this down with me.
from php-ide-serenata.
Related Issues (20)
- Not working with atom 1.42 HOT 3
- Indexing hangs endlessly HOT 6
- Entity of type 'Serenata\Indexing\Structures\File' for IDs id (5e432cbfbc39f0.02567169) was not found HOT 4
- Suggestion: Add option to disable php-ide-serenata.general.projectOpenCount HOT 2
- Autocomplete does not automatically show suggestions due to prefix override workaround HOT 22
- serenata php process not killed if xdebug is enabled HOT 3
- Indexing files are stored in /tmp instead of storage path HOT 3
- GLOBALS variables autocompletion problem HOT 1
- package spawning the process HOT 2
- Outline not working HOT 1
- How to import namespaces? HOT 5
- How to go to definition with ctrl + left mouse click? HOT 7
- Neither classname nor php built-in function hint in atom? and class member hint is also abnormal.
- Not well imported class name not hinted by integrated lint
- Hyperclicking appends the path to the file twice HOT 1
- serenata not work at my end HOT 3
- Looking for a new maintainer HOT 1
- Signature help is not shown until writing a comma in a string
- Atom is dead, long live Atom HOT 2
- Installation blocked due to undefined variable in ServerManager HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from php-ide-serenata.