Closed santigarcor closed 6 years ago
I've just tested on vscode v1.19.2 it's working here what is the version of the extension?
I have the 0.9.8. I think the problem happens when there are a lot of namespaces or files.
can you please confirm this by testing on a small project?
I tested it in a smaller project and it worked fine
i just tested on a large symfony app which has 150+ package. it's working here :confused:
It's weird, because for some reason in the debug console it shows this warning/error rejected promise not handled within 1 second.
I'll do more tests in the project that is being problematic and i'll let you know
The problem is that an exception is being thrown in this line inside the parseNamespaces method:
if (textLine.startsWith('namespace ') || textLine.startsWith('<?php namespace ')) { // Here you allow the namespace in the same line as the php tag.
let fqcn = `${textLine.match(/^namespace\s+(.+)?;/).pop()}\\${resolving}`; // But here the regex doesn't include that.
The problem is the regex, because when the namespace is not in a single line it doesn't match with the regex. I'll submit a PR to fix it.
thanks for the PR :relieved:
First I want to thank you for this extension it's awesome, but recently it stopped working. When I run the import class or expand class command nothing happens as you can see here:
Update: I debugged the extension and the problem seems to be in this line:
after stopping the execution there, the debug console shows
rejected promise not handled within 1 second
.