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

Invalid regular expression for --filter causes PHP Warning #2375

Closed
theseer opened this issue Nov 28, 2016 · 0 comments
Closed

Invalid regular expression for --filter causes PHP Warning #2375

theseer opened this issue Nov 28, 2016 · 0 comments

Comments

@theseer
Copy link
Collaborator

theseer commented Nov 28, 2016

When executing PHPUnit as follows

phpunit --filter */*test*

the specified string gets passed to preg_match but does not compile (which makes sense) but also causes PHPUnit to output PHP Warnings and stack traces:

PHP Warning:  preg_match(): Compilation failed: nothing to repeat at offset 0 in phar:///home/theseer/.phive/phars/phpunit-5.6.5.phar/phpunit/Runner/Filter/Test.php on line 107
PHP Stack trace:
PHP   1. {main}() /home/theseer/.phive/phars/phpunit-5.6.5.phar:0
PHP   2. PHPUnit_TextUI_Command::main() /home/theseer/.phive/phars/phpunit-5.6.5.phar:573
PHP   3. PHPUnit_TextUI_Command->run() phar:///home/theseer/.phive/phars/phpunit-5.6.5.phar/phpunit/TextUI/Command.php:115
PHP   4. PHPUnit_TextUI_TestRunner->doRun() phar:///home/theseer/.phive/phars/phpunit-5.6.5.phar/phpunit/TextUI/Command.php:185
PHP   5. PHPUnit_TextUI_TestRunner->processSuiteFilters() phar:///home/theseer/.phive/phars/phpunit-5.6.5.phar/phpunit/TextUI/TestRunner.php:165
PHP   6. PHPUnit_Framework_TestSuite->injectFilter() phar:///home/theseer/.phive/phars/phpunit-5.6.5.phar/phpunit/TextUI/TestRunner.php:147
PHP   7. PHPUnit_Framework_TestSuite->injectFilter() phar:///home/theseer/.phive/phars/phpunit-5.6.5.phar/phpunit/Framework/TestSuite.php:1018
PHP   8. PHPUnit_Framework_TestSuite->injectFilter() phar:///home/theseer/.phive/phars/phpunit-5.6.5.phar/phpunit/Framework/TestSuite.php:1018
PHP   9. FilterIterator->rewind() phar:///home/theseer/.phive/phars/phpunit-5.6.5.phar/phpunit/Framework/TestSuite.php:1016
PHP  10. PHPUnit_Runner_Filter_Test->accept() phar:///home/theseer/.phive/phars/phpunit-5.6.5.phar/phpunit/Framework/TestSuite.php:1016
PHP  11. preg_match() phar:///home/theseer/.phive/phars/phpunit-5.6.5.phar/phpunit/Runner/Filter/Test.php:107
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

1 participant