Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: paratestphp/paratest
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v7.3.1
Choose a base ref
...
head repository: paratestphp/paratest
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v7.4.0
Choose a head ref

Commits on Nov 2, 2023

  1. Update dependency infection/infection to ^0.27.7

    | datasource | package             | from   | to     |
    | ---------- | ------------------- | ------ | ------ |
    | packagist  | infection/infection | 0.27.6 | 0.27.7 |
    renovate[bot] authored Nov 2, 2023

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    24437c3 View commit details

Commits on Nov 5, 2023

  1. Update dependency phpstan/phpstan to ^1.10.41

    | datasource | package         | from    | to      |
    | ---------- | --------------- | ------- | ------- |
    | packagist  | phpstan/phpstan | 1.10.40 | 1.10.41 |
    renovate[bot] authored Nov 5, 2023

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    c78f216 View commit details

Commits on Nov 8, 2023

  1. Update dependency infection/infection to ^0.27.8

    | datasource | package             | from   | to     |
    | ---------- | ------------------- | ------ | ------ |
    | packagist  | infection/infection | 0.27.7 | 0.27.8 |
    renovate[bot] authored Nov 8, 2023

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    fcb3309 View commit details

Commits on Nov 15, 2023

  1. Update dependency phpunit/php-code-coverage to ^10.1.8

    | datasource | package                   | from   | to     |
    | ---------- | ------------------------- | ------ | ------ |
    | packagist  | phpunit/php-code-coverage | 10.1.7 | 10.1.8 |
    renovate[bot] authored Nov 15, 2023

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    f40e691 View commit details

Commits on Nov 17, 2023

  1. Update dependency phpstan/phpstan to ^1.10.42

    | datasource | package         | from    | to      |
    | ---------- | --------------- | ------- | ------- |
    | packagist  | phpstan/phpstan | 1.10.41 | 1.10.42 |
    renovate[bot] authored Nov 17, 2023

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    73c40c7 View commit details

Commits on Nov 19, 2023

  1. Update dependency phpstan/phpstan to ^1.10.43

    | datasource | package         | from    | to      |
    | ---------- | --------------- | ------- | ------- |
    | packagist  | phpstan/phpstan | 1.10.42 | 1.10.43 |
    renovate[bot] authored Nov 19, 2023

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    f90bbe6 View commit details

Commits on Nov 21, 2023

  1. Update dependency phpstan/phpstan to ^1.10.44

    | datasource | package         | from    | to      |
    | ---------- | --------------- | ------- | ------- |
    | packagist  | phpstan/phpstan | 1.10.43 | 1.10.44 |
    renovate[bot] authored Nov 21, 2023

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    247e90a View commit details

Commits on Nov 23, 2023

  1. Update dependency phpunit/php-code-coverage to ^10.1.9

    | datasource | package                   | from   | to     |
    | ---------- | ------------------------- | ------ | ------ |
    | packagist  | phpunit/php-code-coverage | 10.1.8 | 10.1.9 |
    renovate[bot] authored Nov 23, 2023

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    cd1e61d View commit details

Commits on Nov 27, 2023

  1. Update dependency phpstan/phpstan to ^1.10.45

    | datasource | package         | from    | to      |
    | ---------- | --------------- | ------- | ------- |
    | packagist  | phpstan/phpstan | 1.10.44 | 1.10.45 |
    renovate[bot] authored Nov 27, 2023

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    bbe0bf8 View commit details

Commits on Nov 28, 2023

  1. Update dependency phpstan/phpstan to ^1.10.46

    | datasource | package         | from    | to      |
    | ---------- | --------------- | ------- | ------- |
    | packagist  | phpstan/phpstan | 1.10.45 | 1.10.46 |
    renovate[bot] authored Nov 28, 2023

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    5efcaca View commit details

Commits on Dec 1, 2023

  1. Update all non-major dependencies

    | datasource | package         | from    | to      |
    | ---------- | --------------- | ------- | ------- |
    | packagist  | phpstan/phpstan | 1.10.46 | 1.10.47 |
    | packagist  | phpunit/phpunit | 10.4.2  | 10.5.1  |
    renovate[bot] authored Dec 1, 2023

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    063291d View commit details

Commits on Dec 5, 2023

  1. Update dependency phpunit/phpunit to ^10.5.2

    | datasource | package         | from   | to     |
    | ---------- | --------------- | ------ | ------ |
    | packagist  | phpunit/phpunit | 10.5.1 | 10.5.2 |
    renovate[bot] authored Dec 5, 2023

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    0c1cfe9 View commit details

Commits on Dec 7, 2023

  1. Update actions/stale action to v9

    | datasource  | package       | from | to |
    | ----------- | ------------- | ---- | -- |
    | github-tags | actions/stale | v8   | v9 |
    renovate[bot] authored Dec 7, 2023

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    8ccd66c View commit details
  2. Merge pull request #825 from paratestphp/renovate/actions-stale-9.x

    Update actions/stale action to v9
    Slamdunk authored Dec 7, 2023

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    d36b5f3 View commit details
  3. Update dependency infection/infection to ^0.27.9

    | datasource | package             | from   | to     |
    | ---------- | ------------------- | ------ | ------ |
    | packagist  | infection/infection | 0.27.8 | 0.27.9 |
    renovate[bot] authored Dec 7, 2023

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    4fe561d View commit details

Commits on Dec 8, 2023

  1. Update all non-major dependencies

    | datasource | package                   | from    | to      |
    | ---------- | ------------------------- | ------- | ------- |
    | packagist  | phpstan/phpstan           | 1.10.47 | 1.10.48 |
    | packagist  | squizlabs/php_codesniffer | 3.7.2   | 3.8.0   |
    renovate[bot] authored Dec 8, 2023

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    f1fdce1 View commit details

Commits on Dec 11, 2023

  1. Update dependency phpunit/php-code-coverage to ^10.1.10

    | datasource | package                   | from   | to      |
    | ---------- | ------------------------- | ------ | ------- |
    | packagist  | phpunit/php-code-coverage | 10.1.9 | 10.1.10 |
    renovate[bot] authored Dec 11, 2023

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    619a824 View commit details

Commits on Dec 12, 2023

  1. Update dependency phpstan/phpstan to ^1.10.49

    | datasource | package         | from    | to      |
    | ---------- | --------------- | ------- | ------- |
    | packagist  | phpstan/phpstan | 1.10.48 | 1.10.49 |
    renovate[bot] authored Dec 12, 2023

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    ecb7c56 View commit details

Commits on Dec 13, 2023

  1. Update all non-major dependencies

    | datasource | package         | from    | to      |
    | ---------- | --------------- | ------- | ------- |
    | packagist  | phpstan/phpstan | 1.10.49 | 1.10.50 |
    | packagist  | phpunit/phpunit | 10.5.2  | 10.5.3  |
    renovate[bot] authored Dec 13, 2023

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    d6fa256 View commit details

Commits on Dec 21, 2023

  1. Update dependency phpunit/php-code-coverage to ^10.1.11

    | datasource | package                   | from    | to      |
    | ---------- | ------------------------- | ------- | ------- |
    | packagist  | phpunit/php-code-coverage | 10.1.10 | 10.1.11 |
    renovate[bot] authored Dec 21, 2023

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    919f95a View commit details

Commits on Dec 27, 2023

  1. Update dependency phpunit/phpunit to ^10.5.5

    | datasource | package         | from   | to     |
    | ---------- | --------------- | ------ | ------ |
    | packagist  | phpunit/phpunit | 10.5.3 | 10.5.5 |
    renovate[bot] authored Dec 27, 2023

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    f49a93c View commit details

Commits on Jan 5, 2024

  1. Update dependency phpstan/phpstan to ^1.10.51

    | datasource | package         | from    | to      |
    | ---------- | --------------- | ------- | ------- |
    | packagist  | phpstan/phpstan | 1.10.50 | 1.10.51 |
    renovate[bot] authored Jan 5, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    faacafd View commit details
  2. Update dependency phpstan/phpstan to ^1.10.52

    | datasource | package         | from    | to      |
    | ---------- | --------------- | ------- | ------- |
    | packagist  | phpstan/phpstan | 1.10.51 | 1.10.52 |
    renovate[bot] authored Jan 5, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    bca096a View commit details
  3. Update dependency phpstan/phpstan to ^1.10.54

    | datasource | package         | from    | to      |
    | ---------- | --------------- | ------- | ------- |
    | packagist  | phpstan/phpstan | 1.10.52 | 1.10.54 |
    renovate[bot] authored Jan 5, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    52b2aec View commit details

Commits on Jan 8, 2024

  1. Move to Attributes (#831)

    Slamdunk authored Jan 8, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    8bfded5 View commit details

Commits on Jan 11, 2024

  1. Update dependency squizlabs/php_codesniffer to ^3.8.1

    | datasource | package                   | from  | to    |
    | ---------- | ------------------------- | ----- | ----- |
    | packagist  | squizlabs/php_codesniffer | 3.8.0 | 3.8.1 |
    renovate[bot] authored Jan 11, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    d729fcd View commit details

Commits on Jan 13, 2024

  1. Update dependency phpunit/phpunit to ^10.5.6

    | datasource | package         | from   | to     |
    | ---------- | --------------- | ------ | ------ |
    | packagist  | phpunit/phpunit | 10.5.5 | 10.5.6 |
    renovate[bot] authored Jan 13, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    5ea608d View commit details

Commits on Jan 14, 2024

  1. Update dependency phpunit/phpunit to ^10.5.7

    | datasource | package         | from   | to     |
    | ---------- | --------------- | ------ | ------ |
    | packagist  | phpunit/phpunit | 10.5.6 | 10.5.7 |
    renovate[bot] authored Jan 14, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    33e55be View commit details

Commits on Jan 15, 2024

  1. Update dependency phpstan/phpstan to ^1.10.56

    | datasource | package         | from    | to      |
    | ---------- | --------------- | ------- | ------- |
    | packagist  | phpstan/phpstan | 1.10.55 | 1.10.56 |
    renovate[bot] authored Jan 15, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    0b5985a View commit details

Commits on Jan 19, 2024

  1. Update dependency phpunit/phpunit to ^10.5.8

    | datasource | package         | from   | to     |
    | ---------- | --------------- | ------ | ------ |
    | packagist  | phpunit/phpunit | 10.5.7 | 10.5.8 |
    renovate[bot] authored Jan 19, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    b81d091 View commit details

Commits on Jan 22, 2024

  1. Update dependency phpunit/phpunit to ^10.5.9

    | datasource | package         | from   | to     |
    | ---------- | --------------- | ------ | ------ |
    | packagist  | phpunit/phpunit | 10.5.8 | 10.5.9 |
    renovate[bot] authored Jan 22, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    b3341b5 View commit details

Commits on Jan 24, 2024

  1. Update dependency phpstan/phpstan to ^1.10.57

    | datasource | package         | from    | to      |
    | ---------- | --------------- | ------- | ------- |
    | packagist  | phpstan/phpstan | 1.10.56 | 1.10.57 |
    renovate[bot] authored Jan 24, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    c8b661e View commit details

Commits on Feb 2, 2024

  1. Copy the full SHA
    3297520 View commit details
  2. Add support for PHPUnit 11

    Slamdunk committed Feb 2, 2024
    Copy the full SHA
    02eec32 View commit details
  3. Drop PHP 8.1 support

    Slamdunk committed Feb 2, 2024
    Copy the full SHA
    e4c70a0 View commit details
  4. Merge pull request #838 from paratestphp/phpunit_11

    Add support for PHPUnit 11
    Slamdunk authored Feb 2, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    4ffc52e View commit details
83 changes: 41 additions & 42 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -17,7 +17,7 @@ jobs:
strategy:
matrix:
php-version:
- "8.1"
- "8.2"

steps:
- uses: "actions/checkout@v4"
@@ -40,7 +40,7 @@ jobs:
strategy:
matrix:
php-version:
- "8.1"
- "8.2"

steps:
- uses: "actions/checkout@v4"
@@ -64,7 +64,6 @@ jobs:
strategy:
matrix:
php-version:
- "8.1"
- "8.2"
- "8.3"
dependencies:
@@ -86,51 +85,51 @@ jobs:
timeout-minutes: 3
run: "vendor/bin/phpunit --no-coverage --no-logging"

code-coverage:
name: "Code Coverage"
runs-on: "ubuntu-latest"
strategy:
matrix:
php-version:
- "8.2"

steps:
- uses: "actions/checkout@v4"
- uses: "shivammathur/setup-php@v2"
with:
coverage: "pcov"
php-version: "${{ matrix.php-version }}"
ini-values: "${{ env.INI_VALUES }}"
- uses: "ramsey/composer-install@v2"

- run: "make test"
timeout-minutes: 3

- name: "Gather base branch for diff"
if: ${{ github.event_name == 'pull_request' }}
run: git fetch origin --no-tags --prune --depth=1 ${{ github.base_ref }} ${{ github.event.pull_request.base.sha }}

- name: "Infection on DIFF"
if: ${{ github.event_name == 'pull_request' }}
timeout-minutes: 30
run: make code-coverage INFECTION_ARGS="--logger-github"
env:
BASE_BRANCH: origin/${{ github.base_ref }}

- name: "Infection on complete code base"
if: ${{ github.event_name != 'pull_request' && !startsWith(github.ref_name, 'renovate/') }}
timeout-minutes: 30
run: "vendor/bin/infection run --ansi --threads=$(nproc) --skip-initial-tests --coverage=coverage"
env:
INFECTION_BADGE_API_KEY: ${{ secrets.INFECTION_BADGE_API_KEY }}
# code-coverage:
# name: "Code Coverage"
# runs-on: "ubuntu-latest"
# strategy:
# matrix:
# php-version:
# - "8.2"
#
# steps:
# - uses: "actions/checkout@v4"
# - uses: "shivammathur/setup-php@v2"
# with:
# coverage: "pcov"
# php-version: "${{ matrix.php-version }}"
# ini-values: "${{ env.INI_VALUES }}"
# - uses: "ramsey/composer-install@v2"
#
# - run: "make test"
# timeout-minutes: 3
#
# - name: "Gather base branch for diff"
# if: ${{ github.event_name == 'pull_request' }}
# run: git fetch origin --no-tags --prune --depth=1 ${{ github.base_ref }} ${{ github.event.pull_request.base.sha }}
#
# - name: "Infection on DIFF"
# if: ${{ github.event_name == 'pull_request' }}
# timeout-minutes: 30
# run: make code-coverage INFECTION_ARGS="--logger-github"
# env:
# BASE_BRANCH: origin/${{ github.base_ref }}
#
# - name: "Infection on complete code base"
# if: ${{ github.event_name != 'pull_request' && !startsWith(github.ref_name, 'renovate/') }}
# timeout-minutes: 30
# run: "vendor/bin/infection run --ansi --threads=$(nproc) --skip-initial-tests --coverage=coverage"
# env:
# INFECTION_BADGE_API_KEY: ${{ secrets.INFECTION_BADGE_API_KEY }}

coding-standards:
name: "Coding Standards"
runs-on: "ubuntu-latest"
strategy:
matrix:
php-version:
- "8.1"
- "8.2"

steps:
- uses: "actions/checkout@v4"
@@ -151,7 +150,7 @@ jobs:
strategy:
matrix:
php-version:
- "8.1"
- "8.2"

steps:
- uses: "actions/checkout@v4"
2 changes: 1 addition & 1 deletion .github/workflows/stale.yml
Original file line number Diff line number Diff line change
@@ -7,7 +7,7 @@ jobs:
stale:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v8
- uses: actions/stale@v9
with:
days-before-stale: 60
days-before-close: 14
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -7,7 +7,8 @@ ifeq ($(strip $(LOCAL_BASE_BRANCH)),)
endif
BASE_BRANCH ?= $(LOCAL_BASE_BRANCH)

all: csfix static-analysis code-coverage
#all: csfix static-analysis code-coverage
all: csfix static-analysis test
@echo "Done."

vendor: composer.json
2 changes: 2 additions & 0 deletions bin/phpunit-wrapper.php
Original file line number Diff line number Diff line change
@@ -41,6 +41,7 @@
assert(isset($getopt['testresult-file']) && is_string($getopt['testresult-file']));
assert(!isset($getopt['teamcity-file']) || is_string($getopt['teamcity-file']));
assert(!isset($getopt['testdox-file']) || is_string($getopt['testdox-file']));
assert(!isset($getopt['testdox-columns']) || is_int($getopt['testdox-columns']));

assert(isset($getopt['phpunit-argv']) && is_string($getopt['phpunit-argv']));
$phpunitArgv = unserialize($getopt['phpunit-argv'], ['allowed_classes' => false]);
@@ -54,6 +55,7 @@
$getopt['teamcity-file'] ?? null,
$getopt['testdox-file'] ?? null,
isset($getopt['testdox-color']),
$getopt['testdox-columns'] ?? null,
);

while (true) {
25 changes: 12 additions & 13 deletions composer.json
Original file line number Diff line number Diff line change
@@ -33,32 +33,31 @@
}
],
"require": {
"php": "~8.1.0 || ~8.2.0 || ~8.3.0",
"php": "~8.2.0 || ~8.3.0",
"ext-dom": "*",
"ext-pcre": "*",
"ext-reflection": "*",
"ext-simplexml": "*",
"fidry/cpu-core-counter": "^0.5.1 || ^1.0.0",
"fidry/cpu-core-counter": "^1.0.0",
"jean85/pretty-package-versions": "^2.0.5",
"phpunit/php-code-coverage": "^10.1.7",
"phpunit/php-file-iterator": "^4.1.0",
"phpunit/php-timer": "^6.0",
"phpunit/phpunit": "^10.4.2",
"sebastian/environment": "^6.0.1",
"symfony/console": "^6.3.4 || ^7.0.0",
"symfony/process": "^6.3.4 || ^7.0.0"
"phpunit/php-code-coverage": "^10.1.11 || ^11.0.0",
"phpunit/php-file-iterator": "^4.1.0 || ^5.0.0",
"phpunit/php-timer": "^6.0.0 || ^7.0.0",
"phpunit/phpunit": "^10.5.9 || ^11.0.0",
"sebastian/environment": "^6.0.1 || ^7.0.0",
"symfony/console": "^6.4.3 || ^7.0.3",
"symfony/process": "^6.4.3 || ^7.0.3"
},
"require-dev": {
"ext-pcov": "*",
"ext-posix": "*",
"doctrine/coding-standard": "^12.0.0",
"infection/infection": "^0.27.6",
"phpstan/phpstan": "^1.10.40",
"phpstan/phpstan": "^1.10.57",
"phpstan/phpstan-deprecation-rules": "^1.1.4",
"phpstan/phpstan-phpunit": "^1.3.15",
"phpstan/phpstan-strict-rules": "^1.5.2",
"squizlabs/php_codesniffer": "^3.7.2",
"symfony/filesystem": "^6.3.1 || ^7.0.0"
"squizlabs/php_codesniffer": "^3.8.1",
"symfony/filesystem": "^6.4.3 || ^7.0.3"
},
"autoload": {
"psr-4": {
10 changes: 10 additions & 0 deletions phpstan-baseline.neon
Original file line number Diff line number Diff line change
@@ -15,6 +15,16 @@ parameters:
count: 1
path: src/Options.php

-
message: "#^Call to an undefined method PHPUnit\\\\Metadata\\\\Api\\\\CodeCoverage\\:\\:linesToBeIgnored\\(\\)\\.$#"
count: 1
path: src/WrapperRunner/ApplicationForWrapperWorker.php

-
message: "#^Call to an undefined method PHPUnit\\\\Runner\\\\Filter\\\\Factory\\:\\:addNameFilter\\(\\)\\.$#"
count: 1
path: src/WrapperRunner/ApplicationForWrapperWorker.php

-
message: "#^Match expression does not handle remaining value\\: string$#"
count: 1
23 changes: 17 additions & 6 deletions src/WrapperRunner/ApplicationForWrapperWorker.php
Original file line number Diff line number Diff line change
@@ -19,6 +19,7 @@
use PHPUnit\Runner\Filter\Factory;
use PHPUnit\Runner\TestSuiteLoader;
use PHPUnit\Runner\TestSuiteSorter;
use PHPUnit\Runner\Version;
use PHPUnit\TestRunner\TestResult\Facade as TestResultFacade;
use PHPUnit\TextUI\Configuration\Builder;
use PHPUnit\TextUI\Configuration\CodeCoverageFilterRegistry;
@@ -40,6 +41,7 @@
use function str_ends_with;
use function strpos;
use function substr;
use function version_compare;

/**
* @internal
@@ -61,6 +63,7 @@ public function __construct(
private readonly ?string $teamcityFile,
private readonly ?string $testdoxFile,
private readonly bool $testdoxColor,
private readonly ?int $testdoxColumns,
) {
}

@@ -72,7 +75,12 @@ public function runTest(string $testPath): int
$filter = new Factory();
$name = substr($testPath, $null + 1);
assert($name !== '');
$filter->addNameFilter($name);
if (version_compare(Version::id(), '11.0.0') >= 0) {
$filter->addIncludeNameFilter($name);
} else {
$filter->addNameFilter($name);
}

$testPath = substr($testPath, 0, $null);
}

@@ -86,10 +94,12 @@ public function runTest(string $testPath): int
$testSuite = TestSuite::fromClassReflector($testSuiteRefl);
}

if (CodeCoverage::instance()->isActive()) {
CodeCoverage::instance()->ignoreLines(
(new CodeCoverageMetadataApi())->linesToBeIgnored($testSuite),
);
if (version_compare(Version::id(), '11.0.0') < 0) {
if (CodeCoverage::instance()->isActive()) {
CodeCoverage::instance()->ignoreLines(
(new CodeCoverageMetadataApi())->linesToBeIgnored($testSuite),
);
}
}

(new TestSuiteFilterProcessor())->process($this->configuration, $testSuite);
@@ -219,8 +229,9 @@ public function end(): void
$result = TestResultFacade::result();
if (isset($this->testdoxResultCollector)) {
assert(isset($this->testdoxFile));
assert(isset($this->testdoxColumns));

(new TestDoxResultPrinter(DefaultPrinter::from($this->testdoxFile), $this->testdoxColor))->print(
(new TestDoxResultPrinter(DefaultPrinter::from($this->testdoxFile), $this->testdoxColor, $this->testdoxColumns))->print(
$this->testdoxResultCollector->testMethodsGroupedByClass(),
);
}
3 changes: 3 additions & 0 deletions src/WrapperRunner/WrapperWorker.php
Original file line number Diff line number Diff line change
@@ -101,6 +101,9 @@ public function __construct(
if ($options->configuration->colors()) {
$parameters[] = '--testdox-color';
}

$parameters[] = '--testdox-columns';
$parameters[] = (string) $options->configuration->columns();
}

$phpunitArguments = [$options->phpunit];
4 changes: 2 additions & 2 deletions test/Unit/Util/PhpstormHelperTest.php
Original file line number Diff line number Diff line change
@@ -7,6 +7,7 @@
use Generator;
use ParaTest\Util\PhpstormHelper;
use PHPUnit\Framework\Attributes\CoversClass;
use PHPUnit\Framework\Attributes\DataProvider;
use PHPUnit\Framework\TestCase;
use RuntimeException;

@@ -31,9 +32,8 @@ public function testThrowExceptionWithInvalidArgv(): void
/**
* @param array<int, string> $argv
* @param array<int, string> $expectedArgv
*
* @dataProvider providePhpstormCases
*/
#[DataProvider('providePhpstormCases')]
public function testPhpStormHelper(
array $argv,
array $expectedArgv,
23 changes: 14 additions & 9 deletions test/Unit/WrapperRunner/WrapperRunnerTest.php
Original file line number Diff line number Diff line change
@@ -14,7 +14,11 @@
use ParaTest\WrapperRunner\WrapperWorker;
use PHPUnit\Framework\Attributes\CoversClass;
use PHPUnit\Framework\Attributes\CoversNothing;
use PHPUnit\Framework\Attributes\DataProvider;
use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\Attributes\RequiresOperatingSystemFamily;
use PHPUnit\Framework\Attributes\RequiresPhp;
use PHPUnit\Framework\Attributes\RequiresPhpunit;
use SebastianBergmann\CodeCoverage\CodeCoverage;
use Symfony\Component\Process\Process;

@@ -57,7 +61,7 @@ final class WrapperRunnerTest extends TestBase

public const PASSTHRU_PHP_CUSTOM = 'PASSTHRU_PHP_CUSTOM';

/** @dataProvider provideForWrapperRunnerHandlesBatchSize */
#[DataProvider('provideForWrapperRunnerHandlesBatchSize')]
public function testWrapperRunnerHandlesBatchSize(int $processes, ?int $batchSize, int $expectedPidCount): void
{
$this->bareOptions['--no-configuration'] = true;
@@ -118,7 +122,7 @@ private function extractContentFromDirFiles(string $path): array
return array_unique($res);
}

/** @group github */
#[Group('github')]
#[CoversNothing]
public function testReadPhpunitConfigPhpSectionBeforeLoadingTheSuite(): void
{
@@ -177,7 +181,7 @@ public function testRunnerSortNoSeedProvided(): void
self::assertStringContainsString('Random Seed:', $runnerResult->output);
}

/** @group github */
#[Group('github')]
#[CoversNothing]
public function testErrorsInDataProviderAreHandled(): void
{
@@ -227,7 +231,7 @@ public function testPassthrus(): void
self::assertSame(RunnerInterface::SUCCESS_EXIT, $runnerResult->exitCode);
}

/** @group github */
#[Group('github')]
#[CoversNothing]
public function testReadPhpunitConfigPhpSectionBeforeLoadingTheSuiteManualBootstrap(): void
{
@@ -249,7 +253,7 @@ public function testTeamcityOutput(): void
self::assertNotFalse($format);

$output = $result->output;
$output = preg_replace("/^Processes: \\d+\nRuntime: PHP \\d+.\\d+.\\d+(-dev)?\n\n/", '', $output, 1, $count);
$output = preg_replace("/^Processes: \\d+\nRuntime: PHP \\d+.\\d+.\\d+(-\w+)?\n\n/", '', $output, 1, $count);
self::assertSame(1, $count);
self::assertNotNull($output);

@@ -267,7 +271,7 @@ public function testExitCodesPathWithoutTests(): void
self::assertSame(RunnerInterface::SUCCESS_EXIT, $runnerResult->exitCode);
}

/** @requires OSFAMILY Linux */
#[RequiresOperatingSystemFamily('Linux')]
public function testTeamcityLogHandlesFifoFiles(): void
{
$outputPath = $this->tmpDir . DIRECTORY_SEPARATOR . 'test-output.teamcity';
@@ -433,7 +437,7 @@ public function testRunnerReversed(): void
self::assertSame($defaultOrder, $reverseOrderReversed);
}

/** @group github */
#[Group('github')]
#[CoversNothing]
public function testTokensAreAbsentWhenNoTestTokensIsSpecified(): void
{
@@ -518,8 +522,9 @@ public function testHandleCollisionWithSymfonyOutput(): void
self::assertStringContainsString('<bg=%s>', $runnerResult->output);
}

/** @group github */
#[Group('github')]
#[CoversNothing]
#[RequiresPhpunit('10')]
public function testIgnoreAttributes(): void
{
$this->bareOptions['--configuration'] = $this->fixture('github' . DIRECTORY_SEPARATOR . 'GH756' . DIRECTORY_SEPARATOR . 'phpunit.xml');
@@ -580,7 +585,7 @@ public function testHandleUnexpectedOutput(): void
self::assertStringMatchesFormat($expectedOutput, $runnerResult->output);
}

/** @group github */
#[Group('github')]
#[CoversNothing]
public function testGroupOptionWithDataProviderAndCodeCoverageEnabled(): void
{
5 changes: 2 additions & 3 deletions test/fixtures/fatal_tests/UnitTestWithFatalParseErrorTest.php
Original file line number Diff line number Diff line change
@@ -4,16 +4,15 @@

namespace ParaTest\Tests\fixtures\fatal_tests;

use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\TestCase;

/**
* @runParallel
*/
final class UnitTestWithFatalParseErrorTest extends TestCase
{
/**
* @group fixtures
*/
#[Group('fixtures')]
public function testTruth(): void
{
I will fail fataly because this is not a php statement .
Original file line number Diff line number Diff line change
@@ -4,6 +4,7 @@

namespace ParaTest\Tests\fixtures\function_parallelization_tests;

use PHPUnit\Framework\Attributes\DataProvider;
use PHPUnit\Framework\TestCase;

/** @internal */
@@ -29,13 +30,13 @@ public static function dataProvider2(): array
];
}

/** @dataProvider dataProvider1 */
#[DataProvider('dataProvider1')]
public function testDataProvider1(string $a, string $b): void
{
self::assertEquals($a, $b);
}

/** @dataProvider dataProvider2 */
#[DataProvider('dataProvider2')]
public function testDataProvider2(string $a, string $b): void
{
self::assertEquals($a, $b);
3 changes: 2 additions & 1 deletion test/fixtures/github/GH420/IssueTest.php
Original file line number Diff line number Diff line change
@@ -4,6 +4,7 @@

namespace ParaTest\Tests\fixtures\github\GH420;

use PHPUnit\Framework\Attributes\DataProvider;
use PHPUnit\Framework\TestCase;

use function defined;
@@ -12,7 +13,7 @@
/** @internal */
final class IssueTest extends TestCase
{
/** @dataProvider provideCases */
#[DataProvider('provideCases')]
public function testCases(bool $true): void
{
self::assertTrue($true);
3 changes: 2 additions & 1 deletion test/fixtures/github/GH420bis/IssueTest.php
Original file line number Diff line number Diff line change
@@ -4,14 +4,15 @@

namespace ParaTest\Tests\fixtures\github\GH420bis;

use PHPUnit\Framework\Attributes\DataProvider;
use PHPUnit\Framework\TestCase;

use function defined;

/** @internal */
final class IssueTest extends TestCase
{
/** @dataProvider provideCases */
#[DataProvider('provideCases')]
public function testCases(string $constant): void
{
self::assertStringContainsString('ISSUE_420_BIS_', $constant);
7 changes: 4 additions & 3 deletions test/fixtures/github/GH565/IssueTest.php
Original file line number Diff line number Diff line change
@@ -5,12 +5,13 @@
namespace ParaTest\Tests\fixtures\github\GH565;

use LogicException;
use PHPUnit\Framework\Attributes\DataProvider;
use PHPUnit\Framework\TestCase;

/** @internal */
final class IssueTest extends TestCase
{
/** @dataProvider provideIncomplete */
#[DataProvider('provideIncomplete')]
public function testIncompleteByDataProvider(): void
{
}
@@ -20,7 +21,7 @@ public static function provideIncomplete(): void
self::markTestIncomplete('foo');
}

/** @dataProvider provideSkipped */
#[DataProvider('provideSkipped')]
public function testSkippedByDataProvider(): void
{
}
@@ -30,7 +31,7 @@ public static function provideSkipped(): void
self::markTestSkipped('bar');
}

/** @dataProvider provideError */
#[DataProvider('provideError')]
public function testErrorByDataProvider(): void
{
}
3 changes: 2 additions & 1 deletion test/fixtures/paratest_only_tests/EnvironmentTest.php
Original file line number Diff line number Diff line change
@@ -4,6 +4,7 @@

namespace ParaTest\Tests\fixtures\paratest_only_tests;

use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\TestCase;

use function getenv;
@@ -12,7 +13,7 @@
/** @internal */
final class EnvironmentTest extends TestCase
{
/** @group fixtures */
#[Group('fixtures')]
public function testParatestVariableIsDefined(): void
{
$this->assertEquals(1, getenv('PARATEST'));
Original file line number Diff line number Diff line change
@@ -4,6 +4,7 @@

namespace ParaTest\Tests\fixtures\special_chars;

use PHPUnit\Framework\Attributes\DataProvider;
use PHPUnit\Framework\TestCase;

use function array_map;
@@ -12,7 +13,7 @@

final class UnitTestWithDataProviderSpecialCharsTest extends TestCase
{
/** @dataProvider provideSpecialChars */
#[DataProvider('provideSpecialChars')]
public function testIsItFalse(string $specialChar): void
{
self::assertFalse($specialChar, (string) ord($specialChar));