lumen-testing icon indicating copy to clipboard operation
lumen-testing copied to clipboard

Slight incompatibility with Lumen 5.8 under PHP 7.1, and PHPunit 7.5.18

Open HenkPoley opened this issue 5 years ago • 2 comments

The signature of AlbertCht\Lumen\Testing\Concerns\InteractsWithAuthentication::be($user, $driver = NULL) is not compatible in lumen-testing v1.1 from Packagist.

In TestCase.php line 9:
  Declaration of AlbertCht\Lumen\Testing\Concerns\InteractsWithAuthentication  
  ::be($user, $driver = NULL) should be compatible with Laravel\Lumen\Testing  
  \TestCase::be(Illuminate\Contracts\Auth\Authenticatable $user, $driver = NU  
  LL)     

For ease of reading:

  Declaration of 
AlbertCht\Lumen\Testing\Concerns\InteractsWithAuthentication::be($user, $driver = NULL)
 should be compatible with 
Laravel\Lumen\Testing\TestCase::be(Illuminate\Contracts\Auth\Authenticatable $user, $driver = NU  
  LL)     

HenkPoley avatar Dec 24 '19 10:12 HenkPoley

I suspect this only triggers when you use Auth in your Lumen API.

HenkPoley avatar Jan 03 '20 07:01 HenkPoley

It would be nice to roll a v1.1_.1_ composer package with some of the fixes.

Today I bumped into this again when running tests that made find this bug.

HenkPoley avatar Jul 07 '21 12:07 HenkPoley