laravel / framework

The Laravel Framework.
https://laravel.com
MIT License
32.69k stars 11.05k forks source link

`artisan test` hides PHPUnit deprecations #46168

Closed iBotPeaches closed 1 year ago

iBotPeaches commented 1 year ago

Steps To Reproduce::

(have a test with a PHPUnit deprecation)

  1. Run tests with php artisan test
  2. Run tests with ./vendor/bin/phpunit

Description:

Notice that deprecation are not thrown/visible until PHPUnit is invoked directly.

(php artisan test)

  Tests:    232 passed (626 assertions)
  Duration: 12.57s

(vendor/bin/phpunit)

➜  Leaf git:(master) ./vendor/bin/phpunit
PHPUnit 10.0.7 by Sebastian Bergmann and contributors.

Runtime:       PHP 8.2.1
Configuration: xxx/PHP/Leaf/phpunit.xml

D..............................................................  63 / 232 ( 27%)
............................................................... 126 / 232 ( 54%)
............................................................... 189 / 232 ( 81%)
...........................................                     232 / 232 (100%)

Time: 00:11.870, Memory: 68.50 MB

There were 19 PHPUnit deprecations:
1) Tests\Unit\Models\CsrModelTest::testRankAttribute
Data Provider method Tests\Unit\Models\CsrModelTest::rankDataProvider() is not static
...
nunomaduro commented 1 year ago

To be fair this is a Collision issue. Going to work this week on this.