PHP completion, refactoring, introspection tool and language server.

Overview

Phpactor

phpactor2sm

CI

This project aims to provide heavy-lifting refactoring and introspection tools which can be used standalone or as the backend for a text editor to provide intelligent code completion.

Installation

Phpactor is a general tool, it is not intended that it be installed as a project dependency.

See Installation for installation instructions.

Requirements

  • PHP 7.3+
  • Composer

Project Recommendations

Phpactor will perform better with Composer and, to a lesser extent, with GiT.

Documentation

Full documentation can be found on Read the Docs

Community

Contributing

This package is open source and welcomes contributions! Feel free to open a pull request on this repository.

Support

  • Create an issue on the main Phpactor repository.
  • Join the #phpactor channel on the Slack Symfony Devs channel.
Comments
  • Nvim commands don't work with VIM Plug

    Nvim commands don't work with VIM Plug

    I have phpactor installed with composer globally and within vim with: Plug 'phpactor/phpactor', {'for': 'php', 'branch': 'master', 'do': 'composer install --no-dev -o'}

    " init.vim
    let g:phpactor_executable = '~/.config/nvim/plugged/phpactor/bin/phpactor'
    let g:phpactorPhpBin = "/usr/local/bin/php"
    

    :PlugInstall I also tried with develop but the result is the same. I also tried running composer install from plugged folder although I didn't have any errors with PlugInstall but still all the commands from within vim don't work. I have almost the same error with every command:

    image

    I am with the latest version of neovim. On MacOs Catalina

    $ php -v
    PHP 7.3.18 (cli) (built: May 14 2020 10:54:44) ( NTS )
    Copyright (c) 1997-2018 The PHP Group
    Zend Engine v3.3.18, Copyright (c) 1998-2018 Zend Technologies
        with Zend OPcache v7.3.18, Copyright (c) 1999-2018, by Zend Technologies
    

    I also tried to replay the issue from Vim commands with phpactor rpc --replay --verbose but /.cache/phpactor/replay.json is empty. All the commands from cli are working properly but inside vim nothing works, even the autocompletion is trowing errors.

    opened by vaklinzi 30
  • Unable to list open file descriptors

    Unable to list open file descriptors

    I use phpactor with neovim (0.8.0), lsp-config and Mason - phpactor is installed with Mason. Running status gives me:

    ./phpactor status                                                                                                                                                               ✓
    Version: "4665d3e (vor 4 Wochen) Update-CL 
    Filesystems: simple
    Working directory: /home/fidel/.local/share/nvim/mason/bin
    
    Config files (missing is not bad):
    
      ✘ /home/fidel/.config/phpactor/phpactor.json
      ✘ /home/fidel/.config/phpactor/phpactor.yml
      ✘ /home/fidel/.local/share/nvim/mason/bin/.phpactor.json
      ✘ /home/fidel/.local/share/nvim/mason/bin/.phpactor.yml
    
    Diagnostics:
    
      ✘ Composer not found - some functionality will not be available (e.g. class creation) and class location will fallback to scanning the filesystem if index not enabled - this can be slow. Make sure you've run `composer install` in your project!
      ✘ Git not detected. Some operations which would have been better scoped to your project repository will now include vendor paths.
      ✘ XDebug is enabled. XDebug has a negative effect on performance.
    

    The language server (phpactor language-server) can be started and it basically works. However, when I open a PHP file the first time, when the language server is started, an error message is issued that says that phpactor is unable to list open file descriptors:

    LSP[phpactor] Error in service "indexer" "Phpactor\Extension\LanguageServerIndexer\Handler\IndexerHandler:Phpactor\LanguageServer\Core\Service\{closure}": Unable to list open file descriptors
    

    I have searched but haven't found anything related to this error message. I didn't dig into the plugin code so I have no clue where this comes from.

    opened by fidelski 29
  • Allowed memory size exhausted

    Allowed memory size exhausted

    Hey,

    I'm looking for an intelephense replacement since it's closed-source and the development is slow, and phpactor seems like an excellent candidate.

    I was trying out this extension locally but I couldn't make it work at all. The language server crashes and restart in a loop.

    Here is the complete log:

    tarting language server, use -vvv for verbose output
    Fatal error: Allowed memory size of 1610612736 bytes exhausted (tried to allocate 20480 bytes) in /Users/enzoinnocenzi/Library/Application Support/Code/User/globalStorage/dantleech.vscode-phpactor/phpactor/lib/WorseReflection/Core/SourceCodeLocator/ChainSourceLocator.php on line 55
    [Info  - 2:52:52 AM] Connection to server got closed. Server will restart.
    [Error - 2:52:52 AM] Request textDocument/codeAction failed.
    Error: Connection got disposed.
        at Object.dispose (/Users/enzoinnocenzi/Code/playground/vscode-phpactor/node_modules/vscode-jsonrpc/lib/main.js:904:25)
        at Object.dispose (/Users/enzoinnocenzi/Code/playground/vscode-phpactor/node_modules/vscode-languageclient/lib/client.js:74:35)
        at LanguageClient.handleConnectionClosed (/Users/enzoinnocenzi/Code/playground/vscode-phpactor/node_modules/vscode-languageclient/lib/client.js:2309:42)
        at LanguageClient.handleConnectionClosed (/Users/enzoinnocenzi/Code/playground/vscode-phpactor/node_modules/vscode-languageclient/lib/main.js:155:15)
        at closeHandler (/Users/enzoinnocenzi/Code/playground/vscode-phpactor/node_modules/vscode-languageclient/lib/client.js:2296:18)
        at CallbackList.invoke (/Users/enzoinnocenzi/Code/playground/vscode-phpactor/node_modules/vscode-jsonrpc/lib/events.js:62:39)
        at Emitter.fire (/Users/enzoinnocenzi/Code/playground/vscode-phpactor/node_modules/vscode-jsonrpc/lib/events.js:121:36)
        at closeHandler (/Users/enzoinnocenzi/Code/playground/vscode-phpactor/node_modules/vscode-jsonrpc/lib/main.js:240:26)
        at CallbackList.invoke (/Users/enzoinnocenzi/Code/playground/vscode-phpactor/node_modules/vscode-jsonrpc/lib/events.js:62:39)
        at Emitter.fire (/Users/enzoinnocenzi/Code/playground/vscode-phpactor/node_modules/vscode-jsonrpc/lib/events.js:121:36)
        at StreamMessageReader.fireClose (/Users/enzoinnocenzi/Code/playground/vscode-phpactor/node_modules/vscode-jsonrpc/lib/messageReader.js:111:27)
        at Socket.<anonymous> (/Users/enzoinnocenzi/Code/playground/vscode-phpactor/node_modules/vscode-jsonrpc/lib/messageReader.js:151:46)
        at Socket.emit (node:events:402:35)
        at Pipe.<anonymous> (node:net:687:12)
    [Error - 2:52:52 AM] Request textDocument/codeAction failed.
    Error: Connection got disposed.
        at Object.dispose (/Users/enzoinnocenzi/Code/playground/vscode-phpactor/node_modules/vscode-jsonrpc/lib/main.js:904:25)
        at Object.dispose (/Users/enzoinnocenzi/Code/playground/vscode-phpactor/node_modules/vscode-languageclient/lib/client.js:74:35)
        at LanguageClient.handleConnectionClosed (/Users/enzoinnocenzi/Code/playground/vscode-phpactor/node_modules/vscode-languageclient/lib/client.js:2309:42)
        at LanguageClient.handleConnectionClosed (/Users/enzoinnocenzi/Code/playground/vscode-phpactor/node_modules/vscode-languageclient/lib/main.js:155:15)
        at closeHandler (/Users/enzoinnocenzi/Code/playground/vscode-phpactor/node_modules/vscode-languageclient/lib/client.js:2296:18)
        at CallbackList.invoke (/Users/enzoinnocenzi/Code/playground/vscode-phpactor/node_modules/vscode-jsonrpc/lib/events.js:62:39)
        at Emitter.fire (/Users/enzoinnocenzi/Code/playground/vscode-phpactor/node_modules/vscode-jsonrpc/lib/events.js:121:36)
        at closeHandler (/Users/enzoinnocenzi/Code/playground/vscode-phpactor/node_modules/vscode-jsonrpc/lib/main.js:240:26)
        at CallbackList.invoke (/Users/enzoinnocenzi/Code/playground/vscode-phpactor/node_modules/vscode-jsonrpc/lib/events.js:62:39)
        at Emitter.fire (/Users/enzoinnocenzi/Code/playground/vscode-phpactor/node_modules/vscode-jsonrpc/lib/events.js:121:36)
        at StreamMessageReader.fireClose (/Users/enzoinnocenzi/Code/playground/vscode-phpactor/node_modules/vscode-jsonrpc/lib/messageReader.js:111:27)
        at Socket.<anonymous> (/Users/enzoinnocenzi/Code/playground/vscode-phpactor/node_modules/vscode-jsonrpc/lib/messageReader.js:151:46)
        at Socket.emit (node:events:402:35)
        at Pipe.<anonymous> (node:net:687:12)
    [Error - 2:52:52 AM] Request textDocument/codeAction failed.
    Error: Connection got disposed.
        at Object.dispose (/Users/enzoinnocenzi/Code/playground/vscode-phpactor/node_modules/vscode-jsonrpc/lib/main.js:904:25)
        at Object.dispose (/Users/enzoinnocenzi/Code/playground/vscode-phpactor/node_modules/vscode-languageclient/lib/client.js:74:35)
        at LanguageClient.handleConnectionClosed (/Users/enzoinnocenzi/Code/playground/vscode-phpactor/node_modules/vscode-languageclient/lib/client.js:2309:42)
        at LanguageClient.handleConnectionClosed (/Users/enzoinnocenzi/Code/playground/vscode-phpactor/node_modules/vscode-languageclient/lib/main.js:155:15)
        at closeHandler (/Users/enzoinnocenzi/Code/playground/vscode-phpactor/node_modules/vscode-languageclient/lib/client.js:2296:18)
        at CallbackList.invoke (/Users/enzoinnocenzi/Code/playground/vscode-phpactor/node_modules/vscode-jsonrpc/lib/events.js:62:39)
        at Emitter.fire (/Users/enzoinnocenzi/Code/playground/vscode-phpactor/node_modules/vscode-jsonrpc/lib/events.js:121:36)
        at closeHandler (/Users/enzoinnocenzi/Code/playground/vscode-phpactor/node_modules/vscode-jsonrpc/lib/main.js:240:26)
        at CallbackList.invoke (/Users/enzoinnocenzi/Code/playground/vscode-phpactor/node_modules/vscode-jsonrpc/lib/events.js:62:39)
        at Emitter.fire (/Users/enzoinnocenzi/Code/playground/vscode-phpactor/node_modules/vscode-jsonrpc/lib/events.js:121:36)
        at StreamMessageReader.fireClose (/Users/enzoinnocenzi/Code/playground/vscode-phpactor/node_modules/vscode-jsonrpc/lib/messageReader.js:111:27)
        at Socket.<anonymous> (/Users/enzoinnocenzi/Code/playground/vscode-phpactor/node_modules/vscode-jsonrpc/lib/messageReader.js:151:46)
        at Socket.emit (node:events:402:35)
        at Pipe.<anonymous> (node:net:687:12)
    [Error - 2:52:52 AM] Request textDocument/codeAction failed.
    Error: Connection got disposed.
        at Object.dispose (/Users/enzoinnocenzi/Code/playground/vscode-phpactor/node_modules/vscode-jsonrpc/lib/main.js:904:25)
        at Object.dispose (/Users/enzoinnocenzi/Code/playground/vscode-phpactor/node_modules/vscode-languageclient/lib/client.js:74:35)
        at LanguageClient.handleConnectionClosed (/Users/enzoinnocenzi/Code/playground/vscode-phpactor/node_modules/vscode-languageclient/lib/client.js:2309:42)
        at LanguageClient.handleConnectionClosed (/Users/enzoinnocenzi/Code/playground/vscode-phpactor/node_modules/vscode-languageclient/lib/main.js:155:15)
        at closeHandler (/Users/enzoinnocenzi/Code/playground/vscode-phpactor/node_modules/vscode-languageclient/lib/client.js:2296:18)
        at CallbackList.invoke (/Users/enzoinnocenzi/Code/playground/vscode-phpactor/node_modules/vscode-jsonrpc/lib/events.js:62:39)
        at Emitter.fire (/Users/enzoinnocenzi/Code/playground/vscode-phpactor/node_modules/vscode-jsonrpc/lib/events.js:121:36)
        at closeHandler (/Users/enzoinnocenzi/Code/playground/vscode-phpactor/node_modules/vscode-jsonrpc/lib/main.js:240:26)
        at CallbackList.invoke (/Users/enzoinnocenzi/Code/playground/vscode-phpactor/node_modules/vscode-jsonrpc/lib/events.js:62:39)
        at Emitter.fire (/Users/enzoinnocenzi/Code/playground/vscode-phpactor/node_modules/vscode-jsonrpc/lib/events.js:121:36)
        at StreamMessageReader.fireClose (/Users/enzoinnocenzi/Code/playground/vscode-phpactor/node_modules/vscode-jsonrpc/lib/messageReader.js:111:27)
        at Socket.<anonymous> (/Users/enzoinnocenzi/Code/playground/vscode-phpactor/node_modules/vscode-jsonrpc/lib/messageReader.js:151:46)
        at Socket.emit (node:events:402:35)
        at Pipe.<anonymous> (node:net:687:12)
    [Error - 2:52:52 AM] Request textDocument/documentSymbol failed.
    Error: Connection got disposed.
        at Object.dispose (/Users/enzoinnocenzi/Code/playground/vscode-phpactor/node_modules/vscode-jsonrpc/lib/main.js:904:25)
        at Object.dispose (/Users/enzoinnocenzi/Code/playground/vscode-phpactor/node_modules/vscode-languageclient/lib/client.js:74:35)
        at LanguageClient.handleConnectionClosed (/Users/enzoinnocenzi/Code/playground/vscode-phpactor/node_modules/vscode-languageclient/lib/client.js:2309:42)
        at LanguageClient.handleConnectionClosed (/Users/enzoinnocenzi/Code/playground/vscode-phpactor/node_modules/vscode-languageclient/lib/main.js:155:15)
        at closeHandler (/Users/enzoinnocenzi/Code/playground/vscode-phpactor/node_modules/vscode-languageclient/lib/client.js:2296:18)
        at CallbackList.invoke (/Users/enzoinnocenzi/Code/playground/vscode-phpactor/node_modules/vscode-jsonrpc/lib/events.js:62:39)
        at Emitter.fire (/Users/enzoinnocenzi/Code/playground/vscode-phpactor/node_modules/vscode-jsonrpc/lib/events.js:121:36)
        at closeHandler (/Users/enzoinnocenzi/Code/playground/vscode-phpactor/node_modules/vscode-jsonrpc/lib/main.js:240:26)
        at CallbackList.invoke (/Users/enzoinnocenzi/Code/playground/vscode-phpactor/node_modules/vscode-jsonrpc/lib/events.js:62:39)
        at Emitter.fire (/Users/enzoinnocenzi/Code/playground/vscode-phpactor/node_modules/vscode-jsonrpc/lib/events.js:121:36)
        at StreamMessageReader.fireClose (/Users/enzoinnocenzi/Code/playground/vscode-phpactor/node_modules/vscode-jsonrpc/lib/messageReader.js:111:27)
        at Socket.<anonymous> (/Users/enzoinnocenzi/Code/playground/vscode-phpactor/node_modules/vscode-jsonrpc/lib/messageReader.js:151:46)
        at Socket.emit (node:events:402:35)
        at Pipe.<anonymous> (node:net:687:12)
    [Error - 2:52:52 AM] Request textDocument/codeAction failed.
    Error: Connection got disposed.
        at Object.dispose (/Users/enzoinnocenzi/Code/playground/vscode-phpactor/node_modules/vscode-jsonrpc/lib/main.js:904:25)
        at Object.dispose (/Users/enzoinnocenzi/Code/playground/vscode-phpactor/node_modules/vscode-languageclient/lib/client.js:74:35)
        at LanguageClient.handleConnectionClosed (/Users/enzoinnocenzi/Code/playground/vscode-phpactor/node_modules/vscode-languageclient/lib/client.js:2309:42)
        at LanguageClient.handleConnectionClosed (/Users/enzoinnocenzi/Code/playground/vscode-phpactor/node_modules/vscode-languageclient/lib/main.js:155:15)
        at closeHandler (/Users/enzoinnocenzi/Code/playground/vscode-phpactor/node_modules/vscode-languageclient/lib/client.js:2296:18)
        at CallbackList.invoke (/Users/enzoinnocenzi/Code/playground/vscode-phpactor/node_modules/vscode-jsonrpc/lib/events.js:62:39)
        at Emitter.fire (/Users/enzoinnocenzi/Code/playground/vscode-phpactor/node_modules/vscode-jsonrpc/lib/events.js:121:36)
        at closeHandler (/Users/enzoinnocenzi/Code/playground/vscode-phpactor/node_modules/vscode-jsonrpc/lib/main.js:240:26)
        at CallbackList.invoke (/Users/enzoinnocenzi/Code/playground/vscode-phpactor/node_modules/vscode-jsonrpc/lib/events.js:62:39)
        at Emitter.fire (/Users/enzoinnocenzi/Code/playground/vscode-phpactor/node_modules/vscode-jsonrpc/lib/events.js:121:36)
        at StreamMessageReader.fireClose (/Users/enzoinnocenzi/Code/playground/vscode-phpactor/node_modules/vscode-jsonrpc/lib/messageReader.js:111:27)
        at Socket.<anonymous> (/Users/enzoinnocenzi/Code/playground/vscode-phpactor/node_modules/vscode-jsonrpc/lib/messageReader.js:151:46)
        at Socket.emit (node:events:402:35)
        at Pipe.<anonymous> (node:net:687:12)
    [Error - 2:52:52 AM] Request textDocument/codeAction failed.
    Error: Connection got disposed.
        at Object.dispose (/Users/enzoinnocenzi/Code/playground/vscode-phpactor/node_modules/vscode-jsonrpc/lib/main.js:904:25)
        at Object.dispose (/Users/enzoinnocenzi/Code/playground/vscode-phpactor/node_modules/vscode-languageclient/lib/client.js:74:35)
        at LanguageClient.handleConnectionClosed (/Users/enzoinnocenzi/Code/playground/vscode-phpactor/node_modules/vscode-languageclient/lib/client.js:2309:42)
        at LanguageClient.handleConnectionClosed (/Users/enzoinnocenzi/Code/playground/vscode-phpactor/node_modules/vscode-languageclient/lib/main.js:155:15)
        at closeHandler (/Users/enzoinnocenzi/Code/playground/vscode-phpactor/node_modules/vscode-languageclient/lib/client.js:2296:18)
        at CallbackList.invoke (/Users/enzoinnocenzi/Code/playground/vscode-phpactor/node_modules/vscode-jsonrpc/lib/events.js:62:39)
        at Emitter.fire (/Users/enzoinnocenzi/Code/playground/vscode-phpactor/node_modules/vscode-jsonrpc/lib/events.js:121:36)
        at closeHandler (/Users/enzoinnocenzi/Code/playground/vscode-phpactor/node_modules/vscode-jsonrpc/lib/main.js:240:26)
        at CallbackList.invoke (/Users/enzoinnocenzi/Code/playground/vscode-phpactor/node_modules/vscode-jsonrpc/lib/events.js:62:39)
        at Emitter.fire (/Users/enzoinnocenzi/Code/playground/vscode-phpactor/node_modules/vscode-jsonrpc/lib/events.js:121:36)
        at StreamMessageReader.fireClose (/Users/enzoinnocenzi/Code/playground/vscode-phpactor/node_modules/vscode-jsonrpc/lib/messageReader.js:111:27)
        at Socket.<anonymous> (/Users/enzoinnocenzi/Code/playground/vscode-phpactor/node_modules/vscode-jsonrpc/lib/messageReader.js:151:46)
        at Socket.emit (node:events:402:35)
        at Pipe.<anonymous> (node:net:687:12)
    [Error - 2:52:52 AM] Request textDocument/documentSymbol failed.
    Error: Connection got disposed.
        at Object.dispose (/Users/enzoinnocenzi/Code/playground/vscode-phpactor/node_modules/vscode-jsonrpc/lib/main.js:904:25)
        at Object.dispose (/Users/enzoinnocenzi/Code/playground/vscode-phpactor/node_modules/vscode-languageclient/lib/client.js:74:35)
        at LanguageClient.handleConnectionClosed (/Users/enzoinnocenzi/Code/playground/vscode-phpactor/node_modules/vscode-languageclient/lib/client.js:2309:42)
        at LanguageClient.handleConnectionClosed (/Users/enzoinnocenzi/Code/playground/vscode-phpactor/node_modules/vscode-languageclient/lib/main.js:155:15)
        at closeHandler (/Users/enzoinnocenzi/Code/playground/vscode-phpactor/node_modules/vscode-languageclient/lib/client.js:2296:18)
        at CallbackList.invoke (/Users/enzoinnocenzi/Code/playground/vscode-phpactor/node_modules/vscode-jsonrpc/lib/events.js:62:39)
        at Emitter.fire (/Users/enzoinnocenzi/Code/playground/vscode-phpactor/node_modules/vscode-jsonrpc/lib/events.js:121:36)
        at closeHandler (/Users/enzoinnocenzi/Code/playground/vscode-phpactor/node_modules/vscode-jsonrpc/lib/main.js:240:26)
        at CallbackList.invoke (/Users/enzoinnocenzi/Code/playground/vscode-phpactor/node_modules/vscode-jsonrpc/lib/events.js:62:39)
        at Emitter.fire (/Users/enzoinnocenzi/Code/playground/vscode-phpactor/node_modules/vscode-jsonrpc/lib/events.js:121:36)
        at StreamMessageReader.fireClose (/Users/enzoinnocenzi/Code/playground/vscode-phpactor/node_modules/vscode-jsonrpc/lib/messageReader.js:111:27)
        at Socket.<anonymous> (/Users/enzoinnocenzi/Code/playground/vscode-phpactor/node_modules/vscode-jsonrpc/lib/messageReader.js:151:46)
        at Socket.emit (node:events:402:35)
        at Pipe.<anonymous> (node:net:687:12)
    [Error - 2:52:52 AM] Request textDocument/codeAction failed.
    Error: Connection got disposed.
        at Object.dispose (/Users/enzoinnocenzi/Code/playground/vscode-phpactor/node_modules/vscode-jsonrpc/lib/main.js:904:25)
        at Object.dispose (/Users/enzoinnocenzi/Code/playground/vscode-phpactor/node_modules/vscode-languageclient/lib/client.js:74:35)
        at LanguageClient.handleConnectionClosed (/Users/enzoinnocenzi/Code/playground/vscode-phpactor/node_modules/vscode-languageclient/lib/client.js:2309:42)
        at LanguageClient.handleConnectionClosed (/Users/enzoinnocenzi/Code/playground/vscode-phpactor/node_modules/vscode-languageclient/lib/main.js:155:15)
        at closeHandler (/Users/enzoinnocenzi/Code/playground/vscode-phpactor/node_modules/vscode-languageclient/lib/client.js:2296:18)
        at CallbackList.invoke (/Users/enzoinnocenzi/Code/playground/vscode-phpactor/node_modules/vscode-jsonrpc/lib/events.js:62:39)
        at Emitter.fire (/Users/enzoinnocenzi/Code/playground/vscode-phpactor/node_modules/vscode-jsonrpc/lib/events.js:121:36)
        at closeHandler (/Users/enzoinnocenzi/Code/playground/vscode-phpactor/node_modules/vscode-jsonrpc/lib/main.js:240:26)
        at CallbackList.invoke (/Users/enzoinnocenzi/Code/playground/vscode-phpactor/node_modules/vscode-jsonrpc/lib/events.js:62:39)
        at Emitter.fire (/Users/enzoinnocenzi/Code/playground/vscode-phpactor/node_modules/vscode-jsonrpc/lib/events.js:121:36)
        at StreamMessageReader.fireClose (/Users/enzoinnocenzi/Code/playground/vscode-phpactor/node_modules/vscode-jsonrpc/lib/messageReader.js:111:27)
        at Socket.<anonymous> (/Users/enzoinnocenzi/Code/playground/vscode-phpactor/node_modules/vscode-jsonrpc/lib/messageReader.js:151:46)
        at Socket.emit (node:events:402:35)
        at Pipe.<anonymous> (node:net:687:12)
    [Error - 2:52:52 AM] Request textDocument/codeAction failed.
    Error: Connection got disposed.
        at Object.dispose (/Users/enzoinnocenzi/Code/playground/vscode-phpactor/node_modules/vscode-jsonrpc/lib/main.js:904:25)
        at Object.dispose (/Users/enzoinnocenzi/Code/playground/vscode-phpactor/node_modules/vscode-languageclient/lib/client.js:74:35)
        at LanguageClient.handleConnectionClosed (/Users/enzoinnocenzi/Code/playground/vscode-phpactor/node_modules/vscode-languageclient/lib/client.js:2309:42)
        at LanguageClient.handleConnectionClosed (/Users/enzoinnocenzi/Code/playground/vscode-phpactor/node_modules/vscode-languageclient/lib/main.js:155:15)
        at closeHandler (/Users/enzoinnocenzi/Code/playground/vscode-phpactor/node_modules/vscode-languageclient/lib/client.js:2296:18)
        at CallbackList.invoke (/Users/enzoinnocenzi/Code/playground/vscode-phpactor/node_modules/vscode-jsonrpc/lib/events.js:62:39)
        at Emitter.fire (/Users/enzoinnocenzi/Code/playground/vscode-phpactor/node_modules/vscode-jsonrpc/lib/events.js:121:36)
        at closeHandler (/Users/enzoinnocenzi/Code/playground/vscode-phpactor/node_modules/vscode-jsonrpc/lib/main.js:240:26)
        at CallbackList.invoke (/Users/enzoinnocenzi/Code/playground/vscode-phpactor/node_modules/vscode-jsonrpc/lib/events.js:62:39)
        at Emitter.fire (/Users/enzoinnocenzi/Code/playground/vscode-phpactor/node_modules/vscode-jsonrpc/lib/events.js:121:36)
        at StreamMessageReader.fireClose (/Users/enzoinnocenzi/Code/playground/vscode-phpactor/node_modules/vscode-jsonrpc/lib/messageReader.js:111:27)
        at Socket.<anonymous> (/Users/enzoinnocenzi/Code/playground/vscode-phpactor/node_modules/vscode-jsonrpc/lib/messageReader.js:151:46)
        at Socket.emit (node:events:402:35)
        at Pipe.<anonymous> (node:net:687:12)
    [Error - 2:52:52 AM] Request textDocument/codeAction failed.
    Error: Connection got disposed.
        at Object.dispose (/Users/enzoinnocenzi/Code/playground/vscode-phpactor/node_modules/vscode-jsonrpc/lib/main.js:904:25)
        at Object.dispose (/Users/enzoinnocenzi/Code/playground/vscode-phpactor/node_modules/vscode-languageclient/lib/client.js:74:35)
        at LanguageClient.handleConnectionClosed (/Users/enzoinnocenzi/Code/playground/vscode-phpactor/node_modules/vscode-languageclient/lib/client.js:2309:42)
        at LanguageClient.handleConnectionClosed (/Users/enzoinnocenzi/Code/playground/vscode-phpactor/node_modules/vscode-languageclient/lib/main.js:155:15)
        at closeHandler (/Users/enzoinnocenzi/Code/playground/vscode-phpactor/node_modules/vscode-languageclient/lib/client.js:2296:18)
        at CallbackList.invoke (/Users/enzoinnocenzi/Code/playground/vscode-phpactor/node_modules/vscode-jsonrpc/lib/events.js:62:39)
        at Emitter.fire (/Users/enzoinnocenzi/Code/playground/vscode-phpactor/node_modules/vscode-jsonrpc/lib/events.js:121:36)
        at closeHandler (/Users/enzoinnocenzi/Code/playground/vscode-phpactor/node_modules/vscode-jsonrpc/lib/main.js:240:26)
        at CallbackList.invoke (/Users/enzoinnocenzi/Code/playground/vscode-phpactor/node_modules/vscode-jsonrpc/lib/events.js:62:39)
        at Emitter.fire (/Users/enzoinnocenzi/Code/playground/vscode-phpactor/node_modules/vscode-jsonrpc/lib/events.js:121:36)
        at StreamMessageReader.fireClose (/Users/enzoinnocenzi/Code/playground/vscode-phpactor/node_modules/vscode-jsonrpc/lib/messageReader.js:111:27)
        at Socket.<anonymous> (/Users/enzoinnocenzi/Code/playground/vscode-phpactor/node_modules/vscode-jsonrpc/lib/messageReader.js:151:46)
        at Socket.emit (node:events:402:35)
        at Pipe.<anonymous> (node:net:687:12)
    [Error - 2:52:52 AM] Request textDocument/codeAction failed.
    Error: Connection got disposed.
        at Object.dispose (/Users/enzoinnocenzi/Code/playground/vscode-phpactor/node_modules/vscode-jsonrpc/lib/main.js:904:25)
        at Object.dispose (/Users/enzoinnocenzi/Code/playground/vscode-phpactor/node_modules/vscode-languageclient/lib/client.js:74:35)
        at LanguageClient.handleConnectionClosed (/Users/enzoinnocenzi/Code/playground/vscode-phpactor/node_modules/vscode-languageclient/lib/client.js:2309:42)
        at LanguageClient.handleConnectionClosed (/Users/enzoinnocenzi/Code/playground/vscode-phpactor/node_modules/vscode-languageclient/lib/main.js:155:15)
        at closeHandler (/Users/enzoinnocenzi/Code/playground/vscode-phpactor/node_modules/vscode-languageclient/lib/client.js:2296:18)
        at CallbackList.invoke (/Users/enzoinnocenzi/Code/playground/vscode-phpactor/node_modules/vscode-jsonrpc/lib/events.js:62:39)
        at Emitter.fire (/Users/enzoinnocenzi/Code/playground/vscode-phpactor/node_modules/vscode-jsonrpc/lib/events.js:121:36)
        at closeHandler (/Users/enzoinnocenzi/Code/playground/vscode-phpactor/node_modules/vscode-jsonrpc/lib/main.js:240:26)
        at CallbackList.invoke (/Users/enzoinnocenzi/Code/playground/vscode-phpactor/node_modules/vscode-jsonrpc/lib/events.js:62:39)
        at Emitter.fire (/Users/enzoinnocenzi/Code/playground/vscode-phpactor/node_modules/vscode-jsonrpc/lib/events.js:121:36)
        at StreamMessageReader.fireClose (/Users/enzoinnocenzi/Code/playground/vscode-phpactor/node_modules/vscode-jsonrpc/lib/messageReader.js:111:27)
        at Socket.<anonymous> (/Users/enzoinnocenzi/Code/playground/vscode-phpactor/node_modules/vscode-jsonrpc/lib/messageReader.js:151:46)
        at Socket.emit (node:events:402:35)
        at Pipe.<anonymous> (node:net:687:12)
    [Error - 2:52:52 AM] Request textDocument/hover failed.
    Error: Connection got disposed.
        at Object.dispose (/Users/enzoinnocenzi/Code/playground/vscode-phpactor/node_modules/vscode-jsonrpc/lib/main.js:904:25)
        at Object.dispose (/Users/enzoinnocenzi/Code/playground/vscode-phpactor/node_modules/vscode-languageclient/lib/client.js:74:35)
        at LanguageClient.handleConnectionClosed (/Users/enzoinnocenzi/Code/playground/vscode-phpactor/node_modules/vscode-languageclient/lib/client.js:2309:42)
        at LanguageClient.handleConnectionClosed (/Users/enzoinnocenzi/Code/playground/vscode-phpactor/node_modules/vscode-languageclient/lib/main.js:155:15)
        at closeHandler (/Users/enzoinnocenzi/Code/playground/vscode-phpactor/node_modules/vscode-languageclient/lib/client.js:2296:18)
        at CallbackList.invoke (/Users/enzoinnocenzi/Code/playground/vscode-phpactor/node_modules/vscode-jsonrpc/lib/events.js:62:39)
        at Emitter.fire (/Users/enzoinnocenzi/Code/playground/vscode-phpactor/node_modules/vscode-jsonrpc/lib/events.js:121:36)
        at closeHandler (/Users/enzoinnocenzi/Code/playground/vscode-phpactor/node_modules/vscode-jsonrpc/lib/main.js:240:26)
        at CallbackList.invoke (/Users/enzoinnocenzi/Code/playground/vscode-phpactor/node_modules/vscode-jsonrpc/lib/events.js:62:39)
        at Emitter.fire (/Users/enzoinnocenzi/Code/playground/vscode-phpactor/node_modules/vscode-jsonrpc/lib/events.js:121:36)
        at StreamMessageReader.fireClose (/Users/enzoinnocenzi/Code/playground/vscode-phpactor/node_modules/vscode-jsonrpc/lib/messageReader.js:111:27)
        at Socket.<anonymous> (/Users/enzoinnocenzi/Code/playground/vscode-phpactor/node_modules/vscode-jsonrpc/lib/messageReader.js:151:46)
        at Socket.emit (node:events:402:35)
        at Pipe.<anonymous> (node:net:687:12)
    

    Steps to reproduce:

    • Follow instruction installation
      • I cloned the extension repository, installed dependencies using yarn, built the project, and symlinked it to the VSC extension directory.
    • Start VSCode within a PHP project using Composer (Laravel project in my case)
    opened by innocenzi 27
  • LS: Double dollar sign in completion response

    LS: Double dollar sign in completion response

    • use phpactor as language server
    • open any class with a function body e.g. lib/Extension/Core/Console/PhpactorCommandLoader.php
    • inside the body write $thi and select $this.

    Additional dollar sign appears then in response. This error does not occur when perfoming the same completion using omnifunc.

    [Trace - 00:25:50] Sending notification 'textDocument/didChange'.
    Params: {
        "textDocument": {
            "uri": "file:///home/user/.vim/bundle/phpactor/lib/Extension/Core/Console/PhpactorCommandLoader.php",
            "version": 6
        },
        "contentChanges": [
            {
                "text": "<?php\n\nnamespace Phpactor\\Extension\\Core\\Console;\n\nuse Symfony\\Component\\Console\\CommandLoader\\ContainerCommandLoader;\n\nclass PhpactorCommandLoader extends ContainerCommandLoader\n{\n    public function get($name)\n    {\n        $$this\n        $command = parent::get($name);\n        $command->setName($name);\n\n        return $command;\n    }\n}\n"
            }
        ]
    }
    ``
    opened by przepompownia 26
  • Windows gVim 8.1.1 -

    Windows gVim 8.1.1 - "phpactor returned an error"

    Hi, Any idea why I get the error below when I issue the:call phpactor#Status() command?

    screenshot

    I installed the plugin with minpac and the dependencies manually, inside the phpactor directory. Thanks!

    bug windows 
    opened by antaed 25
  • [WR] Docblock type hinting with FQN

    [WR] Docblock type hinting with FQN

            /** @var \Phpactor\WorseReflection\Core\Inference\SymbolInformation $bar */
            $bar = $baz;
            $bar->
    

    does not work, but importing SymbolInformation is fine.

    bug Priority 
    opened by dantleech 25
  • Crash when trying to go to definition: undefined variable: g:phpactorProjectRootPatterns

    Crash when trying to go to definition: undefined variable: g:phpactorProjectRootPatterns

    phpactor crashes when I try to use GotoDefinition on the DoctrineCommand class here: https://github.com/doctrine/DoctrineFixturesBundle/blob/master/Command/LoadDataFixturesDoctrineCommand.php#L30

    Error detected while processing function phpactor#GotoDefinition[1]..phpactor#_GotoDefinitionTarget[1]..phpactor#rpc:
    line    6:
    E121: Undefined variable: g:phpactorProjectRootPatterns
    E116: Invalid arguments for function s:searchDirectoryUpwardForRootPatterns( fnamemodify(phpactor#_path(), ':h'), g:phpactorProjectRootPatterns, g:phpactorInitialCwd)
    line   12:
    E121: Undefined variable: g:phpactorPhpBin
    line   14:
    E121: Undefined variable: l:cmd
    E116: Invalid arguments for function system(l:cmd, json_encode(request))
    Error detected while processing function phpactor#GotoDefinition[1]..phpactor#_GotoDefinitionTarget[1]..phpactor#rpc:
    line   20:
    E605: Exception not caught: Could not parse response from Phpactor: Vim(let):E121: Undefined variable: result
    
    opened by greg0ire 23
  • Error on Extract Method (VIM 8 only?)

    Error on Extract Method (VIM 8 only?)

    I recently ran :call phpactor#Update() in my VIM.

    I'm trying to use Extract Method and I get this error:

    Phpactor returned an error: PHP Fatal error:  Uncaught Symfony\Component\Debug\Exception\ClassNotFoundException: Attempted to
    load class "ReflectorBuilder" from namespace "Phpactor\WorseReflection".
    Did you forget a "use" statement for another namespace? in /home/james/.vim/bundle/phpactor/lib/Container/WorseReflectionExten
    sion.php:25
    Stack trace:
    #0 /home/james/.vim/bundle/phpactor/vendor/phpbench/container/lib/Container.php(118): Phpactor\Container\WorseReflectionExtens
    ion->Phpactor\Container\{closure}(Object(Phpactor\Container\ApplicationContainer))
    #1 /home/james/.vim/bundle/phpactor/lib/Container/CodeTransformExtension.php(141): PhpBench\DependencyInjection\Container->get
    ('reflection.refl...')
    #2 /home/james/.vim/bundle/phpactor/vendor/phpbench/container/lib/Container.php(118): Phpactor\Container\CodeTransformExtensio
    n->Phpactor\Container\{closure}(Object(Phpactor\Container\ApplicationContainer))
    #3 /home/james/.vim/bundle/phpactor/lib/Container/CodeTransformExtension.php(129): PhpBench\DependencyInjection\Container->get
    ('code_transform....')
    #4 /ho in /home/james/.vim/bundle/phpactor/lib/Container/WorseReflectionExtension.php on line 25
    

    I also get this error when trying to use omnicompletion, UseAdd(), ClassExpand(), etc.

    Here is /home/james/.vim/bundle/phpactor/lib/Container/WorseReflectionExtension.php which clearly shows the use statement exists:

    <?php
    
    namespace Phpactor\Container;
    
    use PhpBench\DependencyInjection\Container;
    use Phpactor\WorseReflection\Reflector;
    use Phpactor\WorseReflection\Bridge\PsrLog\PsrLogger;
    use Phpactor\WorseReflection\Core\SourceCodeLocator\StubSourceLocator;
    use PhpBench\DependencyInjection\ExtensionInterface;
    use Phpactor\WorseReflection\Bridge\Phpactor\ClassToFileSourceLocator;
    use Phpactor\WorseReflection\ReflectorBuilder;
    
    class WorseReflectionExtension implements ExtensionInterface
    {
        public function getDefaultConfig()
        {
            return [
                'reflection.stub_directory' => __DIR__ . '/../../vendor/jetbrains/phpstorm-stubs',
            ];
        }
    
        public function load(Container $container)
        {
            $container->register('reflection.reflector', function (Container $container) {
                $builder = ReflectorBuilder::create()
                    ->enableCache()
                    ->enableContextualSourceLocation();
    
                foreach (array_keys($container->getServiceIdsForTag('reflection.source_locator')) as $locatorId) {
                    $builder->addLocator($container->get($locatorId));
                }
    
                $builder->withLogger(new PsrLogger($container->get('monolog.logger')));
    
                return $builder->build();
            });
    
            $container->register('reflection.locator.stub', function (Container $container) {
                return new StubSourceLocator(
                    ReflectorBuilder::create()->build(),
                    $container->getParameter('reflection.stub_directory'),
                    $container->getParameter('cache_dir')
                );
            }, [ 'reflection.source_locator' => []]);
    
            $container->register('reflection.locator.worse', function (Container $container) {
                return new ClassToFileSourceLocator($container->get('class_to_file.class_to_file'));
            }, [ 'reflection.source_locator' => []]);
        }
    }
    
    opened by FatBoyXPC 23
  • RPC command documentation generator

    RPC command documentation generator

    What I did

    • Generalized the DocumentExtensionsCommand to also be able to generate documentation for the commands
    • Centralized / extracted the generation of the Definition printing logic to another class
    • Added a command for generating configuration information from a Handler.

    What needs to be done

    First of all this is only a prove of concept if the idea that I had is alright. If it is valid, then we need to add more Handlers to the list to document. And fill out the documentation info on all of the handlers

    Relates to #1030

    opened by mamazu 22
  • I can't get phpactor to work with coc

    I can't get phpactor to work with coc

    I've seen that phpactor might work on coc, but I don't really know how to proceed, these have been my steps so far:

    • Install coc on nvim, on vimrc: Plug 'neoclide/coc.nvim', {'branch': 'release'}
    • Install phpactors coc-extension, on nvim: :CocInstall coc-phpactor
    • Install phpactor globally and created a symlink to make it a command sudo ln -s ~/phpactor/bin/phpactor /usr/local/bin
    • Configure coc-phpactor extension, from nvim do :CocConfig, and created this settings:
    {
        "languageserver": {
            "phpactor": {
                "command": "phpactor",
                "trace.server": "verbose",
                "filetypes": ["php"]
            }
        }
    }
    

    With these, I restarted nvim, opened a PHP file with some issues:

    • On airline I see a message Starting LS languageserver.phpactor going forever.
    • No autocompletion suggestions (other than the nvim's default autocompletion)
    • Trying to GoToDefinition tells on airline: [coc.nvim] Definition provider not found for current document

    Also, just to try out coc I also installed the json extension and everything works perfectly on json files.

    Did I miss any configuration step?

    opened by fcojavierdomenech 21
  • [VIM Plugin] Option to control navigation window

    [VIM Plugin] Option to control navigation window

    Currently when you use Goto Reference or other functionality that implies navigation, phpactor tries to open the destination in the current window. It would be great if there was an option that would tell it to use new split / tab instead, with these possible values: split above, split below, split to the right, split to the left, new tab.

    enhancement 
    opened by weirdan 21
  • perf(psalm): improve psalm diagnostics performances

    perf(psalm): improve psalm diagnostics performances

    I've lately moved from null-ls to phpactor for psalm diagnostics and I found it slower...

    After investigating, I've found that the PsalmProcess class doesn't pass the filename to the command, then, psalm always parse all the project instead of just the file it should analyse.

    In my case, It reduces the execution time from 5 to 1.8 seconds.

    Then, I've also noticed that --no-cache directive is passed to the command, and it's not present in the null-ls command. I've removed it and it reduces the execution time from 1.8 to 0.9 seconds.

    opened by gbprod 1
  • Generics don't seem to work correctly within a class method

    Generics don't seem to work correctly within a class method

    This snippet gives Method "specialMethod" does not exist on class "Node" on the last line (and also no completion), but the @implements generic annotation should tell Phpactor that $node is an instance of SpecificNode (both PHPStan and Psalm support this).

    interface Node {}
    
    /** @template T of Node */
    interface NodeVisitor
    {
        /** @param T $node */
        public function enter(Node $node): void;
    }
    
    class SpecificNode implements Node
    {
        public function specialMethod(): string
        {
            return 'special';
        }
    }
    
    /** @implements NodeVisitor<SpecificNode> */
    class SpecificNodeVisitor implements NodeVisitor
    {
        public function enter(Node $node): void
        {
            $node->specialMethod(); // E: Method "specialMethod" does not exist on class "Node"
        }
    }
    
    enhancement 
    opened by wouterj 1
  • Option to only rename/search for references in project

    Option to only rename/search for references in project

    Operations for searching for references or renaming symbols are almost always concerned with the current project's source code and NOT the vendor libraries.

    Currently we search the index of both project and vendor libraries, and, where necessary, we have to analyze 1000s of files to resolve types. If the symbol is something like get searching the vendor library will add a very significant overhead for no gain (most of the time).

    Change the default behavior to search the versioned code only.

    enhancement 
    opened by dantleech 0
  • Interface attributes and Enum methods

    Interface attributes and Enum methods

    There as a "bug" in the tolerant parser. Where the interface attributes was broken.

    It also broke the enum attributes, like from, value.

    I fixed it: https://github.com/microsoft/tolerant-php-parser/pull/395

    opened by nataneb32 0
  • Complete attribute classes

    Complete attribute classes

    Given #1998 and previous examples with class constant completion (#1979, #1985) I started to find how to restrict the suggestion list to Attributes only. This led me to the question which Completor should be used to it: any existing or some new?

    opened by przepompownia 2
Releases(2022.12.12)
  • 2022.12.12(Dec 12, 2022)

    Breaking changes:

    • Minimum version of PHP changed to 8.0. Phpactor will no longer run on PHP 7.4.

    Features:

    • [lsp] Generate mutator @florian-merle

    Improvements:

    • [wr] Fix inference of array subscript expressions #1961

    Bug fixes:

    • [lsp] Prevent race condition that makes old changes get analyzed after new changes #1974
    • [cmp] Constant visibility not taken into account for completion #1979 @przepompownia
    • [rn] Fix crash on rename interface #1982 @nataneb32
    • [wr] Fix crash on enum with custom methods #1966
    • [ls] Log errors even if they are for a request @lumnn
    • [ls] Do not include results key in JSON response when error @lumnn
    • [lsp] Do not send workDoneProgress notifications to clients that do not support it #1951
    • [lsp] Fix highlighting on PHP 8.1 #1960
    • [wr] Do not crash when encountering an array union operator #1971 @wouterj
    • [wr] Fixing handling of HEREDOC in StringResolver #1977 @mamazu
    Source code(tar.gz)
    Source code(zip)
  • 2022.11.12(Nov 12, 2022)

    Features:

    Bug fixes:

    • Fix member template params when declared in interface #1914
    • Do not prompt to generate constructor when object is given no arguments #1911

    Improvements:

    • Add properties after constants #1917 @mamazu
    • Remove dependency on webmozart/path-util @mamazu
    • "invokable" type refactoring
    • Do not register services for disabled extensions

    Documentation:

    • Added Emacs LSP client guides @zonuexe
    Source code(tar.gz)
    Source code(zip)
  • 2022.10.11(Oct 11, 2022)

    Bug fixes:

    • [lsp] Import all unresolved names command no longer dupliates names #1835
    • [tp] Update tolerant parser library fixing issue with parsing match keyword #1873
    • [rpc] Fix regression with :PhpactorClassNew opening in Untitled buffer #1881
    • [ctf] Fix token issue with simple class-to-file converter #920
    • [wr] Built-in enum members are reflected #1902
    • [wr] Fix iterable generic not being resolved properly #1875

    Improvements:

    • [wr] Better modelling of enums
    • [wr] Add additional phpactor-specific stubs (e.g. for Enums)
    • [lsp] Enum hover improvement
    • [lsp] Improve formating signature help parameters #1894
    • [lsp] Highlighting more 10x faster #1891
    • [cmp/lsp] inline type information for completion items
    • [cmp] complete __construct on parent:: #1272
    • [wr] Refactored generic handling

    Features:

    • [wr] Support for class-string<T> generic
    • [ct] Decorate interface #1879 @mamazu
    • [lsp] Document formatting via. php-cs-fixer #1897
    • [gtd] For member declarations, goto parent member definition if it exists #1886
    Source code(tar.gz)
    Source code(zip)
  • 2022.09.11(Sep 11, 2022)

    This changelog is non-exhaustive also see blog post

    Bug fixes:

    • [wr] Inconsistent type resolution - removed node level cache #1673
    • [in] Fix exception when indexed file has no path #1643
    • [wr] Do not complete constants on class instance #1614
    • [wr] Include virtual properties in class members #1623
    • [wr] Fix false positive for virutal method not existing #1603
    • [wr] Ignore exceptions (permission denied f.e.) when traversing files #1569
    • [wr] Fix resolutin of virtual method
    • [ct] Fix missing properties refactor does not import class #1534
    • [ct] Fix false diagnostic for missing method #1500
    • [dl] Fix docblock definition location at class level docblocks
    • [idx] Do not try and use non-tokens for property names #1317
    • [cb] Fix rendering of array values in generated code
    • [wr] Fix arrow function completion #1303
    • [dl] Fixed off-by-one error with plain text goto definition
    • [fw] Ensure inotify is stopped before shutting down
    • [wr] properly deconstruct array in foreach
    • [lsp] import unresolved classes refactoring: Ensure only unique names are shown when asking user to select an import candidate
    • [lsp] ensure fully qualified filename is used for generate method refactoring #1313
    • [wr] detect branch determination with throw expression
    • [cr] add missing properties: correctly infer type from call expressions
    • [filesystem] Fix "too many files open" issue #1376
    • [class-mover] Fix long standing bug with aliased imports being duplicated on class move and other strange issues.
    • [lsp] Fix call to properties() on non-class in generate accessors provider.
    • [lsp] Fix unresolvable classes not being listed in code actions
    • [cb] Do not apply HTML escaping when rendering code templates
    • [wr] Promoted property docblock types not picked up #1334
    • [completion] Limit results from the search index (improve search performance significantly)

    Improvements:

    • [cmp] Show partial namespace to disambiguate class name suggestions
    • [wr] Markdown formatted member completion documentation
    • [ls] publish diagnostics on open and update
    • [ct] Add missing properties for array assignments #1640
    • [cmp] Provide variables from parent frame for anonymous use #1602
    • [ref] Increase reference finder timeout to 1 minute by default #1579
    • [cmp] Improved contextual completion
    • [rn] Fixed numerous issues
    • [rename] Fixed numerous issues
    • [compl] Allow named param completion on functions
    • [wr] Infer return type for generators
    • [lsp] Show Phpactor version info in initialize result @lalanikarim
    • [ls] Fixed class completion performance
    • [ct] Add option to disable importing global functions
    • [cmp] (Better) support for completing imported names #1490
    • [wr] reset,array_shift and array_pop stubs
    • [wr] improved ternary support
    • [log] Include a channel prefxi in log messages
    • [wr] require ext-pnctl (language server would crash otherwise)
    • [wr] handle static properly #967
    • [ls] include list of diagnostic providers in status report
    • [ct] add retutn type to generated method if it would immediately return
    • [wr] support array [] addition operator
    • [wr] support in_array type assertion
    • [wr] support for casts
    • [wr] if statement branches
    • [wr] inline type inference
    • [wr] infer param types from function docblock
    • [wr] support for Closure as a type #1413
    • [wr] expressions are evaluated as types
    • [wr] literal types and internal refactorings
    • [ls] Show error message in client if service stops unexpectedly with an error
    • [code-transform] Faithfully reproduce documented types in generated code
    • [docblock] New docblock parser to facilitate parsing complex types
    • [hover] Improve "offset" hover (mostly related to showing variable info)
    • [templates] Include templates for creating new interfaces, traits and enums
    • [wr] Resolve type from array access
    • [cb] Preserve ? operator as distinct from a union type
    • [wr] Support for class-string type (not for type inference however)
    • [completion + location] Better support for union types
    • [cs] Updated CS and converted property docblock types to actual types

    Features:

    • [-] Better constant suppoer - indexing, goto def, find references, hover, etc.
    • [cmp] Support absolute name completions
    • [ls] Lazily resolve documentation for completion items
    • [ct] Generate constructor refactoring
    • [ct] Fill object refactoring
    • [ct] Remove unused imports diagnositcs and code transformation #1758
    • [wr] Added native WR single-pass diagnostics #1700
    • [cmd] Index clean command #1691 @mamazu
    • [cmp] (re?)support completion on parent:: #1643
    • [cb] Render types based on PHP version #1655
    • [wr] Support @property-read
    • [wr] Support for mixins #990
    • [rf] Support for constants, properties and promoted properties
    • [compl] Docblock completion
    • [wr] Support for intersection types
    • [rf] Union type support for goto definition
    • [ct] Add missing PHP return types
    • [wr] Support for inference for array_map, and arrow and anonymous functions
    • [ct] Add missing @return type docblocks code transformation
    • [cmp] Explicitly enable/disable completors and disable keyword completor by default.
    • [wr] Support iterator_to_array
    • [wr] Handle constant glob to union types (@return Foo::BAR_*).
    • [lsp] show class category in offset hover info
    • [lsp] jump to types in a union type
    • [wr] Type combination
    • [wr] Support for type assertions via. is_*, instanceof etc
    • [wr] Array shape type support (types and completion)
    • [wr] Support for variadics
    • [lsp] Send rename file request to client when renaming a PSR class @przepompownia
    • [wr] Initial support for generics #1382
    • [lsp] Added generate accessors code action
    • [lsp] Added extract constant code action
    • [extension] Removed the extension manager.
    • [extension] PHPStan and Psalm extensions are now included by default.
    • [lsp] Code action to complete constructor with public properties
    • [php] Bump min. PHP version to 7.4
    • [php] Fix PHP 8.1 deprecations
    • [config] JSON schema support
    • [cli] phpactor config:init command to create or update config (to include JSON schema location)
    • [completion] Enum support (requires 8.1 PHP runtime)
    • [reference-finder] Enum support (requires 8.1 PHP runtime)
    • [php8.1] Disable deprecation warnings unless PHPACTOR_DEPRECATIONS provided.
    Source code(tar.gz)
    Source code(zip)
  • 0.18.0(Jan 3, 2022)

    Features:

    • [language-server] Import all names refactoring - @dantleech
    • [language-server] Extract expression - @BladeMF
    • [language-server] Extract method generation - @BladeMF
    • [language-server] Initial support for method generation - @BladeMF
    • [langauge-server] Support for renaming files (LSP 3.16) - @dantleech
    • [language-server] Ability to use client file events where available - @dantleech
    • [completion] Experimental support snippets for built-in functions - @weeman1337
    • [completion] Experimental support snippets for class constructos - @weeman1337
    • [completion] Added experimental flag
    • [completion] Added flag to enable / disable snippets entirely
    • [language-server] Ensure workspace is indexed before finding references - @dantleech
    • [language-server] Support for renaming class names (short only) - @dantleech
    • [language-server] Rename class members and variables - @BladeMF, @dantleech
    • [language-server] Basic support for workspace symbols.
    • [language-server] Added basic PHP linting by default.

    Improvements:

    • [completion] Improve diagnostic message for #1245 - @dantleech
    • [language-server] Allow hover template paths to be customized - @BladeMF
    • [language-server] Show warning in client if extra config keys present - @dantleech
    • [code-transform] Improved performance for unresolvable class name finder - @dantleech
    • [code-transform] Improved information in name-not-found exception - @weeman1337
    • [language-server] Do not show "class not found" diagnostics by default - @dantleech
    • [worse-reflection, etc] Update to latest tolerant parser lib to support PHP 8.1 syntax

    Bug fixes:

    • [worse-reflection] Fix handling of non-decimal integers - @Slamdunk
    • [worse-reflection] Fix variable detection in closures - @BladeMF
    • [completion] Fix snippet method completion #1172 - @BladeMF
    • [worse-reflection] Fix PHP8.0 deprecation warnings - @gregoire
    • [completion] Tests fail due to jetbrain stubs changes - @weeman1337
    • [worse-reference-finder] Do not know how to create class from type "NULL" #1246 - @dantleech
    • [worse-reflection] Property context class not propagated
    Source code(tar.gz)
    Source code(zip)
  • 0.17.1(Mar 21, 2021)

    Features:

    • [completion] Support Attribute Completion

    Bug fixes:

    • [language-server] Diagnostics do not tolerate NULL document version on save #1220
    • [worse-reflection] Unhandled exception thrown when variable name is "NULL"
    • [language-server] Unhandled exception when function not found on hover
    Source code(tar.gz)
    Source code(zip)
  • 0.17.0(Feb 6, 2021)

    2021-02-06 (0.17.0)

    Features:

    • [completion] Support for PHP named parameters - @dantleech

    • [completion] Basic Doctrine annotation completion support - @elythyr

    • [completion] References are sorted alphabetically - @elythyr

    • [completion] Show warning character if method or class is deprecated

    • [completion] Sort class names and fucntions according to proximity to current file by default - @dantleech

    • [composer] Class map only mode by default (do not register autoloader at all, do not include files)

    • [file-watcher] Experimental support for watchman

    • [indexer] CLI command for index search (mainly for debugging)

    • [indexer] PhpStorm stubs are now indexed

    • [indexer] Show memory usage and limit in progress notification.

    • [language-server] Import class/function code action and diagnostics

    • [language-server] Transform code actions and diagnostics (complete constructor, implement contracts, fix class name and add missing properties)

    • [completion] Keyword completion - @BladeMF

    • [language-server] Create class code actions - @dantleech

    • [phpactor] Update extensions after install composer hook - @dantleech

    Improvements:

    • [worse-reflection] Support for list foreach
    • [worse-reflection] Various issues around NULL and exception handling
    • [worse-reflection] Improved frame resolution performance by 99.5x - @dantleech
    • [worse-reflection] Fixed mixed up start/end positions in symbol resolver - @BladeMF
    • [language-server] Update classes on workspace update - @BladeMF
    • [language-server] New LSP protocol and general refactoring - @dantleech
    • [language-server] Support document symbols (f.e. showing code outline for document)
    • [language-server] Support symbol highlighting
    • [language-server] Support for indexing constants
    • [code-tranform] Generated accessors automatically ucfirst the property name when prefix is used. - @einenlum
    • [worse-reflection] Improved inference for property types - @elythyr
    • [worse-reflection] Include virtual members from traits - @scisssssssors
    • [code-tranform] fix invalid missing property diagnostic (#1126) - @elythyr
    • [code-transform] Improve performance for missing properries - @dantleech

    Bug fixes:

    • [code-transform] Catch unhandled exceptions - @dantleech
    • [text-document] valid php class names not detected for word-at-offset
    • [code-tranform] Return types not considered for unresolved names - @dantleech
    • [completion] Avoid reflection on NULL
    • [scf] Fix support for moving and removing folders - @Lumnn
    • [indexer] Fix indexing of static properties - @BladeMF
    • [completion] Fix signature help in nested symbols - @BladeMF
    • [worse-reflection] Static properties not resolved - @BladeMF
    • [lanaguge-server] Correctly highlight use statements against qualified names - @dantleech
    • [language-server] Fix occasional class-not-found error on code transform (due to incorrectly formatted path)
    • [worse-reflection] Do not consider "iterable" as an FQN - @elythyr
    • [code-transform] Fix trailing line on class import - @elythyr
    • [code-transform] Fix importing class names in docblocks - @elythyr
    Source code(tar.gz)
    Source code(zip)
  • 0.16.2(Jul 3, 2020)

    Improvements:

    • [worse-reflection] Support for virtual methods in interfaces - @dantleech
    • [code-transform] Fix regression with importing from root namespace
    • [dev] Support for Composer 2.
    Source code(tar.gz)
    Source code(zip)
  • 0.16.0(Jun 9, 2020)

    See blog post

    2020-06-09 (0.16.0)

    Features:

    • [vim-plugin] Ability to set custom project root strategy (#1027) - @przepompownia
    • [indexer-extension] Workspace reference finder (classes,functions,members) - @dantleech
    • [worse-reflection] Support "final" keyword - @dantleech
    • [language-server-hover] Show "final" keyword on class hover - @dantleech
    • [language-server-hover] Show inherited method documentation - @dantleech
    • [language-server-code-transform] Add command to import class - @dantleech
    • [language-server-completion] Automatically import class on completion confirm - @dantleech
    • [code-transform] Consider current class as a potential conflict for imports - @dantleech
    • [completion] Indexed class name and function completion - @dantleech
    • [indexer-extension] Support "deep references" (search over all implementaions) - @dantleech
    • [composer] Enable disbaling of autoloader inclusion via. composer.enable - @dantleech
    • [lanaguage-server-completion] Auto-import functions - @dantleech

    Improvements:

    • [code-builder] Removed functionality to "update" parameters: was very buggy. Now only new parameters will be added when updating methods via. generate method.
    • [language-server-bridge] Service to convert Phpactor Locations to LSP locations - @dantleech
    • [code-transform] Class import updates context name on alias - @dantleech
    • [documentation] Generate the configuration reference - @dantleech
    • [completion-worse] Allow completors to be disabled via completion_worse.disabled_completors - @dantleech
    • [indexer-extension] Validate search results (remove from search index if invalid).
    • [language-server] Exit session immediately if NULL given as CWD (instead of crashing).
    • [container] Adds command for introspecting the container (container:dump) - @dantleech
    • [indexer-extension] Increase priority of indexer source-locators (they should come before the composer locators) - @dantleech
    • [language-server] Show explicit meassage when indexer dies

    Bug fixes;

    • [completion] Completion limit of 32 imposed in 0.15 removed.
    • [ampfs-watch] Inotify watcher not reporting error when out of available watchers (https://github.com/phpactor/amp-fswatch/commit/1e38faadc3fb73158de9a966ee12d17992dad4fe)
      • @dantleech
    • [ampfs-watch] Buffered watcher not allowing errors to bubble up (https://github.com/phpactor/amp-fswatch/commit/b5cb54b6d01a9ec3dcbfdcca804c2d63c0e84a19)
      • @dantleech
    • [language-server] Ensure that result key is missing when NULL (some clients require it) - @dantleech
    • [code-transform] Fixed occasional whitespace issues when importing classes
    • [language-server] Support for LSP commands
    • [indexer] Fixed crash with empty class name
    Source code(tar.gz)
    Source code(zip)
  • 0.15.0(May 3, 2020)

    2020-05-03 0.15.0

    Features:

    • [reference-finder] Goto type: goto the type of the symbol under the cursor #892 - @dantleech
    • [worse-reflection] Enable cache lifetime (important for long running processes) (#929) - @dantleech
    • [language-server] Included in the core - @dantleech
    • [indexer] Indexer included in the core - @dantleech
    • [rpc] Add docblock prose to hover
    • [vim-plugin] Add support :checkhealth and provide :PhpactorStatus in terminal window (#974) - @elythyr

    Improvements:

    • [text-document] Include < and > when getting "class" name undercursor (allow implorting Foobar from an @var array<Foobar> doc
    • [completion] Option to deduplicate suggetions (#905) - @dantleech
    • [completion] Option to limit completion options - @dantleech
    • [completion] Allow completors to return true when they finish (allow final consumer to know if list is complete) - @elythyr
    • [vim-plugin] Improved command registration (#965) - @elythyr
    • [completion] Improved signature help (https://github.com/phpactor/completion/pull/31) - @elythyr
    • [completion] Completors can return if they are complete (https://github.com/phpactor/completion/pull/30) - @elythyr

    Bug fixes:

    • [code-transform] Generate accessor doesn't work on selected property (regression)
    • [vim-plugin] Configuration was not global (#964) - @elythyr
    • [class-mover] $ was removed when renaming static variables (#925) - @dantleech
    • [class-to-file] Remove duplicate candidates (fixes issue with class completion duplicate suggestions)

    Documentation:

    • [doc] Fix examples in refactoring documentation - @Great-Antique
    • [doc] Fix example mappings and add missing commands - @yeagassy
    Source code(tar.gz)
    Source code(zip)
  • 0.14.0(Mar 1, 2020)

    Features:

    • [vim-plugin] Introduces Commands for user actions (instead of having to call the functions)
    • [vim-plugin] Generate the VIM help from the plugin's code documentation
    • [code-builder] Support for nullable types - @elythyr / @dantleech
    • [code-builder] Generates typed property for PHP 7.4 - @elythyr
    • [worse-reflection] Support for PHP 7.4 property types - @dantleech / @elythyr
    • [phpactor|code-builder] Allow to override the templates by PHP version - @elythyr
    • [phpactor] Auto-detection of project PHP version - @dantleech
    • [code-transform|rpc] Import missing classes - @dantleech
    • [context-menu] Invoke menu for the nearest actionable node (i.e. you can invoke the context menu on whitespace now) - @elythyr
    • [vim-plugin] Extract functions handles motions @elythyr
    • [vim-plugin] Jumping to another file preserves the jumplist @elythyr
    • [class-mover] Jump to implementation - @dantleech

    Bug fix:

    • [code-transform] Cannot rename variable from anonymous function variable (#829) - @dantleech
    • [code-transform] Complete constructor does not take into account aliased imports (#886) - @dantleech
    • [code-builder] New aliased class imports alias not added (#860) - @dantleech
    • [worse-reflection] instanceof returns negative if class implements interface but extends another class - @dantleech
    • [worse-reflection] foreach key variable resolves as symbol type "unknown"
      • @dantleech
    • [text-document] Word splitting includes commas, and other non-word chars (#851) - @einenlum
    • [worse-reflection] Functions wrongly memonized as classes - @dantleech
    • [class-new-cli] response shows source code instead of path (#792)
    • [class-new] Wrong file path when destination shares the same namespace as source (#795).

    Improvements:

    • [vim-plugin] Better handling of json_decode errors
    • [vim-plugin] Add option to switch to open windows g:phpactorUseOpenWindows - @przepompownia
    • [vim-plugin] Stable context menu shortcuts - @dantleech (#896)
    Source code(tar.gz)
    Source code(zip)
  • 0.13.1(Aug 25, 2019)

    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.
    Source code(tar.gz)
    Source code(zip)
  • 0.12.0(Mar 3, 2019)

    BC Break:

    • [completion] Comletion API changed to accept the new TextDocument.

    Features:

    • [goto-definition] Goto definition extracted from core into separate packages including extension point.
    • [goto-definition] Support for "plain text" goto class definition, works for docblocks, and non-PHP files.
    • [completion] Do not suggest non-static method on static calls.
    • [completion] Suggest ::class constant, fixes #673
    • [completion] Docblock type injection allow name to be omitted #618
    • [application] Log errors in command error handler (for logging async completion errors using the complete command)
    • [worse-reflection] Support variadic arguments #621
    • [worse-reflection] Support for virtual methods #682
    • [worse-reflection] Support for evaluating clone()
    • [worse-reflection] Support for registering custom virtual class member providers.
    • [vim-plugin] Find references shows context line #706
    • [code-builder] Trait support, thanks @dshoreman

    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
    • [worse-reflection] Support union catch #711

    Bug fixes:

    • [completion] Fix type resolution immediately following docblock #678
    • [completion] Include $ on static properties #677
    • [extension-manager] Do not install dev dependencies for extensions #674
    • [class-to-file] sort candidates by path length #712 thanks @greg0ire
    • [code-transform] Rename variable includes anonumous function use #713
    • [worse-reflection] Do not downcast union types in named docblocks #711
    • [code-transform] Extract method sometimes creates method in new class in same file #730
    • [code-transform]n Add Missing Properties added trait props in new class #726
    Source code(tar.gz)
    Source code(zip)
  • 0.11.0(Dec 2, 2018)

    BC Break:

    • [rpc] All handlers must now be registered with the "name" attribute.

    Features:

    • [worse-reflection-extension] Allows new framewalkers to be registered (i.e. new ways to infer types).
    • [config] Support loading config from JSON files

    Improvements:

    • [rpc] Handlers are lazy loaded, improving the RPC baseline latency
    Source code(tar.gz)
    Source code(zip)
  • 0.10.0(Nov 26, 2018)

    BC Break:

    • [php] Bumped minimum PHP version to 7.1
    • [config] Renamed reflection.enable_cache => worse_reflection.enable_cache
    • [config] Renamed reflection.stub_directory => worse_reflection.stub_directory
    • [config] Renamed autoload => composer.autoloader_path
    • [config] Renamed autoload.deregister => composer.autoload_deregister

    Features:

    • [ExtensionManager] Facility to dynamically add extensions to Phpactor
    • [RPC] extension_list, extension_remove and extension_install handlers.
    • [Completion] Class alias completor, #592
    • [CodeTransform] Cycle class member visiblity #521
    • [RPC] Adds hover handler which shows the synopsis of the symbol underneath the cursor.
    • [Completion] Introduction of a type-specific completion registry, to allow registration of completors for different sources, e.g. cucumber.

    Improvements:

    • [Application] Do not eagerly load commands (~20% baseline improvement)
    • [Transform] Complete constructor will work work on ! interfaces #597
    • [Transform] Import missing types on generate method
    • [Transform] Adds return types on generate method
    • [CodeBuilder] Do not add additional spaces when importing classes
    • [Completion] Completion qualifiers to allow reusable way to determine candidate completors.
    • [Vim Plugin] The "label" for omni complete suggestions is now truncated to a specified length.

    Other:

    • [Console] Config dump now only shows JSON format
    • [Completion] Completors now yield suggestions and problems are no longer returned. The issues key returned from suggestions is now deprecated.
    • [Vim Plugin] The "omni error" feature has been removed (as completion no longer returns them).
    Source code(tar.gz)
    Source code(zip)
  • 0.9.0(Sep 12, 2018)

    BC Breaks:

    • [RPC Plugins] a new update_file_source method is now returned by most code-transforming RPC handlers (e.g. import class, complete constructors). this is used in place of replace_file_source. See https://github.com/phpactor/phpactor/issues/550 for details

    Deprecations:

    • [Completion|Completion Plugins] Serialized key info is deprecated in favour of short_description and could be removed, at least, in 0.10.0.

    Features:

    • [RPC] open_file command now has a force_reload flag
    • [Completion|Vim Plugin] Auto-import class names (thanks @kermorgant for improvements)
    • [Completion] Suggestion types now have more explicit types (e.g. method, constant, class, rather than the VIM-centric kind characters).
    • [WorseReflection] Fallback to inferring property types from constructor assignments.
    • [RPC|Vim Plugin] RPC handler for file class info (e.g. namespace, class FQN) and VIM functions new phpactor#getNamespace() and phpactir#getClassFullName(). Thanks @voronkovich
    • [WorseReflection] Reflect any user-defined functions parsed when including the Composer autoloader. #562
    • [WorseReflection] Support trait alias maps. #540
    • [RPC] Return semantic RPC protocol version in response (starting at 1.0.0).
    • [Completion] Complete constructor parameters.

    Improvements:

    • [Rpc|VIM Plugin] Source code is now updated (by way of a diff algorithm) not replaced. The cursor position and undo history are maintained.
    • [VIM Plugin] Regression test for Transform RPC call.
    • [Application] Make class completion candidate limit configurable.
    • [WorseReflection] Foreach Frame walker: inject keys in foreach loop, #578
    • [RPC] find references: Do not return files with no concrete references, #581
    • [CodeBuilder] Tracks which nodes have been modified after factory creation.
    • [ClassToFile] Composer class-to-file strategy no longer discards inferior prefix lengths from consideration, fixes #576

    Bug fixes:

    • [Completion] Fixed multi-byte issue with class completor.
    • [VIM Plugin] Allow duplicate name suggestions (e.g. same class short-name different FQNs) in omni-complete results.
    • [CodeBuilder] Builder attempts to act on a string (when return type is f.e. self). #529
    • [WorseReflection] Fix fatal error when Parameter#getName() returns NULL in SymbolContextResolver. #533
    • [CodeBuilder] Fix for unrelated methods being updated, #583
    Source code(tar.gz)
    Source code(zip)
  • 0.8.0(Aug 3, 2018)

    Improvements:

    • [WorseReflectoin] Smoke test for find parsing errors.
    • [WorseReflection] Improved efficiency for frame building. non-variable.
    • [Completion] Improved multi-byte performance, fixes #537 thanks @weirdan

    Bug fixes:

    • [WorseReflection] Handle fatal error on incomplete extends.
    • [WorseReflection] Handle fatal error on instanceof coercion.
    • [Completion] Fixed class member container resolution accuracy.
    • [SourceCodeFilesystem] Quote regular expressions in file list filter, fixes #543

    Misc

    • [RPC] Refactored handlers to define input requirements more explicitly.
    Source code(tar.gz)
    Source code(zip)
  • 0.7.0(Jul 2, 2018)

    Features:

    • [CodeTransforn] Extract expression
    • [Application] Changed behavior of Transform command: accepts globs, shows diffs and writes to files (rather than just dumping them to stdout if they changed).
    • [Completion] Support constant completion.

    Improvements:

    • [Application] Use version from composer instead of hard-coded version. Thanks @weirdan
    • [Completion] Support namespaced functions, fixes #473
    • [Completion] Sort completion results alphabetically.
    • [Docs] Added section on completion.
    • [WorseReflection] Explicitly do not support anonymous classes when resolving nodes, fixes #505

    Bug fixes:

    • [WorseReflection] Do not parse non-PHP files when building stub cache, fixes #510
    • [Completion] Fixed last non-whitespace char detection, fixes #504

    Misc

    • Downgraded composer to 1.x as 2.x-dev now requires PHP 7.2
    Source code(tar.gz)
    Source code(zip)
  • 0.6.0(Jun 16, 2018)

    2018-06-16 0.6.0 0.6.0

    Features:

    • [CodeTransform] Transformer to fix namesapce / class name #474

    Improvements:

    • [WorseReflection] Resolve UseNameVariables (e.g. context menu use ($f<>oo)). #466
    • [Application] Improved status (show current version) #481
    • [CodeTransform] Better handling of new file generation
    • [Docs] Added Development section

    Bug fixes:

    • [WorseReflection] access property on null error when resolving incomplete function variable use.
    • [CodeTransform] Generate method does can use pseudo type for return type #486
    • [Vim Plugin] Goto reference in a modified file causes warning #477.
    • [Application] Overridden CWD not being passed to Paths (affected config file resolution).
    • [Application] Fixed find references regression (only the current class wasn't being checked for references..)
    Source code(tar.gz)
    Source code(zip)
  • 0.5.0(May 20, 2018)

    Features:

    • [Completion] Parameter completion, suggests variables that are valid for the parameter position.

    Refactoring:

    • [SourceCodeFilesystem] Public API accepts scalar paths in addition to value objects.

    Improvements:

    • [Documentation] Updated VIM completion plugin docs including phpactor/ncm-phpactor fork (mainline is not maintained currently).
    Source code(tar.gz)
    Source code(zip)
  • 0.4.0(May 1, 2018)

    Features:

    • [Navigation] Reflection navigation: navigate to related classes (currently supports parent class and interfaces).
    • [Completion] Built-in function completion, #371
    • [Completion] Experimental class completion..
    • [GotoDefinition] Goto function definitions (currently limited to functions defined by the PHPStorm stubs).

    Improvements:

    • [ClassMover] Find/replace references will only traverse possible classes when givn a known class member #349 (also it will no longer ask the scope, instead defaulting to either composer or full-filesystem search depending on env).
    • [ClassMover] (RPC) Will update current (unsaved) source.
    • [vim-plugin] Correctly handle expanding class when at beginning of word, #438 thanks @greg0ire
    • [vim-plugin] Reload file before replacing contents, fixes #445
    • [vim-plugin] File references, do not show quick fix list if all references are in current file.
    • [vim-plugin] Completion - trigger on any word-like, fixes #443
    • [WorseReflection] Support for @property type override (but doesn't create a "pretend" property).
    • [Application] Pass the Phpactor vendor directory as an argument to the Application and include vendor files (e.g. stubs) relative to that, fixes #460
    • [Application] Use XDG data directory for cache.
    • [Documentation] Typo fix, thanks @pierreboissinot

    Bug fixes:

    • [RPC] Import class from context menu, uses context class path instead of current #448
    • [CodeBuilder] Regression where already-existing names are imported fixes #452
    • [Application] Fixed location of cache directory.
    • [Application] Fixed binary path, thanks @talbergs
    • [RPC] Specify completion type for text input, fixes #455

    Non-functional:

    • [WorseReflection] Full support for reflecting functions.
    • [WorseReflection] All member collections extend common interface, class-likes have a members(): ReflectionMemberCollection method.
    • [Completion] Refactored to make interface more efficient, decoupled formatting from completion.
    • [Completion] Made existing completors a subset of tolerant-parser completors (means there is one "chain" tolerant completor which delegates to the other completors and we only have to parse once).
    Source code(tar.gz)
    Source code(zip)
  • 0.3.0(Apr 21, 2018)

    0.3.0

    Features:

    • [Application] Disable XDebug by default, very much improve performance. Fixes #317

    Improvements:

    • [Completion] Do not evaluate left operand when completing expression, #380
    • [RPC] Request validation (no more undefined index errors).
    • [WorseReflection] Classes inherit constants from interfaces.
    • [CodeBuilder] Use statements added after the first lexigraphically inferior existing use-statement, fixes #176. Thanks @greg0ire.

    Bug fixes:

    • [WorseReflection] Associated class for trait methods is the trait itself, not the class it's used in, #412
    • [WorseReflection] Do not evaluate assignments with missing tokens.
    • [SourceCodeFilesystem] Non-existing paths not ignored.
    • [CodeTransform] Indentation not being taken into account for code updates (fixes #423).
    • [WorseReflection] Tolerate incomplete if statements, fixes #424
    • [WorseReflection] Tolerate missing token in expression evaluator #430
    Source code(tar.gz)
    Source code(zip)
  • 0.2.0(Apr 14, 2018)

    0.2.0

    Features:

    • [VIM Plugin] g:phpactorBranch can be used to set the update branch.
    • [WorseReflection] Support parenthesised expressions (i.e. complete for (new Foobar())->), #279

    Improvements:

    • [Application] Large restructuring of code, almost everything is now in an extension.
    • [WorseReflection] All class members implement common interface, fixes #283
    • [VIM Plugin] Disable the omni-complete errors by default, as this breaks the assumptions of some auto-complete managers (set g:phpactorOmniError to v:true to enable again), fixes #370.
    • [VIM Plugin] Only define settings if not already set.
    • [WorseReflection] Type#__toString represents arrays and collections
    • [WorseReflection] Improved Type class.
    • [Completion] Use partial match to filter class members, fixes #321
    • [phpactor.vim] Correctly return start position for omni-complete
    • [Docblock] Be tolerant of invalid tags, fixes #382
    • [WorseReflection] Refactored FrameBuilder: Extracted walkers
    • [WorseReflection] Expression evaluator.

    Bugfixes:

    • [SourceCodeFilesystem] Support symlinks in vendor dir #396
    • [WorseReflection] trait lists were not being correctly interpreted #320
    • [WorseReflection] could not find class "NULL"...
    • [SourceCodeFilesystem] Support symlinks in vendor dir #396
    • [Dockblock] Tolerate extra spaces, fixes #365
    • [Completion] Was using the type of the first declared variable, instead of the last before the offset.
    • [Completion] Used Type#__toString to reflect class.
    • [CodeBuilder] Extract method rewrites arguments #361
    • [VimPlugin] Fixed goto definition, #398
    • [WorseReflection] problem with name import (thanks @adeslade)
    Source code(tar.gz)
    Source code(zip)
  • 0.1.0(Apr 2, 2018)

    First tagged version, changes from 30th March.

    • CodeTransform
      • New implementation of class import
        • Offer to alias existing classes,
        • Error message if class in same namespace,
    • Completion
    • Documentation
      • Configuration documentation.
      • Better Drupal integration (thanks @fenetikm).
      • VIM Plugin documentation (:help phpactor) (thanks @joereynolds)
    • RPC
      • Request Replay: replay RPC requests made from the editor.
    • WorseReflection
      • Docblocks for Arrays and simple Collection<Type> supported.
      • Foreach supported.
      • Method @param supported.
    • Infrastructure
      • All packages are on packagist.
      • Do not store PHPBench results on Travis if PR is a fork.
    • Various bug fixes everywhere.
    Source code(tar.gz)
    Source code(zip)
Owner
Phpactor
PHP Refactoring and Introspection tool
Phpactor
Instant Upgrades and Instant Refactoring of any PHP 5.3+ code

Rector - Speedup Your PHP Development Rector helps you with 2 areas - major code changes and in daily work. Do you have a legacy code base? Do you wan

RectorPHP 6.5k Jan 8, 2023
Multi-language translate module for Silverstripe, without having to manage separate site trees.

Silverstripe-fluent - Multi-language translate module for Silverstripe, without having to manage separate site trees.

null 91 Dec 30, 2022
PHPMD is a spin-off project of PHP Depend and aims to be a PHP equivalent of the well known Java tool PMD. PHPMD can be seen as an user friendly frontend application for the raw metrics stream measured by PHP Depend.

PHPMD PHPMD is a spin-off project of PHP Depend and aims to be a PHP equivalent of the well known Java tool PMD. PHPMD can be seen as an user friendly

PHP Mess Detector 2.1k Jan 8, 2023
Beautiful and understandable static analysis tool for PHP

PhpMetrics PhpMetrics provides metrics about PHP project and classes, with beautiful and readable HTML report. Documentation | Twitter | Contributing

PhpMetrics 2.3k Dec 22, 2022
Deptrac is a static code analysis tool for PHP that helps you communicate, visualize and enforce architectural decisions in your projects

Deptrac is a static code analysis tool for PHP that helps you communicate, visualize and enforce architectural decisions in your projects. You can freely define your architectural layers over classes and which rules should apply to them.

QOSSMIC GmbH 2.2k Dec 30, 2022
PHP Architecture Tester - Easy to use architectural testing tool for PHP :heavy_check_mark:

Easy to use architecture testing tool for PHP Introduction ?? PHP Architecture Tester is a static analysis tool to verify architectural requirements.

Carlos A Sastre 765 Dec 30, 2022
A tool to automatically fix PHP Coding Standards issues

PHP Coding Standards Fixer The PHP Coding Standards Fixer (PHP CS Fixer) tool fixes your code to follow standards; whether you want to follow PHP codi

null 11.6k Jan 3, 2023
PHP Static Analysis Tool - discover bugs in your code without running it!

PHPStan - PHP Static Analysis Tool PHPStan focuses on finding errors in your code without actually running it. It catches whole classes of bugs even b

PHPStan 11.6k Dec 30, 2022
A PHP code-quality tool

GrumPHP Sick and tired of defending code quality over and over again? GrumPHP will do it for you! This composer plugin will register some git hooks in

PHPro 3.9k Jan 1, 2023
A tool for quickly measuring the size of a PHP project.

PHPLOC phploc is a tool for quickly measuring the size and analyzing the structure of a PHP project. Installation This tool is distributed as a PHP Ar

Sebastian Bergmann 2.3k Jan 4, 2023
A static php code analysis tool using the Graph Theory

Mondrian Ok guyz, you have a master degree in Graph Theory, you follow Law of Demeter and you live on S.O.L.I.D principles ? Let's have some Fun ! (^ω

Florent Genette 391 Nov 30, 2022
PHPCheckstyle is an open-source tool that helps PHP programmers adhere to certain coding conventions.

PHPCheckstyle Overview PHPCheckstyle is an open-source tool that helps PHP programmers adhere to certain coding conventions. The tools checks the inpu

PHPCheckstyle 157 Dec 5, 2022
A static analysis tool for finding errors in PHP applications

Psalm Psalm is a static analysis tool for finding errors in PHP applications. Installation To get started, check out the installation guide. Live Demo

Vimeo 5k Jan 2, 2023
A web tool to explore the ASTs generated by PHP-Parser.

phpast.com A web tool to explore the ASTs generated by PHP-Parser. About This web tool provides a GUI for exploring the AST of your PHP code. You can

Ryan Chandler 23 Nov 29, 2022
A tool to automatically fix PHP Coding Standards issues by Dragon Code.

A tool to automatically fix PHP Coding Standards issues by Dragon Code.

The Dragon Code 24 Aug 27, 2022
Tool helping us to analyze software projects

Qafoo Quality Analyzer This software is a tool to visualize metrics and source code. We use this software for Code Reviews together with our customers

Qafoo GmbH 494 Dec 29, 2022
Baseline tool for PHP_CodeSniffer

PHP_CodeSniffer Baseliner This tool enables you to integrate PHP_CodeSniffer into an existing project by automatically adding phpcs:ignore and phpcs:d

ISAAC 13 Nov 26, 2022
All In 1 Spam Tool For Termux Users Subscribe Us (Noob Hackers) some shit heads are trying to abuse this script so don't worry about them ...let them hallucinate ...but you are free to use this script

ABOUT TOOL : SPAMX is a all in one Bombing+Spam tool from this tool you can send anonymous messages to your target without showing your real number an

N17R0 449 Jan 7, 2023
A static analysis tool for security

progpilot A static analyzer for security purposes Only PHP language is currently supported Installation Option 1: use standalone phar Download the lat

null 271 Dec 27, 2022