marlonfan / coc-phpls

🐭 php language server for coc.nvim
MIT License
212 stars 16 forks source link

Bug/feature/missingdocumentation: How to include phpunit tokens? #100

Open artfulrobot opened 2 years ago

artfulrobot commented 2 years ago

Describe the bug

While working on phpunit classes, diagnostics show up lots of missing methods making an error on almost every line. This is because it doesn't know about the phpunit classes.

To Reproduce

e.g. this:

<?php
class ParticipantTest extends \PHPUnit\Framework\TestCase {
  function testSomething() {
    $this->assertTrue(TRUE);
  }
}

Will show an error Undefined type 'PHPUnit\Framework\TestCase'. and Undefined method 'assertTrue'.

Expected behavior

I'd like to be able to say "hey, you should really look in phpunit.phar for extra symbols"

Screenshots

image

Desktop (please complete the following information):