You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For projects that use specific revisions for packages (e.g. if a bug fix has not made it to a tagged release yet), the PHP language server would reparse the package's files every time the server started, even if the package had not changed. This change introduces caching support for packages that are checked out from source, by using the revision as part of the cache key.
Regarding testing for this change, I'm still wrapping my head around the code. I think it can be accomplished by including a composer.json and composer.lock within fixtures to mock a faux install. I'm going to look into this further.
LGTM overall.
Testing with a fake composer.json and composer.lock sounds like a good approach. Ideally this would be a unit test for the Indexer that asserts a stubbed Cache is called
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #366
For projects that use specific revisions for packages (e.g. if a bug fix has not made it to a tagged release yet), the PHP language server would reparse the package's files every time the server started, even if the package had not changed. This change introduces caching support for packages that are checked out from source, by using the revision as part of the cache key.