PHPackages                             umanit/dev-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. [Testing &amp; Quality](/categories/testing)
4. /
5. umanit/dev-bundle

ActiveSymfony-bundle[Testing &amp; Quality](/categories/testing)

umanit/dev-bundle
=================

Helper classes and dependencies for usual dev environment

3.2.0(1mo ago)02.6k↓32.7%1MITPHPPHP ^8.4

Since Apr 22Pushed 2w agoCompare

[ Source](https://github.com/umanit/dev-bundle)[ Packagist](https://packagist.org/packages/umanit/dev-bundle)[ RSS](/packages/umanit-dev-bundle/feed)WikiDiscussions main Synced 2d ago

READMEChangelogDependencies (115)Versions (23)Used By (1)

UmanIT - Dev Bundle
===================

[](#umanit---dev-bundle)

This bundle is used for development at UmanIT.

It provides multiple tools and rules to ease development.

PHP Arkitect
------------

[](#php-arkitect)

Rules for PHP Arkitect:

- `NotAbuseFinalUsage`: Disallow to use final classes if at least one public method of your class is called in another public method of the same class.
- `NotUseConcreteWhenInterfaceExists`: Disallow the use of a concrete class inside typehint if an interface exists for tha class.
- `NotUseGenericException`: Disallow the use of generic `\Exception` class.

### Usage

[](#usage)

Edit your `arkitect.php` file to include the following:

```
use Arkitect\Expression\ForClasses\ResideInOneOfTheseNamespaces;
use Umanit\DevBundle\Arkitect\Expression\ForClasses\NotAbuseFinalUsage;
use Umanit\DevBundle\Arkitect\Expression\ForClasses\NotUseGenericException;

// [...]

$rules[] = Rule
    ::allClasses()
    ->that(new ResideInOneOfTheseNamespaces('App'))
    ->should(new NotUseGenericException())
    ->because('we want to force usage of SPL exceptions or custom ones')
;

$rules[] = Rule
    ::allClasses()
    ->that(new ResideInOneOfTheseNamespaces('App'))
    ->should(new NotUseConcreteWhenInterfaceExists())
    ->because('we want to depend on interfaces, not concrete implementations')
;

$rules[] = Rule
    ::allClasses()
    ->that(new ResideInOneOfTheseNamespaces('App'))
    ->should(new NotAbuseFinalUsage())
    ->because('we want avoid final classes which reduce extensibility')
;
```

Foundry
-------

[](#foundry)

Various tools to ease tests creation:

- A database reseter usable as a Symfony command.
- Some utilities function to ease the creation of entities.
- Possibility to use aliases on Doctrine entities within factories.
- A per-class key/value store accessible via `addToStore`/`getListFromStore` (lists) and `setInStore`/`getFromStore`(scalars), so child factories can accumulate state between persists without declaring static properties (which PHPStan flags on `@immutable` Foundry factories). The store is reset automatically via `ResetInterface`.

PHPStan
-------

[](#phpstan)

Rules for PHPStan:

- `EnsureFunctionBackslashRule`: Ensure that some optimizable functions are called with backslash.
- `MonologExceptionContextKey`: Ensure that an exception inside a Monolog context use the `exception` key.
- `NoWhereOnQueryBuilderRule`: Disallow to use `where` method on `QueryBuilder` in favor of `andWhere`.

### Usage

[](#usage-1)

Edit your `phpstan.neon` file to include the following:

```
rules:
    - Umanit\DevBundle\PHPStan\Rules\EnsureFunctionBackslashRule
    - Umanit\DevBundle\PHPStan\Rules\NoWhereOnQueryBuilderRule
```

TestEventDispatcher
-------------------

[](#testeventdispatcher)

A test double for Symfony's `EventDispatcher` that records all dispatched events so they can be inspected and asserted on in tests without triggering real listeners.

### Usage

[](#usage-2)

Bind `TestEventDispatcher` as the `EventDispatcherInterface` service in your test environment, then assert on the events after the action under test:

```
$event = $dispatcher->getLastDispatchedEvent(MyEvent::class);
$this->assertInstanceOf(MyEvent::class, $event);

// All events dispatched under a given name
$events = $dispatcher->getDispatchedEvents(MyEvent::class);

// Full map of every dispatched event
$all = $dispatcher->getAllDispatchedEvents();
```

TestUtils
---------

[](#testutils)

One static method `TestUtils::setId` to set the id of an entity by reflection. Useful for tests when your entities do not expose a `setId` method.

### Usage

[](#usage-3)

In your test:

```
TestUtils::setId($entity, 42);
```

###  Health Score

51

—

FairBetter than 95% of packages

Maintenance95

Actively maintained with recent releases

Popularity21

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity65

Established project with proven stability

 Bus Factor1

Top contributor holds 82.4% 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 ~19 days

Recently: every ~3 days

Total

22

Last Release

33d ago

Major Versions

0.0.3 → 1.0.02025-04-24

1.1.1 → 2.0.02025-09-24

2.2.1 → 3.0.02026-05-21

2.x-dev → 3.2.02026-06-01

PHP version history (2 changes)0.0.1PHP ^8.2

3.0.0PHP ^8.4

### Community

Maintainers

![](https://www.gravatar.com/avatar/27f13221fde4957c93a4ed7293a6460272d626e53df227e3aae4f35aa9289e69?d=identicon)[DjLeChuck](/maintainers/DjLeChuck)

---

Top Contributors

[![DjLeChuck](https://avatars.githubusercontent.com/u/696780?v=4)](https://github.com/DjLeChuck "DjLeChuck (42 commits)")[![aemion](https://avatars.githubusercontent.com/u/10128609?v=4)](https://github.com/aemion "aemion (9 commits)")

---

Tags

testingdevstatic analysisCoding Standard

### Embed Badge

![Health badge](/badges/umanit-dev-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/umanit-dev-bundle/health.svg)](https://phpackages.com/packages/umanit-dev-bundle)
```

###  Alternatives

[rcsofttech/audit-trail-bundle

Enterprise-grade, high-performance Symfony audit trail bundle. Automatically track Doctrine entity changes with split-phase architecture, multiple transports (HTTP, Queue, Doctrine), and sensitive data masking.

1189.8k](/packages/rcsofttech-audit-trail-bundle)[wp-cli/wp-cli-tests

WP-CLI testing framework

423.1M142](/packages/wp-cli-wp-cli-tests)[easycorp/easyadmin-bundle

Admin generator for Symfony applications

4.3k17.9M388](/packages/easycorp-easyadmin-bundle)[ahmed-bhs/doctrine-doctor

Runtime analysis tool for Doctrine ORM integrated into Symfony Web Profiler. Unlike static linters, it analyzes actual query execution at runtime to detect performance bottlenecks, security vulnerabilities, and best practice violations during development with real execution context and data.

9410.8k](/packages/ahmed-bhs-doctrine-doctor)[2lenet/crudit-bundle

The easy like Crud'it Bundle.

1616.4k14](/packages/2lenet-crudit-bundle)

PHPackages © 2026

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