PHPackages                             jasonmccreary/phpunit-tia - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Testing &amp; Quality](/categories/testing)
4. /
5. jasonmccreary/phpunit-tia

ActiveLibrary[Testing &amp; Quality](/categories/testing)

jasonmccreary/phpunit-tia
=========================

Test Impact Analysis for PHPUnit

v0.1.1(today)47↑2900%MITPHPPHP ^8.4CI passing

Since Jul 31Pushed todayCompare

[ Source](https://github.com/jasonmccreary/phpunit-tia)[ Packagist](https://packagist.org/packages/jasonmccreary/phpunit-tia)[ RSS](/packages/jasonmccreary-phpunit-tia/feed)WikiDiscussions main Synced today

READMEChangelog (2)Dependencies (3)Versions (3)Used By (0)

PHPUnit TIA
===========

[](#phpunit-tia)

This is a port of Pest's new [Test Impact Analysis (TIA) Engine](https://pestphp.com/docs/tia). TIA greatly improves test suite performance by only running tests which relate to impacted (changed) files. This plugin brings the same performance improvements to PHPUnit.

**Note:** as a third-party plugin, the actual test runner can not be changed. Instead of preserving the previous state, unimpacted tests are marked as `skipped` (`S`). Suites running `--fail-on-skipped` (or `--display-skipped`) don't need to opt out manually — TIA detects this and automatically falls back to actually running the test instead of replaying a skip that policy would flag as CI-red.

Installation
------------

[](#installation)

This plugin requires PHPUnit 13 and PHP 8.4, as well as a code coverage driver ([pcov](https://github.com/krakjoe/pcov) or [Xdebug](https://xdebug.org/) in `coverage` mode) to record new coverage. If you are not running PHPUnit 13, you may use [Shift to automate the upgrade](https://laravelshift.com/upgrade-phpunit-13).

```
composer require --dev jasonmccreary/phpunit-tia

```

Next, register the extension in your PHPUnit configuration:

```

```

Usage
-----

[](#usage)

To enable TIA, add the trait to your base `TestCase`:

```
use JMac\Testing\PhpUnit\Tia\Traits\RunWithTia;

abstract class TestCase extends \PHPUnit\Framework\TestCase
{
    use RunWithTia;
}
```

This will activate TIA for every `phpunit` invocation — unaffected tests will be skipped automatically.

**Note:** if your `TestCase` already declares `setUp()`, you will need to alias and call the trait's `setUp` explicitly:

```
abstract class TestCase extends \PHPUnit\Framework\TestCase
{
    use RunWithTia {
        RunWithTia::setUp as tiaSetUp;
    }

    protected function setUp(): void
    {
        $this->tiaSetUp();

        // ...your own setUp logic
    }
}
```

To bypass TIA, you may pass an environment variable at runtime:

```
PHPUNIT_TIA=0 phpunit ...
```

While a baseline will be established automatically, you may pass an environment variable to rebuild:

```
PHPUNIT_TIA_FRESH=1 phpunit ...
```

CI Workflows
------------

[](#ci-workflows)

For TIA to skip tests in CI, your baseline graph must persist between runs. See our own [GitHub Action workflow](.github/workflows/tests.yml) for an example. At a high level, your workflow needs to:

- Check out with full git history (`fetch-depth: 0`), since TIA diffs against a baseline commit
- Re-attach `HEAD` to the real branch name, since a detached `HEAD` collapses baselines across branches
- Cache TIA's storage directory (`~/.phpunit-tia` for `global` storage, or the configured path for `local`) keyed per-branch/runner, and save it after every run

Contributing
------------

[](#contributing)

You may contribute by opening a Pull Request with your changes. All PRs should target `main`, include tests to verify your change change, and pass the GitHub Action workflows.

###  Health Score

42

—

FairBetter than 88% of packages

Maintenance100

Actively maintained with recent releases

Popularity10

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity42

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

2

Last Release

0d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/92a6bfc994b500ee991e6a7c581fb07af26b68b85821ff354bed0ac786fc9211?d=identicon)[jasonmccreary](/maintainers/jasonmccreary)

---

Top Contributors

[![jasonmccreary](https://avatars.githubusercontent.com/u/161071?v=4)](https://github.com/jasonmccreary "jasonmccreary (22 commits)")

---

Tags

phpphpunittesttest-automationtestingphptestingphpunitcoveragetiatest impact analysis

###  Code Quality

TestsPHPUnit

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/jasonmccreary-phpunit-tia/health.svg)

```
[![Health](https://phpackages.com/badges/jasonmccreary-phpunit-tia/health.svg)](https://phpackages.com/packages/jasonmccreary-phpunit-tia)
```

###  Alternatives

[brianium/paratest

Parallel testing for PHP

2.5k142.8M1.1k](/packages/brianium-paratest)[pestphp/pest

The elegant PHP Testing Framework.

11.6k77.3M23.0k](/packages/pestphp-pest)[infection/infection

Infection is a Mutation Testing framework for PHP. The mutation adequacy score can be used to measure the effectiveness of a test set in terms of its ability to detect faults.

2.2k30.0M2.7k](/packages/infection-infection)[playwright-php/playwright

Modern PHP library for Playwright automation: browsing, scraping, screenshots, testing, and more.

20563.9k7](/packages/playwright-php-playwright)[facile-it/paraunit

paraunit

146905.2k19](/packages/facile-it-paraunit)[vinceamstoutz/symfony-security-auditor

AI-powered multi-agent security auditor for Symfony applications — provider-agnostic via symfony/ai

821.8k](/packages/vinceamstoutz-symfony-security-auditor)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
