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

--no-coverage option to ovewrite config file #920

Closed
drgomesp opened this issue May 21, 2013 · 6 comments
Closed

--no-coverage option to ovewrite config file #920

drgomesp opened this issue May 21, 2013 · 6 comments

Comments

@drgomesp
Copy link

The default configuration for all my projects is set to generate html code coverage reports.

Is there anyway I can run the phpunit command at a given time and not generate the code coverage reports without having to change the config file?

This would be something like a --no-coverage option.

@whatthejeff
Copy link
Contributor

Unfortunately, this is not something PHPUnit currently supports and @sebastianbergmann has stated previously that he's not interested in adding new arguments/options.

The easiest solution is to maintain a separate configuration file without logging enabled and switch between the two with the --configuration option.

Another option is to disable Xdebug on your system. Tools like phpbrew make enabling/disabling extensions on the fly very simple. Alternatively, you should be able to roll your own solution without too much effort.

@drgomesp
Copy link
Author

...and @sebastianbergmann has stated previously that he's not interested in adding new arguments/options.

Are you sure? I was considering making a PR for this.

@whatthejeff
Copy link
Contributor

Yeah, not unless @sebastianbergmann has changed his mind. See #516.

@beporter
Copy link

+1

If command line options are intended to override configuration file settings, then it follows that there should be a way to override in both directions. (XML turns a feature on, command line overrides to turn it off.)

Since there isn't a way to merge settings from multiple configuration files (to allow for shared base options), maintaining multiple configuration files for each collection of settings isn't DRY.

@sebastianbergmann
Copy link
Owner

Once the configuration branch has been merged there will be a way to merge settings from multiple configuration.

@drgomesp
Copy link
Author

@sebastianbergmann 👍

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

4 participants