-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Open
Milestone
Description
Describe the bug
Hello, I have hundred of PHPStan errors with v4.28.1 because of protected KernelBrowser $client; of AbstractCrudTestCase which can be null now.
// final class UserCrudControllerTest extends AbstractCrudTestCase
public function testIndexPageException(): void
{
$this->client->request('GET', $this->generateIndexUrl());
>>
39 Cannot call method request() on Symfony\Bundle\FrameworkBundle\KernelBrowser|null.
🪪 method.nonObject
To Reproduce
final class UserStepCrudControllerTest extends AbstractCrudTestCase
public function testIndexPageException(): void
{
$this->client->request('GET', $this->generateIndexUrl());
// self::getClient()->request('GET', $this->generateIndexUrl());
self::assertResponseRedirects();
}
PHPStan level max:
vendor/bin/phpstan analyse -c phpstan.neon --memory-limit 1G -vv
(OPTIONAL) Additional context
39 Cannot call method request() on Symfony\Component\BrowserKit\AbstractBrowser|null.
🪪 method.nonObject
46 Parameter #1 $client of method App\Tests\Admin\Controller\Admin\UserStepCrudControllerTest::loginAsCOil() expects
Symfony\Bundle\FrameworkBundle\KernelBrowser, Symfony\Component\BrowserKit\AbstractBrowser|null given.
🪪 argument.type
47 Cannot call method request() on Symfony\Component\BrowserKit\AbstractBrowser|null.
🪪 method.nonObject
54 Parameter #1 $client of method App\Tests\Admin\Controller\Admin\UserStepCrudControllerTest::loginAsCOil() expects
Symfony\Bundle\FrameworkBundle\KernelBrowser, Symfony\Component\BrowserKit\AbstractBrowser|null given.
🪪 argument.type
55 Cannot call method request() on Symfony\Component\BrowserKit\AbstractBrowser|null.
🪪 method.nonObject
62 Parameter #1 $client of method App\Tests\Admin\Controller\Admin\UserStepCrudControllerTest::loginAsCOil() expects
Symfony\Bundle\FrameworkBundle\KernelBrowser, Symfony\Component\BrowserKit\AbstractBrowser|null given.
🪪 argument.type
63 Cannot call method request() on Symfony\Component\BrowserKit\AbstractBrowser|null.
🪪 method.nonObject
70 Parameter #1 $client of method App\Tests\Admin\Controller\Admin\UserStepCrudControllerTest::loginAsCOil() expects
Symfony\Bundle\FrameworkBundle\KernelBrowser, Symfony\Component\BrowserKit\AbstractBrowser|null given.
🪪 argument.type
71 Cannot call method request() on Symfony\Component\BrowserKit\AbstractBrowser|null.
🪪 method.nonObject
78 Parameter #1 $client of method App\Tests\Admin\Controller\Admin\UserStepCrudControllerTest::loginAsCOil() expects
Symfony\Bundle\FrameworkBundle\KernelBrowser, Symfony\Component\BrowserKit\AbstractBrowser|null given.
🪪 argument.type
79 Cannot call method followRedirects() on Symfony\Component\BrowserKit\AbstractBrowser|null.
🪪 method.nonObject
80 Cannot call method request() on Symfony\Component\BrowserKit\AbstractBrowser|null.
🪪 method.nonObject
82 Cannot call method request() on Symfony\Component\BrowserKit\AbstractBrowser|null.
🪪 method.nonObject
89 Parameter #1 $client of method App\Tests\Admin\Controller\Admin\UserStepCrudControllerTest::loginAsCOil() expects
Symfony\Bundle\FrameworkBundle\KernelBrowser, Symfony\Component\BrowserKit\AbstractBrowser|null given.
🪪 argument.type
90 Cannot call method followRedirects() on Symfony\Component\BrowserKit\AbstractBrowser|null.
🪪 method.nonObject
91 Cannot call method request() on Symfony\Component\BrowserKit\AbstractBrowser|null.
🪪 method.nonObject
93 Cannot call method request() on Symfony\Component\BrowserKit\AbstractBrowser|null.
🪪 method.nonObject
------ -------------------------------------------------------------------------------------------------------------------
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels