PHPackages                             ruano\_a/selective-test-isolation-bundle - 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. ruano\_a/selective-test-isolation-bundle

ActiveSymfony-bundle

ruano\_a/selective-test-isolation-bundle
========================================

A Symfony bundle providing a way to simply rollback the database if an annotation is present on test methods.

1.0.1(5y ago)06MITPHP

Since Sep 7Pushed 5y ago1 watchersCompare

[ Source](https://github.com/ruano-a/selective-test-isolation-bundle)[ Packagist](https://packagist.org/packages/ruano_a/selective-test-isolation-bundle)[ RSS](/packages/ruano-a-selective-test-isolation-bundle/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (2)DependenciesVersions (3)Used By (0)

SelectiveTestIsolationBundle
============================

[](#selectivetestisolationbundle)

A Symfony bundle providing a way to simply rollback the database if an annotation is present on test methods. It only works with a PHPUnit which version is &gt;= 7.5 .

Configuration
=============

[](#configuration)

```
composer require --dev ruano_a/selective-test-isolation-bundle

```

- If using symfony 3 or below : add the bundle in AppKernel.php:

```
if (in_array($env, ['dev', 'test'])) {
    ...
    if ($env === 'test') {
        $bundles[] = new ruano_a\SelectiveTestIsolationBundle\SelectiveTestIsolationBundle();
    }
}
```

- Else if using symfony 4 or above : add the bundle in bundles.php:

```
return [
    ...,
    ruano_a\SelectiveTestIsolationBundle\SelectiveTestIsolationBundle::class => ['test' => true],
];
```

- Add the extension in your xml config (phpunit.xml)

```

        ...

```

- The test class using the annotation must extends the ruano\_a\\SelectiveTestIsolationBundle\\PHPUnit\\IsolableKernelTestCase class.

```
    class myTestClass extends IsolableKernelTestCase
    {
    ...
```

- Then put the @Rollback annotation (from ruano\_a\\SelectiveTestIsolationBundle\\Annotations\\Rollback) to the methods that mustn't affect the database:

```
    /**
     * @Rollback
     */
    public function testFunctionChangingTheDatabase()
    {
    ...
```

And that's it.

Notes
=====

[](#notes)

- IMPORTANT : The IsolableKernelTestCase class starts the kernel at the loading of the class, so don't do it twice. It needs it to access the entity manager. If you want to start it somewhere else, override the methods.
- This bundle can't work with a PHPUnit version prior to 7.5 because the listener system doesn't seem to let you get the test method informations.
- It has been made for my personal use, after a fail to modify a fork of this bundle  (I wanted to choose when to perform the rollbacks, but it caused issues).

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity55

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

2069d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/10533308?v=4)[ruano-a](/maintainers/ruano-a)[@ruano-a](https://github.com/ruano-a)

---

Top Contributors

[![ruano-a](https://avatars.githubusercontent.com/u/10533308?v=4)](https://github.com/ruano-a "ruano-a (3 commits)")

### Embed Badge

![Health badge](/badges/ruano-a-selective-test-isolation-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/ruano-a-selective-test-isolation-bundle/health.svg)](https://phpackages.com/packages/ruano-a-selective-test-isolation-bundle)
```

PHPackages © 2026

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