laravel / dusk

Laravel Dusk provides simple end-to-end testing and browser automation.
https://laravel.com/docs/dusk
MIT License
1.87k stars 320 forks source link

Unknown options --verbose / -v / --quiet / -q #1103

Closed adi64 closed 4 months ago

adi64 commented 4 months ago

Dusk Version

8.2.0

Laravel Version

11.7.0

PHP Version

8.3.7

PHPUnit Version

11.1.3

Database Driver & Version

any

Description

When running php artisan dusk --help, a list of options is given, of which some are seemingly not implemented or aren't properly passed to PHPUnit anymore. So far I've found -q / --quiet and -v / -vv / -vvv / --verbose.

Tested on a fresh Laravel project with Dusk.

Steps To Reproduce

Create a fresh Laravel project and install Dusk.

List supported options:

% php artisan dusk --help
Description:
  Run the Dusk tests for the application

Usage:
  dusk [options]

Options:
      --browse          Open a browser instead of using headless mode
      --without-tty     Disable output to TTY
  -h, --help            Display help for the given command. When no command is given display help for the list command
  -q, --quiet           Do not output any message
  -V, --version         Display this application version
      --ansi|--no-ansi  Force (or disable --no-ansi) ANSI output
  -n, --no-interaction  Do not ask any interactive question
      --env[=ENV]       The environment the command should run under
  -v|vv|vvv, --verbose  Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug

Try to use a supported option to increase or decrease verbosity:

% php artisan dusk -q
PHPUnit 11.1.3 by Sebastian Bergmann and contributors.

Unknown option "-q"

or

% php artisan dusk --verbose
PHPUnit 11.1.3 by Sebastian Bergmann and contributors.

Unknown option "--verbose"
driesvints commented 4 months ago

Hi @adi64. We're a bit in a grey area here as we still support PHPUnit v10 which still has these. So for now we're not going to change anything here. If we drop PHPUnit v10 at some point these will also be removed. Thanks

adi64 commented 4 months ago

The project where I noticed the bug is actually still on Laravel 10, PHPUnit 10.5.20 and Dusk 8.2.0. It's the same there:

% php artisan dusk --verbose
PHPUnit 10.5.20 by Sebastian Bergmann and contributors.

Unknown option "--verbose"

I just wanted to confirm that it's also present on the currently newest version.

driesvints commented 4 months ago

Hey @adi64. I checked with @crynobone and apparently these are global options from symfony console that we cannot disable. This also doesn't work for php artisan test --verbose for example. So there's nothing we can do about it.