Skip to content
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

PHP CodeIntel Updates #3770

Merged
merged 6 commits into from
Nov 26, 2019
Merged

PHP CodeIntel Updates #3770

merged 6 commits into from
Nov 26, 2019

Conversation

ssigwart
Copy link
Contributor

@ssigwart ssigwart commented Jul 6, 2019

  • Use FQN for PHP types
  • Skip outdated trg-from-pos requests.
    • For large files, trg-from-pos requests can back up as you type. I can't think of any reason why we'd need to process a request if we got a newer request for a new position.
  • PSR4 updates
    • Allow filenames like MyClass.class.php
    • When doing PSR4 lookup, only concider paths that match namespace
    • Do not look at global scope with doing PSR4 lookups
  • Use scandir for PHP import lookup.

@ssigwart
Copy link
Contributor Author

ssigwart commented Jul 6, 2019

It's probably best to look with whitespace ignored:
https://github.com/Komodo/KomodoEdit/pull/3770/files?w=1

@ssigwart
Copy link
Contributor Author

I've been using this patch for the mast month and a half. It seems to work well. I also just adding another commit to fix a PSR4 bug:
bed4d63?w=1

I think the bug was there before this change too, but I'm not positive. If a PSR4 lookup was attempted, but failed, it would throw an error causing the whole lookup to fail. I was seeing this when doing something like this:

$arr = functionThatReturnsAnArrayContainingAClassInANamespace();
foreach ($arr as $row)
	$row-> // Lookup fails here

@ssigwart ssigwart mentioned this pull request Oct 26, 2019
@ssigwart
Copy link
Contributor Author

@th3coop, do you think this can be included before the next production release? I've been running it locally the past 4 months (by manually patching files in the nightly). While I can't guarantee that it has no bad side effects, it seems to have been working well.

@th3coop
Copy link
Member

th3coop commented Nov 25, 2019

@ssigwart, looks like there's a conflict with master. Can you merge master into this branch and push it? I'll have a look at the PR.

@th3coop
Copy link
Member

th3coop commented Nov 25, 2019

@ssigwart Are there other PRs I've lagged on that you'd like to see in the next release?

ssigwart and others added 6 commits November 25, 2019 20:15
- For large files, trg-from-pos requests can back up as you type. I can't think of any reason why we'd need to process a request if we got a newer request for a new position.
- Allow filenames like MyClass.class.php
- When doing PSR4 lookup, only concider paths that match namespace
- Do not look at global scope with doing PSR4 lookups
@ssigwart
Copy link
Contributor Author

I rebased this branch with master.

Are there other PRs I've lagged on that you'd like to see in the next release?

I do have some others. Here they are in what I think are most to least important:

Very Low Priority

@th3coop th3coop merged commit 4266ad5 into Komodo:master Nov 26, 2019
@th3coop
Copy link
Member

th3coop commented Nov 26, 2019

@ssigwart thanks for the list!

@ssigwart ssigwart deleted the phpCodeintel branch November 26, 2019 03:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants