Skip to content

Readme update required software #26

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

Merged
merged 2 commits into from
Feb 20, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 27 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,35 @@

# codeclimate-test-reporter

Collects test coverage data from your PHP test suite and sends it to
Collects test coverage data from your PHP test suite and sends it to
Code Climate's hosted, automated code review service.

Code Climate - https://codeclimate.com

**Important:** If you encounter an error involving SSL certificates, see the **Known Issue: SSL Certificate Error** section below.

## Requirements

There are several requirements you'll need in order to use the PHP test reporter on your system:

- [PHPUnit](http://phpunit.de)
- [Xdebug](http://xdebug.org)
- [Composer](http://getcomposer.org)

The test reporter uses the [PHPUnit](http://phpunit.de) testing tool to generate [code coverage](http://en.wikipedia.org/wiki/Code_coverage) information. These results show how much of your application's code is being executed by your unit tests. PHPUnit can't generate this information on it's own though - it needs another tool, [Xdebug](http://xdebug.org). This is *not* included as a part of the PHPUnit (or PHP) install by default so you'll need to install it yourself.

Xdebug is installed as an extension to PHP, not a library. You can find more information about installing the tool via PECL [on the project website](http://xdebug.org/docs/install).

If you execute your PHPUnit tests with the `--coverage-clover` option and receive the message "The Xdebug extension is not loaded. No code coverage will be generated." you will need to visit the Xdebug website and install the extension. If you do not, you'll most likely get an error something like this:

```
PHP Warning: simplexml_load_file(): I/O warning : failed to load external entity "[...]/build/logs/clover.xml" in [...]/vendor/satooshi/php-coveralls/src/Contrib/Bundle/CoverallsV1Bundle/Api/Jobs.php on line 52
```

## Installation

This package requires a user, but not necessarily a paid account, on
Code Climate, so if you don't have one the first step is to signup at:
This package requires a user, but not necessarily a paid account, on
Code Climate, so if you don't have one the first step is to signup at:
https://codeclimate.com.

To install php-test-reporter with Composer run the following command.
Expand Down Expand Up @@ -50,18 +68,18 @@ Or invoke `phpunit` as follows:
$ phpunit --coverage-clover build/logs/clover.xml
```

- Specifying your repo token as an environment variable, invoke the
- Specifying your repo token as an environment variable, invoke the
test-reporter:

```
$ CODECLIMATE_REPO_TOKEN="..." vendor/bin/test-reporter
```

The `CODECLIMATE_REPO_TOKEN` value is provided after you add your repo
to your Code Climate account by clicking on "Setup Test Coverage" on the
The `CODECLIMATE_REPO_TOKEN` value is provided after you add your repo
to your Code Climate account by clicking on "Setup Test Coverage" on the
right hand side of your feed.

Please contact [email protected] if you need any assistance setting
Please contact [email protected] if you need any assistance setting
this up.

## Known Issue: SSL Certificate Error
Expand All @@ -83,7 +101,7 @@ More details can be found in [this issue][issue].

## Contributions

Patches, bug fixes, feature requests, and pull requests are welcome on
Patches, bug fixes, feature requests, and pull requests are welcome on
the GitHub page for this project:

https://github.com/codeclimate/php-test-reporter
Expand All @@ -94,6 +112,6 @@ This package is maintained by Bryan Helmkamp ([email protected]).

See LICENSE.txt

Portions of the implementation were inspired by the php-coveralls
Portions of the implementation were inspired by the php-coveralls
project.

3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@
"symfony/console": ">=2.0"
},
"require-dev": {
"phpunit/phpunit": "3.7.*@stable"
"phpunit/phpunit": "3.7.*@stable",

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This @stable annotation means nothing at all and should be removed.

"ext-xdebug": "*"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should actually specify a version to use in here.

},
"autoload": {
"psr-0": {
Expand Down