Skip to content

Cannot call phpactor#ContextMenu() #902

Closed

Description

@przepompownia

I have updated phpactor with dependencies to check #901

Phpactor returned an error: PHP Fatal error:  Uncaught TypeError: Argument 1 passed to Phpactor\Extension\ContextMenu\Model\ContextMenu::fromArray() must be of the type array
, null given, called in /home/user/.vim/bundle/phpactor/lib/Extension/ContextMenu/ContextMenuExtension.php on line 29 and defined in /home/user/.vim/bundle/phpactor/lib/E
xtension/ContextMenu/Model/ContextMenu.php:30                                                                                                                                 
Stack trace:                                                                                                                                                                  
#0 /home/user/.vim/bundle/phpactor/lib/Extension/ContextMenu/ContextMenuExtension.php(29): Phpactor\Extension\ContextMenu\Model\ContextMenu::fromArray()                    
#1 /home/user/.vim/bundle/phpactor/vendor/phpactor/container/lib/PhpactorContainer.php(79): Phpactor\Extension\ContextMenu\ContextMenuExtension->Phpactor\Extension\ContextM
enu\{closure}()                                                                                                                                                               
#2 /home/user/.vim/bundle/phpactor/vendor/phpactor/rpc-extension/lib/Registry/LazyContainerHandlerRegistry.php(40): Phpactor\Container\PhpactorContainer->get()             
#3 /home/user/.vim/bundle/phpactor/vendor/phpactor/rpc-extension/lib/RequestHandler/RequestHandler.php(26): Phpactor\Extension\Rpc\Registry\LazyContainerH in /home/user/.
vim/bundle/phpactor/lib/Extension/ContextMenu/Model/ContextMenu.php on line 30 
 $ phpactor  extension:update                                                                                                          
Loading composer repositories with package information                                                                                                                        
Updating dependencies                                                                                                                                                         
Your requirements could not be resolved to an installable set of packages.                                                                                                    
                                                                                                                                                                              
  Problem 1                                                                                                                                                                   
    - The requested package phpactor/completion-worse-extension 0.1.2 is satisfiable by phpactor/completion-worse-extension[0.1.2] but these conflict with your requirements o
r minimum-stability.                                                                                                                                                          
  Problem 2                                                                                                                                                                   
    - phpactor/workspace-query 0.1.3 requires phpactor/reference-finder ^0.2 -> satisfiable by phpactor/reference-finder[0.2.x-dev] but these conflict with your requirements or minimum-stability.                                                                                                                                                         
    - phpactor/workspace-query 0.1.3 requires phpactor/reference-finder ^0.2 -> satisfiable by phpactor/reference-finder[0.2.x-dev] but these conflict with your requirements or minimum-stability.                                                                                                                                                         
    - Installation request for phpactor/workspace-query ^0.1.3 -> satisfiable by phpactor/workspace-query[0.1.3].                                                             
                                                                                                                                                                              
<warning>Running update with --no-dev does not mean require-dev is ignored, it just means the packages will not be installed. If dev requirements are blocking the update you have to resolve those problems.</warning>

Activity

  1. przepompownia commented on Mar 5, 2020

    @przepompownia
    ContributorAuthor

    The cause is in conflict markers that are not removed from menu.json.

  2. przepompownia commented on Mar 5, 2020

    @przepompownia
    ContributorAuthor

    After upgrading minimal PHP version to 7.3 we can use JSON_THROW_ON_ERROR and give more expressive exception messages.

  3. dantleech commented on Mar 5, 2020

    @dantleech
    Collaborator

    😬 quite embarrassing that the tests didn't cover that

  4. dantleech commented on Mar 5, 2020

    @dantleech
    Collaborator

    Thanks for the fix #903

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions