Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,13 @@ Features:
- [worse-reflection] Support for evaluating `clone()`
- [worse-reflection] Support for registering custom virtual class member
providers.
- [vim-plugin] Find references shows context line #706

Improvements:

- [code-transform] Support extracting expressions to methods #666
- [code-transform] Extract method adds return statement to calling code if
extracted code contained a return #704

Bug fixes:

Expand Down
26 changes: 13 additions & 13 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 6 additions & 1 deletion plugin/phpactor.vim
Original file line number Diff line number Diff line change
Expand Up @@ -562,7 +562,12 @@ function! phpactor#_rpc_dispatch(actionName, parameters)

for fileReferences in a:parameters['file_references']
for reference in fileReferences['references']
call add(list, { 'filename': fileReferences['file'], 'lnum': reference['line_no'], 'col': reference['col_no'] + 1})
call add(list, {
\ 'filename': fileReferences['file'],
\ 'lnum': reference['line_no'],
\ 'col': reference['col_no'] + 1,
\ 'text': reference['line']
\ })
endfor
endfor

Expand Down
2 changes: 1 addition & 1 deletion plugin/tests/rpc_file_references.vader
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Execute (populates quickfix list):
call setqflist([])
call phpactor#_rpc_dispatch("file_references", {"file_references": [ {"file": "file1", "references": [ {"line_no": 10, "col_no": 1}]}]})
call phpactor#_rpc_dispatch("file_references", {"file_references": [ {"file": "file1", "references": [ {"line_no": 10, "line":"", "col_no": 1}]}]})
let list = getqflist()
AssertEqual 10, list[0]['lnum']
AssertEqual 2, list[0]['col']
3 changes: 3 additions & 0 deletions tests/Unit/Extension/ClassMover/Rpc/ReferencesHandlerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,7 @@ public function testClassReferences()
[
'start' => 10,
'end' => 20,
'line' => '',
'line_no' => 10,
'col_no' => 12,
]
Expand Down Expand Up @@ -231,6 +232,7 @@ public function testMemberReferences()
'start' => 10,
'line_no' => 10,
'end' => 20,
'line' => '',
'col_no' => 12,
],
],
Expand Down Expand Up @@ -261,6 +263,7 @@ public function testMemberReferences()
[
'start' => 10,
'end' => 20,
'line' => '',
'line_no' => 10,
'col_no' => 12,
]
Expand Down