Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Option --prepend only works, if supplied as first option #4137

Closed
soerenbernstein opened this issue Mar 9, 2020 · 2 comments
Closed

Option --prepend only works, if supplied as first option #4137

soerenbernstein opened this issue Mar 9, 2020 · 2 comments

Comments

@soerenbernstein
Copy link

soerenbernstein commented Mar 9, 2020

Q A
PHPUnit version 7.5.20 - affected version probably 7.4 and newer (since #3290)
PHP version 7.2.24
Installation Method Composer

Summary

Providing the prepend option to phpunit only works, if provides as first option.

The getopt call in phpunit.php:51 will return an empty array, if the prepend option is not the first option.

Current behavior

If the prepend option is provided as first option, the supplied source file will be included. If it is not the first option, the additional source file will be ignored.

How to reproduce

Use prepend option in any other position then the first one.
I tried to get the xdebug filter to work with TeamCity. Didn't work, because prepend is not the first provided option.

Expected behavior

Options should always be processed regardless of supplied order

@soerenbernstein soerenbernstein added the type/bug Something is broken label Mar 9, 2020
@sebastianbergmann
Copy link
Owner

This is working as intended. And quite frankly, I would rather remove --prepend than change it at this point. It is an ugly hack that is no longer required thanks to the existence of PCOV. And "soon" Xdebug 3 will also make this superfluous.

@sebastianbergmann sebastianbergmann removed the type/bug Something is broken label Mar 9, 2020
@soerenbernstein
Copy link
Author

OK, I understand. But some documentation regarding this odd behaviour of the prepend option would be nice.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants