Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
73 commits
Select commit Hold shift + click to select a range
2f7fade
Load config from config loader (#653)
dantleech Dec 1, 2018
318e3fa
Lazy handlers (#654)
dantleech Dec 1, 2018
93b74c6
optimise and generate class map on update
dantleech Dec 1, 2018
ccce189
updated composer
dantleech Dec 1, 2018
4b3db99
bumped worse-reflection-extension to 0.2.x
dantleech Dec 1, 2018
dafc795
657 [completion] do not suggest statics non statics (#659)
dantleech Dec 3, 2018
c3f4dd1
Updated PHP requirement in README
dantleech Dec 4, 2018
f322177
Typo fix (#661)
tomhv Dec 5, 2018
f5da234
Code transform extension (#664)
dantleech Dec 8, 2018
3e3a29f
updates composer
dantleech Dec 9, 2018
d5e4b26
fixes order of args for github api
dantleech Dec 9, 2018
8ace168
Revert "fixes order of args for github api"
dantleech Dec 9, 2018
0193fd9
fixes template path reolution (#671)
dantleech Dec 14, 2018
2df452d
Define application root path according to location of vendor folder (…
kermorgant Dec 14, 2018
df27a0c
Adds whatchanged (#667)
dantleech Dec 14, 2018
d351020
Log errors in application error handler (#676)
dantleech Dec 18, 2018
928af00
Reference finder extension (#679)
dantleech Dec 21, 2018
e7a54f5
[vim plugin] pass the filetype to goto definition RPC call
dantleech Dec 21, 2018
f359565
Updates composer lock with latest library fixes (#680)
dantleech Dec 22, 2018
a4c5b6e
support for variadic arguments (#681)
dantleech Dec 22, 2018
f92d284
support extracting expresions to methods (#683)
dantleech Dec 23, 2018
a09a816
support virtual methods (#684)
dantleech Dec 24, 2018
b737028
update worse reflection (#688)
dantleech Dec 27, 2018
ed934f7
member providers
dantleech Dec 27, 2018
cf7645f
class member provider support
dantleech Dec 27, 2018
8705859
class member provider support (#689)
dantleech Dec 27, 2018
811b859
Completion Text document Refactorings (#693)
dantleech Jan 1, 2019
7e8e6f7
Build dashboard (#700)
dantleech Jan 6, 2019
51cb77a
Extension install test (#701)
dantleech Jan 6, 2019
d54fbd1
fixes regression with generating method in cuurent file (#702)
dantleech Jan 6, 2019
16a2fb4
updates composer (#707)
dantleech Jan 13, 2019
660eb58
706 find member context and other stuff (#709)
dantleech Jan 13, 2019
1115980
update composer, fix #712 (#714)
dantleech Jan 17, 2019
a0bf4a5
dantleech/what-changed: 3 updated (#716)
dantleech Jan 19, 2019
74b867e
dantleech/what-changed: 8 updated (#724)
dantleech Jan 27, 2019
4cb772c
Update Slack invite link (#727)
dshoreman Jan 29, 2019
cfeebb0
Allow case insensitive search in vim autocompletion (#729)
rusheb Jan 31, 2019
d6cfc70
updated composer.lock (#734)
dantleech Feb 3, 2019
01e6f98
Update to include latest code-transform (#735)
dshoreman Feb 4, 2019
7e7fd60
Check if vim plugin is already loaded and exit early. (#739)
kristijanhusak Feb 19, 2019
74203b4
Add PHP open tag in template example (#741)
einenlum Feb 24, 2019
6cad4d9
Update drupal8.md (#744)
mdphoto Feb 26, 2019
97b8be8
Use stable dependencies (#745)
dantleech Mar 3, 2019
7db7a5c
updated composer (#749)
dantleech Mar 17, 2019
53cac5f
Support window targets on goto definition (#762)
dantleech May 18, 2019
e8f09c2
Merge master (#763)
dantleech May 18, 2019
18fd78e
GH-760: Fix class import for single element NS (#764)
dantleech May 19, 2019
b66a681
Bumped composer, fixes #766 (#767)
dantleech May 25, 2019
2a14f2a
Adds fzf support for list input (#769)
camilledejoye May 31, 2019
a98b285
List multi selection (#773)
camilledejoye Jun 9, 2019
ac32a53
GH-773: Updated changelog and documentation (#774)
dantleech Jun 10, 2019
9a37410
Bugfix 770 (#775)
camilledejoye Jun 12, 2019
6b1d22e
Update CHANGELOG.md
dantleech Jun 12, 2019
f3e2f48
Only try to import a class when `import_class` is not empty (#781)
camilledejoye Jun 16, 2019
a80985a
Generate static methods (#786)
dantleech Jun 20, 2019
8d737a3
Generate accessors (#787)
dantleech Jun 20, 2019
af657f8
Use declared classes when searching classes (#750)
dantleech Jul 3, 2019
9235cc5
Search for class import candidates using full name (#790)
dantleech Jul 4, 2019
906f9f9
Fix path behavior for class new command (#793)
dantleech Jul 7, 2019
28606a7
Maestro Configuration
dantleech Jul 11, 2019
65c305b
Fix broken link in refactorings.md (#797)
alypeng Jul 13, 2019
6002e71
Fix transform refactorings docs (#798)
guidocella Jul 13, 2019
af9b966
Feature: Move related files if confirmed (#800)
dantleech Jul 24, 2019
6c1b3bf
Fix order of open/close operations in class move handler (#801)
dantleech Jul 25, 2019
3a00d96
Updates composer. Add support for virtual properites (#802)
dantleech Jul 29, 2019
1a34234
Fixed transform for Fix Namespace or Class Name (#804)
elle-the-dev Aug 1, 2019
b3c6209
Temporary fix for "class mover" find references exception
dantleech Jul 30, 2019
d0b1d7e
Release/0.13.0 (#810)
dantleech Aug 25, 2019
7f0ee6a
Merge remote-tracking branch 'origin/develop' into release/0.13.1
dantleech Aug 25, 2019
25ba4be
use new generate accessor handler
dantleech Aug 25, 2019
b9659f9
Resolve merge conflict
dantleech Aug 25, 2019
fcea859
Fix testexts script
dantleech Aug 25, 2019
1621b98
Manage official extensions with maestro
dantleech Aug 25, 2019
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
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,7 @@

# docs
/.couscous

# php-cs-fixer
/.php_cs.cache
./.php_cs
5 changes: 5 additions & 0 deletions .php_cs.dist
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@
$finder = PhpCsFixer\Finder::create()
->in('lib')
->in('tests')
->exclude([
'Assets/Cache',
'Assets/Projects',
'Assets/Workspace',
])
;

return PhpCsFixer\Config::create()
Expand Down
6 changes: 3 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ script:
# (only if the secure key is present)
- if [ -n "${REPORTS_API_KEY}" ]; then vendor/bin/phpbench run --store; else vendor/bin/phpbench run; fi;
# Run the test suites for all the Phpactor packages
- .travis/testdeps
- .travis/testexts
- config/travis/testdeps
- config/travis/testexts

jobs:
include:
Expand All @@ -41,7 +41,7 @@ jobs:
- git clone https://github.com/junegunn/vader.vim.git
script:
# Run the VIM Plugin tests
- .travis/vim-plugin-test.sh
- config/travis/vim-plugin-test.sh
- php: 7.1
- php: 7.2
- stage: docs
Expand Down
1 change: 0 additions & 1 deletion .travis/vim-plugin-test.sh

This file was deleted.

36 changes: 36 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,42 @@
Changelog
=========

## 2019-08-25 0.13.0

Features:

- [vim-plugin] Add new `GotoDefinition[Vsplit|Hsplit|Tab]` functions.
- [code-builder] Initial support for nullable types - @einenlum
- [vim-plugin] FZF integration for list inputs (#769) - @elythyr
- [vim-plugin] FZF multiple selection (#773). @elythyr
- [vim-plugin] Maintain correct cursor position after certain text diffs (#770) - @elythyr
- [code-transform|rpc] Generate multiple accessors for a class - @elythyr
- [code-tranform] Generate static methods if the call was static (#25) - @einenlum
- [completion] Use declared classes as completion source
- [import-class] Import declared classes (as long as they can be statically
resolved).
- [rpc] Class import uses offset to determine type to import
- [class-mover] Possiblity to move related any files whose relations are
defined in `navigator.destinations` (for both command and rpc)
- [worse-reflection] Support virtual class properties (in addition to
methods).

Bug fixes:

- [completion] Signature helper does not work on interfaces (#752) - @taluu
- [code-builder] Class import doesn't work with single element namespace
#760
- [code-builder] Variant is not passed to class generator (#766)
- [phpactor|cli] response shows source code instead of path (#792)
- [class-mover|rpc] Fix order of open/close operations, prevent VIM crashing

BC Break:

- [rpc] Import class no longer requires name parameter. RPC version changed
to version 2.
- [code-transform] Generate accessors is now a class action and allows
generation of multiple accessors.

## 2019-03-03 0.12.0

BC Break:
Expand Down
75 changes: 75 additions & 0 deletions autoload/phpactor/input.vim
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
function! phpactor#input#text(label, default, completionType, ResultHandler)
if v:null != a:completionType
let text = input(a:label, a:default, a:completionType)
else
let text = input(a:label, a:default)
endif

call a:ResultHandler(text)
endfunction

function! phpactor#input#confirm(label, ResultHandler)
let choice = confirm(a:label, "&Yes\n&No\n")

if choice == 1
let response = v:true
else
let response = v:false
endif

call a:ResultHandler(response)
endfunction

function! phpactor#input#choice(label, choices, ResultHandler)
let list = []
let choices = []
let usedShortcuts = []

if empty(a:choices)
call confirm("No choices available")
throw "cancelled"
endif

for choiceLabel in keys(a:choices)
let buffer = []
let foundShortcut = v:false

for char in split(choiceLabel, '\zs')
if v:false == foundShortcut && -1 == index(usedShortcuts, tolower(char))
call add(buffer, '&')
let foundShortcut = v:true
call add(usedShortcuts, tolower(char))
endif

call add(buffer, char)
endfor

let confirmLabel = join(buffer, "")

call add(list, confirmLabel)
call add(choices, choiceLabel)
endfor

let choice = confirm(a:label, join(list, "\n"))

if (choice == 0)
" this is an exception, not a message!
throw "cancelled"
endif

call a:ResultHandler(choices[choice - 1])
endfunction

function! phpactor#input#list(label, choices, multi, ResultHandler)
let choices = sort(keys(a:choices))

try
let strategy = phpactor#input#list#strategy()
call call(strategy, [a:label, choices, a:multi, a:ResultHandler])
catch /E117/
redraw!
echo 'The strategy "'. strategy .'" is unknown, check the value of "g:phpactorInputListStrategy".'
endtry
endfunction

" vim: et ts=4 sw=4 fdm=marker
71 changes: 71 additions & 0 deletions autoload/phpactor/input/list.vim
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
function! phpactor#input#list#strategy()
if has_key(g:, 'phpactorInputListStrategy')
return g:phpactorInputListStrategy
endif

if has_key(g:, 'phpactorCustomInputListStrategy')
let g:phpactorInputListStrategy = g:phpactorCustomInputListStrategy
else
let g:phpactorInputListStrategy = s:auto_detect_strategy()
endif

return g:phpactorInputListStrategy
endfunction

function! phpactor#input#list#inputlist(label, choices, multi, ResultHandler)
echo a:label
let choice = inputlist(s:add_number_to_choices(a:choices))

if (choice == 0)
throw "cancelled"
endif

call a:ResultHandler(a:choices[choice - 1])
endfunction

function! phpactor#input#list#fzf(label, choices, multi, ResultHandler)
let options = [
\ '--tiebreak=index',
\ '--layout=reverse-list',
\ ]
let sink = {
\ 'sink': {key -> a:ResultHandler(a:choices[key - 1])},
\ }

if a:multi
call extend(options, [
\ '--multi',
\ '--bind=ctrl-a:select-all,ctrl-d:deselect-all',
\ ])

let sink = {
\ 'sink*': {results -> a:ResultHandler(map(
\ results,
\ {key, value -> a:choices[value - 1]}
\ ))}
\ }
endif

" sink works because "key" is converted to integer, so only the number is kept
call fzf#run(extend({
\ 'source': s:add_number_to_choices(a:choices),
\ 'down': '30%',
\ 'options': options
\ }, sink))
endfunction

function! s:auto_detect_strategy()
let strategy = 'inputlist'

if get(g:, 'loaded_fzf', 0)
let strategy = 'fzf'
endif

return 'phpactor#input#list#'. strategy
endfunction

function! s:add_number_to_choices(choices)
return map(copy(a:choices), {key, value -> key + 1 .') '. value})
endfunction

" vim: et ts=4 sw=4 fdm=marker
36 changes: 22 additions & 14 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,26 +8,34 @@
"ocramius/package-versions": "^1.2",
"php": "^7.1",
"phpactor/class-mover": "~0.1",
"phpactor/class-to-file": "~0.3",
"phpactor/class-to-file-extension": "~0.2",
"phpactor/code-transform": "~0.1",
"phpactor/completion": "~0.2",
"phpactor/code-builder": "~0.3",
"phpactor/code-transform": "~0.2",
"phpactor/code-transform-extension": "~0.1",
"phpactor/completion": "~0.3",
"phpactor/completion-extension": "~0.2",
"phpactor/completion-rpc-extension": "~0.2",
"phpactor/completion-worse-extension": "~0.1.1",
"phpactor/composer-autoloader-extension": "~0.1",
"phpactor/completion-worse-extension": "~0.1",
"phpactor/composer-autoloader-extension": "~0.2",
"phpactor/config-loader": "~0.1",
"phpactor/console-extension": "~0.1",
"phpactor/container": "^1.0",
"phpactor/extension-manager-extension": "~0.1",
"phpactor/file-path-resolver-extension": "~0.1",
"phpactor/container": "~1.3",
"phpactor/docblock": "~0.3",
"phpactor/extension-manager-extension": "~0.8",
"phpactor/file-path-resolver-extension": "~0.3",
"phpactor/logging-extension": "~0.2",
"phpactor/path-finder": "dev-master",
"phpactor/rpc-extension": "~0.1",
"phpactor/path-finder": "~0.1",
"phpactor/reference-finder-rpc-extension": "~0.1",
"phpactor/rpc-extension": "~0.2",
"phpactor/source-code-filesystem": "~0.1",
"phpactor/source-code-filesystem-extension": "~0.1.2",
"phpactor/worse-reflection": "~0.1",
"phpactor/worse-reflection-extension": "~0.1",
"phpactor/source-code-filesystem-extension": "~0.1",
"phpactor/text-document": "~1.1",
"phpactor/worse-reference-finder-extension": "~0.1",
"phpactor/worse-reflection": "~0.3",
"phpactor/worse-reflection-extension": "~0.2",
"phpbench/container": "^1.0",
"sebastian/diff": "2.0.x-dev",
"sebastian/diff": "^3.0",
"symfony/filesystem": "^3.3",
"symfony/yaml": "^3.3",
"webmozart/glob": "^4.1",
Expand All @@ -38,7 +46,7 @@
},
"require-dev": {
"symfony/debug": "^4.0",
"phpunit/phpunit": "^6.0",
"phpunit/phpunit": "^7.0",
"symfony/process": "^2.7|^3.0",
"symfony/options-resolver": "^2.7|^3.0",
"phpbench/phpbench": "^1.0@dev",
Expand Down
Loading