Peekmo / atom-autocomplete-php

Autocomplete for PHP in atom editor
MIT License
136 stars 34 forks source link

Failed to get methods #233

Closed GijsGoudzwaard closed 8 years ago

GijsGoudzwaard commented 8 years ago

Whenever I save in a class I get the following error:

Failed to get methods for Namespace\Of\My\Class
Unexpected end of input
Peekmo commented 8 years ago

Hello,

That occurs when you have a problem with your class. E.G : when you implement an interface, but not all the methods (or the wrong way, like a missing "use"), or when there's a parsing error in the file.

You can turn off the alert by unchecking "Errors on file saving showed" in the plugin settings.

GijsGoudzwaard commented 8 years ago

That is not the case, everything is working fine when testing in the browser. I'm not missing any use statements and I am not using an interface.

slaughter550 commented 8 years ago

Im getting this error message with this simple syntax.

@Peekmo Failed to get methods for Library\Attachments\YouTube : Unexpected end of input php-proxy.coffee:51 SyntaxError: Unexpected end of input(…)

SyntaxError: Unexpected end of input
    at Object.parse (native)
    at Object.module.exports.execute (/Users/slaughter/.atom/packages/atom-autocomplete-php/lib/services/php-proxy.coffee:49:40)
    at Object.module.exports.methods (/Users/slaughter/.atom/packages/atom-autocomplete-php/lib/services/php-proxy.coffee:184:20)
    at Object.module.exports.getMemberContext (/Users/slaughter/.atom/packages/atom-autocomplete-php/lib/services/php-file-parser.coffee:672:25)
    at FunctionProvider.module.exports.FunctionProvider.extractAnnotationInfo (/Users/slaughter/.atom/packages/atom-autocomplete-php/lib/annotation/method-provider.coffee:17:27)
    at FunctionProvider.module.exports.AbstractProvider.placeAnnotation (/Users/slaughter/.atom/packages/atom-autocomplete-php/lib/annotation/abstract-provider.coffee:103:27)
    at FunctionProvider.<anonymous> (/Users/slaughter/.atom/packages/atom-autocomplete-php/lib/annotation/abstract-provider.coffee:92:18)
    at FunctionProvider.module.exports.AbstractProvider.registerAnnotations (/Users/slaughter/.atom/packages/atom-autocomplete-php/lib/annotation/abstract-provider.coffee:91:13)
    at FunctionProvider.module.exports.AbstractProvider.rescan (/Users/slaughter/.atom/packages/atom-autocomplete-php/lib/annotation/abstract-provider.coffee:236:10)
    at /Users/slaughter/.atom/packages/atom-autocomplete-php/lib/annotation/abstract-provider.coffee:24:18
    at Function.module.exports.Emitter.simpleDispatch (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/event-kit/lib/emitter.js:25:14)
    at Emitter.module.exports.Emitter.emit (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/event-kit/lib/emitter.js:125:28)
    at TextBuffer.module.exports.TextBuffer.saveAs (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/text-buffer/lib/text-buffer.js:1104:27)
    at TextBuffer.module.exports.TextBuffer.save (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/text-buffer/lib/text-buffer.js:1074:19)
    at TextEditor.module.exports.TextEditor.save (/Applications/Atom.app/Contents/Resources/app.asar/src/text-editor.js:660:26)
    at /Users/slaughter/.atom/packages/atom-beautify/src/beautify.coffee:523:20
    at tryCatcher (/Users/slaughter/.atom/packages/atom-beautify/node_modules/bluebird/js/release/util.js:16:23)
    at Promise._settlePromiseFromHandler (/Users/slaughter/.atom/packages/atom-beautify/node_modules/bluebird/js/release/promise.js:502:31)
    at Promise._settlePromise (/Users/slaughter/.atom/packages/atom-beautify/node_modules/bluebird/js/release/promise.js:559:18)
    at Promise._settlePromise0 (/Users/slaughter/.atom/packages/atom-beautify/node_modules/bluebird/js/release/promise.js:604:10)
    at Promise._settlePromises (/Users/slaughter/.atom/packages/atom-beautify/node_modules/bluebird/js/release/promise.js:683:18)
    at Async._drainQueue (/Users/slaughter/.atom/packages/atom-beautify/node_modules/bluebird/js/release/async.js:138:16)
    at Async._drainQueues (/Users/slaughter/.atom/packages/atom-beautify/node_modules/bluebird/js/release/async.js:148:10)
    at Async.drainQueues (/Users/slaughter/.atom/packages/atom-beautify/node_modules/bluebird/js/release/async.js:17:14)
<?php

namespace Library\Attachments;

class YouTube
{
    public function isPreviewable()
    {
        return true;
    }
}
shouze commented 8 years ago

Yes, me too

yue00er commented 8 years ago

Yes, me too! How to deal with it ?

sebdesign commented 7 years ago

Same problem here, I'm on Windows 10, Atom 1.15.0 with php 5.6.24.