Gert-dev / php-ide-serenata

Atom IDE package that integrates the Serenata server to provide PHP code assistance
https://serenata.gitlab.io/
Other
275 stars 22 forks source link

Neither classname nor php built-in function hint in atom? and class member hint is also abnormal. #512

Closed yanggs07 closed 3 years ago

yanggs07 commented 3 years ago

Atom: 1.53.0 x64 php-ide-serenata version: 5.4.0 mac:10.15.7

class name hint fail

Suppose we have a Class Foo;

<?php
Class Foo {

}

in another File:

when type "F" does not appear the hint of classes start with "F" such as Foo;

but when type Foo:: would appear hint of static function, static var and consts.

const hint fail

Foo::VAR_ would not hint Foo::VAR_BAR

built-in function hint fail

in_ would not hint in_array

opt+click built-in function would not get the docs of that

and this error in console occurs:

linter-registry.js:147 [Linter] Error running PHP Error: Failed to spawn command `php`. Make sure `php` is installed and on your PATH
    at /Users/yangguoshuai/.atom/packages/linter-php/node_modules/atom-linter/lib/helpers.js:130
    at processTicksAndRejections (internal/process/task_queues.js:89)
(anonymous) @ linter-registry.js:147
processTicksAndRejections @ internal/process/task_queues.js:89
Promise.then (async)
lint @ linter-registry.js:121
(anonymous) @ main.js:120
simpleDispatch @ <embedded>:11
emit @ <embedded>:11
lint @ editor-linter.js:61
createFromTextEditor @ editor-registry.js:57
(anonymous) @ editor-registry.js:41
(anonymous) @ <embedded>:11
simpleDispatch @ <embedded>:11
emit @ <embedded>:11
(anonymous) @ <embedded>:11
simpleDispatch @ <embedded>:11
emit @ <embedded>:11
didAddPaneItem @ <embedded>:11
addItem @ <embedded>:11
activateItem @ <embedded>:11
open @ <embedded>:11
async function (async)
open @ <embedded>:11
goToLocation @ /Users/yangguoshuai/.atom/packages/atom-ide-ui/modules/nuclide-commons-atom/go-to-location.js:102
(anonymous) @ /Users/yangguoshuai/.atom/packages/atom-ide-ui/modules/atom-ide-ui/pkg/atom-ide-definitions/lib/main.js:215
_confirmSuggestion @ /Users/yangguoshuai/.atom/packages/atom-ide-ui/modules/atom-ide-ui/pkg/hyperclick/lib/HyperclickForTextEditor.js:183
_onMouseDown @ /Users/yangguoshuai/.atom/packages/atom-ide-ui/modules/atom-ide-ui/pkg/hyperclick/lib/HyperclickForTextEditor.js:247
<embedded>:11 Uncaught (in promise) Error: ENOENT: no such file or directory, stat 'phar:/Users/yangguoshuai/Library/Preferences/php-ide-serenata/distribution.phar/builds/Serenata/Serenata/vendor/jetbrains/phpstorm-stubs/standard/standard_9.php'

but i really set php path in the config of serenata

/usr/local/bin/php

yangguoshuai@C02Z56G4LVCF  ~  /usr/local/bin/php -v PHP 7.4.11 (cli) (built: Oct 1 2020 23:30:54) ( NTS ) Copyright (c) The PHP Group Zend Engine v3.4.0, Copyright (c) Zend Technologies with Zend OPcache v7.4.11, Copyright (c), by Zend Technologies yangguoshuai@C02Z56G4LVCF  ~  php ^C ✘ yangguoshuai@C02Z56G4LVCF  ~  php -v PHP 7.4.11 (cli) (built: Oct 1 2020 23:30:54) ( NTS ) Copyright (c) The PHP Group Zend Engine v3.4.0, Copyright (c) Zend Technologies with Zend OPcache v7.4.11, Copyright (c), by Zend Technologies yangguoshuai@C02Z56G4LVCF  ~ 