Skip to content

update from master #425

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

Closed
wants to merge 119 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
119 commits
Select commit Hold shift + click to select a range
4a5e731
Added a phpdbg based code coverage driver.
staabm Jul 15, 2015
5a952f4
Better coverage info
bwoebi Jul 22, 2015
8fc8dfd
Add caching of source line fetching
bwoebi Jul 22, 2015
fa3d880
detect phpdbg and use the driver subsequently
staabm Jul 24, 2015
16314f9
Do not use a fork of sebastian/environment
sebastianbergmann Jul 26, 2015
e5852f2
Fix CS/WS issues
sebastianbergmann Jul 26, 2015
245f47c
Refactor selection of code coverage driver
sebastianbergmann Jul 26, 2015
220148e
This is still 2.2-dev for now
sebastianbergmann Jul 26, 2015
f947634
Fix CS/WS issues
sebastianbergmann Jul 26, 2015
d0f0ce5
Add docblocks
sebastianbergmann Jul 26, 2015
48bea1f
Move constant declarations to only class where they are used
sebastianbergmann Jul 26, 2015
806e403
fixes most false-positives in phpdbg code coverage. refs #361
staabm Jul 27, 2015
2aea161
Revert "Move constant declarations to only class where they are used"
sebastianbergmann Jul 27, 2015
65a3473
fixed coverage errors, when phpgdb reports line-no 0. refs #361.
staabm Jul 27, 2015
df29d42
use PHP_CodeCoverage_Driver::* constants instead of magic values.
staabm Jul 27, 2015
e6577d9
Prepare release
sebastianbergmann Aug 1, 2015
a5402c8
Initial work on ChangeLog
sebastianbergmann Aug 1, 2015
0edb5c6
Bump dependency
sebastianbergmann Aug 2, 2015
6526d9b
Prepare release
sebastianbergmann Aug 2, 2015
d12d000
See https://github.com/sebastianbergmann/php-code-coverage/commit/0ed…
sebastianbergmann Aug 2, 2015
368bf98
Fixed typo
GrahamCampbell Aug 2, 2015
f41108e
Leftover from 368bf98197397b5a03c9ffeaedacd17d77bd8e8a
sebastianbergmann Aug 2, 2015
f1f6952
Bump dependency
sebastianbergmann Aug 3, 2015
02f5f13
Closes #365
sebastianbergmann Aug 3, 2015
2d7c03c
Prepare release 2.2.2
sebastianbergmann Aug 4, 2015
ad5c930
Respect BlackListing/WhiteListing of merged .cov files
foozee Aug 3, 2015
40103f9
Fixing CS issue..
foozee Aug 3, 2015
3fa7a50
Remove redundant null check
kelunik Aug 15, 2015
71a668c
Fix coverage for nested functions and classes
kelunik Aug 15, 2015
729fa93
Add PHP 5.3 compability...
kelunik Aug 15, 2015
0bd35e8
Fix typo...
kelunik Aug 16, 2015
e144166
Fix #370: Show 0 / 0 for classes without methods instead of empty cell
kelunik Aug 16, 2015
4fedb6f
Fix CS/WS issues
sebastianbergmann Aug 16, 2015
d846101
Add PHPDBG possibility for PHP 7 to README
kelunik Aug 17, 2015
7cc4081
Tweak
sebastianbergmann Aug 17, 2015
751653e
Leftover from 7cc4081d084916cfbe87ad7d4bf6941615a4b281
sebastianbergmann Aug 17, 2015
fd7bce8
Fix docblock
sebastianbergmann Sep 1, 2015
ab2283b
Fix CS/WS issues
sebastianbergmann Sep 1, 2015
9a0cbb3
Add configuration for php-cs-fixer
sebastianbergmann Sep 1, 2015
c472c13
Drop support for PHP < 5.6
sebastianbergmann Sep 1, 2015
4d109a2
Add ChangeLog for PHP_CodeCoverage 3.0
sebastianbergmann Sep 1, 2015
b100e6f
Improve docblocks
sebastianbergmann Sep 1, 2015
969cff0
Refactor exception hierarchy
sebastianbergmann Sep 1, 2015
b5ea3a7
Leftover from c472c131338768a35dd521be872b6c7580ecdc82
sebastianbergmann Sep 1, 2015
4308b3a
Update
sebastianbergmann Sep 2, 2015
dcb2e05
Closes #382
sebastianbergmann Sep 14, 2015
ef1ca68
Prepare release
sebastianbergmann Sep 14, 2015
b8436b0
Merge branch '2.2'
sebastianbergmann Sep 14, 2015
12259bb
Remove blacklist functionality and make using a whitelist mandatory
sebastianbergmann Sep 24, 2015
86e0daf
Prepare release
sebastianbergmann Oct 1, 2015
84b40c5
Close #390 by removing outdated example scripts
sebastianbergmann Oct 3, 2015
aae0847
fixed missing abbr closing tag
jusurb Oct 6, 2015
7d0b056
Update ChangeLog
sebastianbergmann Oct 6, 2015
eabf68b
Prepare release
sebastianbergmann Oct 6, 2015
c84f05b
Merge branch '2.2'
sebastianbergmann Oct 6, 2015
a76ed34
Initialize after validate
Maks3w Oct 27, 2015
d7dec4d
Remove workarounds for unsupported PHP versions
Maks3w Nov 5, 2015
ac9f3d6
Removed obsolete isset()
Maks3w Oct 27, 2015
25cc3d1
Remove old feature mapTestClassNameToCoveredClassName
Maks3w Oct 30, 2015
50d650c
DRY and fix run individual tests
Maks3w Nov 3, 2015
795fe55
Tests for XML Report
Maks3w Nov 3, 2015
e7b24fc
Tests for HTML Report
Maks3w Nov 3, 2015
7b42477
Tests for Crap4j Report
Maks3w Nov 3, 2015
0ef0028
Typo
Maks3w Nov 3, 2015
18f9c8d
Tests for Text Report
Maks3w Nov 3, 2015
bf3f2b8
DRY Method definition
Maks3w Nov 4, 2015
a257070
Add method visibility to Clover report
Maks3w Nov 4, 2015
182aeab
Add cyclomatic complexity to Clover report
Maks3w Nov 4, 2015
cd9da22
Bump version
sebastianbergmann Nov 6, 2015
049bc01
Fix since tags
Maks3w Nov 6, 2015
21d924d
PHP 7 compatibility
crishoj Oct 27, 2015
85a7b89
Update InvalidArgumentException.php
crishoj Oct 28, 2015
9c795d3
Fix Xdebug required version
Maks3w Nov 6, 2015
bb58892
Workaround Travis Xdebug < 2.3
Maks3w Nov 4, 2015
3e8e8c5
Revert "Workaround Travis Xdebug < 2.3"
sebastianbergmann Nov 6, 2015
839af7c
Make #351 optional
sebastianbergmann Nov 12, 2015
f7bb5cd
Prepare release
sebastianbergmann Nov 12, 2015
2feb1b8
Merge branch '3.0'
sebastianbergmann Nov 12, 2015
d2644cf
Fix WS
sebastianbergmann Nov 12, 2015
6aa886e
Merge branch '3.0'
sebastianbergmann Nov 12, 2015
168eaf4
#234: add optional check for unexecuted covered or used code
sebastianheuer Dec 23, 2015
7a8a5cf
Fix CS/WS issues
sebastianbergmann Jan 3, 2016
5b9d565
Update ChangeLog
sebastianbergmann Jan 3, 2016
0b327d8
Fix annotation
sebastianbergmann Jan 3, 2016
64d40a5
Prepare release
sebastianbergmann Jan 11, 2016
95a0e74
Bump
sebastianbergmann Feb 4, 2016
92f5c61
Prepare release
sebastianbergmann Feb 4, 2016
9c3582b
Added optional check for missing `@covers` annotation when the usage …
sebastianbergmann Feb 8, 2016
de5312e
Use function or method name in PHP_CodeCoverage_UnintentionallyCovere…
sebastianbergmann Feb 8, 2016
494035f
Simplify
sebastianbergmann Feb 9, 2016
1650650
Sync with https://github.com/sebastianbergmann/code-unit-reverse-look…
sebastianbergmann Feb 9, 2016
c70c937
Refactor
sebastianbergmann Feb 12, 2016
85f5db2
Prepare release
sebastianbergmann Feb 13, 2016
c4e323e
In order to support PHP 7.0, token stream PHP7 tokens are required
Ocramius Feb 18, 2016
59d6696
Update ChangeLog
sebastianbergmann Feb 18, 2016
a58f95a
Prepare release
sebastianbergmann Feb 18, 2016
560f7c7
Bump version
sebastianbergmann Mar 3, 2016
7e1c08a
Add support for whitelisting classes for the unintentionally covered …
sebastianbergmann Mar 3, 2016
fe33716
Prepare release
sebastianbergmann Mar 3, 2016
50bf9c4
Fix CS/WS issue
sebastianbergmann Mar 9, 2016
82e2979
Sync with PHPUnit ruleset
sebastianbergmann Mar 9, 2016
9b2a050
Fix CS/WS issues
sebastianbergmann Mar 9, 2016
fcec460
Reflect release of Xdebug 2.4
sebastianbergmann Mar 9, 2016
e10e643
Bump
sebastianbergmann Mar 9, 2016
be326c3
Handle lines with declare statements correctly
sebastianbergmann Apr 8, 2016
2431bef
Prepare release
sebastianbergmann Apr 8, 2016
4712fc6
Initial work on moving to namespaces
sebastianbergmann Apr 10, 2016
b167714
Leftover from 4712fc6b1328d62c5da00316e0c16d4f2147fed1
sebastianbergmann Apr 10, 2016
ce54e78
Update ChangeLog
sebastianbergmann Apr 10, 2016
ea06793
Fix
sebastianbergmann Apr 10, 2016
8787403
Fix
sebastianbergmann Apr 10, 2016
bbb025d
Disable IRC notifications
sebastianbergmann Apr 10, 2016
ff55739
Merge branch '3.3'
sebastianbergmann Apr 10, 2016
f53a770
Leftover from 4712fc6b1328d62c5da00316e0c16d4f2147fed1
sebastianbergmann Apr 10, 2016
0c1c1be
Clean up Travis CI build
sebastianbergmann Apr 10, 2016
1d96f16
Improve test names
sebastianbergmann Apr 10, 2016
87ccabf
Add tests for PHPDBG
sebastianbergmann Apr 10, 2016
9b6abba
Update tests
sebastianbergmann Apr 15, 2016
9e5dbd2
Fixed broken html report tests
GrahamCampbell Apr 15, 2016
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
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@ build/coverage
build/logs
build/pdepend
cache.properties
phpunit.xml
/tests/_files/tmp
/vendor
/composer.lock
/composer.phar
/.idea
/.php_cs.cache
69 changes: 69 additions & 0 deletions .php_cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
<?php
$finder = Symfony\CS\Finder\DefaultFinder::create()
->files()
->in('src')
->in('tests')
->exclude('_files')
->name('*.php');

return Symfony\CS\Config\Config::create()
->setUsingCache(true)
->level(\Symfony\CS\FixerInterface::NONE_LEVEL)
->fixers(
array(
'align_double_arrow',
'align_equals',
'braces',
'concat_with_spaces',
'duplicate_semicolon',
'elseif',
'empty_return',
'encoding',
'eof_ending',
'extra_empty_lines',
'function_call_space',
'function_declaration',
'indentation',
'join_function',
'line_after_namespace',
'linefeed',
'list_commas',
'lowercase_constants',
'lowercase_keywords',
'method_argument_space',
'multiple_use',
'namespace_no_leading_whitespace',
'no_blank_lines_after_class_opening',
'no_empty_lines_after_phpdocs',
'parenthesis',
'php_closing_tag',
'phpdoc_indent',
'phpdoc_no_access',
'phpdoc_no_empty_return',
'phpdoc_no_package',
'phpdoc_params',
'phpdoc_scalar',
'phpdoc_separation',
'phpdoc_to_comment',
'phpdoc_trim',
'phpdoc_types',
'phpdoc_var_without_name',
'remove_lines_between_uses',
'return',
'self_accessor',
'short_array_syntax',
'short_tag',
'single_line_after_imports',
'single_quote',
'spaces_before_semicolon',
'spaces_cast',
'ternary_spaces',
'trailing_spaces',
'trim_array_spaces',
'unused_use',
'visibility',
'whitespacy_lines'
)
)
->finder($finder);

24 changes: 13 additions & 11 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,22 @@
language: php

php:
- 5.3.3
- 5.3
- 5.4
- 5.5
- 5.6
- 7.0
- nightly

before_script:
- COMPOSER_ROOT_VERSION=dev-master composer install --prefer-source
sudo: false

script: vendor/bin/phpunit --configuration ./build/travis-ci.xml
before_install:
- composer self-update

install:
- travis_retry composer install --no-interaction --prefer-source

script:

- vendor/bin/phpunit --configuration build

notifications:
email: false
irc:
channels:
- "irc.freenode.org#phpunit"
use_notice: true

6 changes: 1 addition & 5 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,5 +1 @@
Pull Requests for bug fixes should be made against the current release branch (2.0).

Pull Requests for new features should be made against master.

For further notes please refer to [https://github.com/sebastianbergmann/phpunit/blob/master/CONTRIBUTING.md](https://github.com/sebastianbergmann/phpunit/blob/master/CONTRIBUTING.md)
Please refer to [https://github.com/sebastianbergmann/phpunit/blob/master/CONTRIBUTING.md](https://github.com/sebastianbergmann/phpunit/blob/master/CONTRIBUTING.md) for details on how to contribute to this project.
56 changes: 56 additions & 0 deletions ChangeLog-2.2.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# Changes in PHP_CodeCoverage 2.2

All notable changes of the PHP_CodeCoverage 2.2 release series are documented in this file using the [Keep a CHANGELOG](http://keepachangelog.com/) principles.

## [2.2.4] - 2015-10-06

### Fixed

* Fixed [#391](https://github.com/sebastianbergmann/php-code-coverage/pull/391): Missing `</abbr>` tag

## [2.2.3] - 2015-09-14

### Fixed

* Fixed [#368](https://github.com/sebastianbergmann/php-code-coverage/pull/368): Blacklists and whitelists are not merged when merging data sets
* Fixed [#370](https://github.com/sebastianbergmann/php-code-coverage/issues/370): Confusing statistics for source file that declares a class without methods
* Fixed [#372](https://github.com/sebastianbergmann/php-code-coverage/pull/372): Nested classes and functions are not handled correctly
* Fixed [#382](https://github.com/sebastianbergmann/php-code-coverage/issues/382): Crap4J report generates incorrect XML logfile

## [2.2.2] - 2015-08-04

### Added

* Reintroduced the `PHP_CodeCoverage_Driver_HHVM` driver as an extension of `PHP_CodeCoverage_Driver_Xdebug` that does not use `xdebug_start_code_coverage()` with options not supported by HHVM

### Changed

* Bumped required version of `sebastian/environment` to 1.3.2 for [#365](https://github.com/sebastianbergmann/php-code-coverage/issues/365)

## [2.2.1] - 2015-08-02

### Changed

* Bumped required version of `sebastian/environment` to 1.3.1 for [#365](https://github.com/sebastianbergmann/php-code-coverage/issues/365)

## [2.2.0] - 2015-08-01

### Added

* Added a driver for PHPDBG (requires PHP 7)
* Added `PHP_CodeCoverage::setDisableIgnoredLines()` to disable the ignoring of lines using annotations such as `@codeCoverageIgnore`

### Changed

* Annotating a method with `@deprecated` now has the same effect as annotating it with `@codeCoverageIgnore`

### Removed

* The dedicated driver for HHVM, `PHP_CodeCoverage_Driver_HHVM` has been removed

[2.2.4]: https://github.com/sebastianbergmann/php-code-coverage/compare/2.2.3...2.2.4
[2.2.3]: https://github.com/sebastianbergmann/php-code-coverage/compare/2.2.2...2.2.3
[2.2.2]: https://github.com/sebastianbergmann/php-code-coverage/compare/2.2.1...2.2.2
[2.2.1]: https://github.com/sebastianbergmann/php-code-coverage/compare/2.2.0...2.2.1
[2.2.0]: https://github.com/sebastianbergmann/php-code-coverage/compare/2.1...2.2.0

31 changes: 31 additions & 0 deletions ChangeLog-3.0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Changes in PHP_CodeCoverage 3.0

All notable changes of the PHP_CodeCoverage 3.0 release series are documented in this file using the [Keep a CHANGELOG](http://keepachangelog.com/) principles.

## [3.0.2] - 2015-11-12

### Changed

* It is now optional that `@deprecated` code is ignored

## [3.0.1] - 2015-10-06

### Fixed

* Fixed [#391](https://github.com/sebastianbergmann/php-code-coverage/pull/391): Missing `</abbr>` tag

## [3.0.0] - 2015-10-02

### Changed

* It is now mandatory to configure a whitelist

### Removed

* The blacklist functionality has been removed
* PHP_CodeCoverage is no longer supported on PHP 5.3, PHP 5.4, and PHP 5.5

[3.0.2]: https://github.com/sebastianbergmann/php-code-coverage/compare/3.0.1...3.0.2
[3.0.1]: https://github.com/sebastianbergmann/php-code-coverage/compare/3.0.0...3.0.1
[3.0.0]: https://github.com/sebastianbergmann/php-code-coverage/compare/2.2...3.0.0

30 changes: 30 additions & 0 deletions ChangeLog-3.1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Changes in PHP_CodeCoverage 3.1

All notable changes of the PHP_CodeCoverage 3.1 release series are documented in this file using the [Keep a CHANGELOG](http://keepachangelog.com/) principles.

## [3.1.1] - 2016-02-04

### Changed

* Allow version 2.0.x of `sebastian/version` dependency

## [3.1.0] - 2016-01-11

### Added

* Implemented [#234](https://github.com/sebastianbergmann/php-code-coverage/issues/234): Optionally raise an exception when a specified unit of code is not executed

### Changed

* The Clover XML report now contains cyclomatic complexity information
* The Clover XML report now contains method visibility information
* Cleanup and refactoring of various areas of code
* Added missing test cases

### Removed

* The functionality controlled by the `mapTestClassNameToCoveredClassName` setting has been removed

[3.1.1]: https://github.com/sebastianbergmann/php-code-coverage/compare/3.1.0...3.1.1
[3.1.0]: https://github.com/sebastianbergmann/php-code-coverage/compare/3.0...3.1.0

23 changes: 23 additions & 0 deletions ChangeLog-3.2.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Changes in PHP_CodeCoverage 3.2

All notable changes of the PHP_CodeCoverage 3.2 release series are documented in this file using the [Keep a CHANGELOG](http://keepachangelog.com/) principles.

## [3.2.1] - 2016-02-18

### Changed

* Updated dependency information in `composer.json`

## [3.2.0] - 2016-02-13

### Added

* Added optional check for missing `@covers` annotation when the usage of `@covers` annotations is forced

### Changed

* Improved `PHP_CodeCoverage_UnintentionallyCoveredCodeException` message

[3.2.1]: https://github.com/sebastianbergmann/php-code-coverage/compare/3.2.0...3.2.1
[3.2.0]: https://github.com/sebastianbergmann/php-code-coverage/compare/3.1...3.2.0

19 changes: 19 additions & 0 deletions ChangeLog-3.3.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Changes in PHP_CodeCoverage 3.3

All notable changes of the PHP_CodeCoverage 3.3 release series are documented in this file using the [Keep a CHANGELOG](http://keepachangelog.com/) principles.

## [3.3.1] - 2016-04-08

### Fixed

* Fixed handling of lines that contain `declare` statements

## [3.3.0] - 2016-03-03

### Added

* Added support for whitelisting classes for the unintentionally covered code unit check

[3.3.1]: https://github.com/sebastianbergmann/php-code-coverage/compare/3.3.0...3.3.1
[3.3.0]: https://github.com/sebastianbergmann/php-code-coverage/compare/3.2...3.3.0

12 changes: 12 additions & 0 deletions ChangeLog-4.0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Changes in PHP_CodeCoverage 4.0

All notable changes of the PHP_CodeCoverage 4.0 release series are documented in this file using the [Keep a CHANGELOG](http://keepachangelog.com/) principles.

## [4.0.0] - 2016-MM-DD

### Changed

* This component now uses namespaces

[4.0.0]: https://github.com/sebastianbergmann/php-code-coverage/compare/3.3...4.0.0

20 changes: 15 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,27 @@

## Requirements

* PHP 5.3.3 is required but using the latest version of PHP is highly recommended
* [Xdebug](http://xdebug.org/) 2.1.3 is required but using the latest version of Xdebug is highly recommended
PHP 5.6 is required but using the latest version of PHP is highly recommended.

### PHP 5

[Xdebug](http://xdebug.org/) is the only source of raw code coverage data supported for PHP 5. Version 2.2.1 of Xdebug is required but using the latest version is highly recommended.

### PHP 7

Version 2.4.0 (or later) of [Xdebug](http://xdebug.org/) as well as [phpdbg](http://phpdbg.com/docs) are supported sources of raw code coverage data for PHP 7.

### HHVM

A version of HHVM that implements the Xdebug API for code coverage (`xdebug_*_code_coverage()`) is required.

## Installation

To add PHP_CodeCoverage as a local, per-project dependency to your project, simply add a dependency on `phpunit/php-code-coverage` to your project's `composer.json` file. Here is a minimal example of a `composer.json` file that just defines a dependency on PHP_CodeCoverage 2.0:
To add PHP_CodeCoverage as a local, per-project dependency to your project, simply add a dependency on `phpunit/php-code-coverage` to your project's `composer.json` file. Here is a minimal example of a `composer.json` file that just defines a dependency on PHP_CodeCoverage 3.0:

{
"require": {
"phpunit/php-code-coverage": "~2.0"
"phpunit/php-code-coverage": "^4"
}
}

Expand All @@ -37,4 +48,3 @@ $writer->process($coverage, '/tmp/clover.xml');
$writer = new PHP_CodeCoverage_Report_HTML;
$writer->process($coverage, '/tmp/code-coverage-report');
```

16 changes: 16 additions & 0 deletions build/phpunit.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/5.3/phpunit.xsd"
bootstrap="../tests/bootstrap.php"
backupGlobals="false"
verbose="true">
<testsuite>
<directory suffix="Test.php">../tests/tests</directory>
</testsuite>

<filter>
<whitelist processUncoveredFilesFromWhitelist="true">
<directory suffix=".php">../src</directory>
</whitelist>
</filter>
</phpunit>
21 changes: 0 additions & 21 deletions build/travis-ci.xml

This file was deleted.

Loading