PHPackages                             vektah/bugfree-dangerzone - 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. vektah/bugfree-dangerzone

ActiveType-verifier[Testing &amp; Quality](/categories/testing)

vektah/bugfree-dangerzone
=========================

Type verification for php source. Ensures uses and all types within a file verify against the projects auto loader.

0.4.3(9y ago)1830.5k↑2900%2[2 issues](https://github.com/Vektah/bugfree-dangerzone/issues)20PHPPHP &gt;=5.5.0

Since Jul 8Pushed 9y ago1 watchersCompare

[ Source](https://github.com/Vektah/bugfree-dangerzone)[ Packagist](https://packagist.org/packages/vektah/bugfree-dangerzone)[ Docs](https://github.com/Vektah/bugfree-dangerzone)[ RSS](/packages/vektah-bugfree-dangerzone/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (8)Dependencies (9)Versions (28)Used By (20)

bugfree-dangerzone [![Build Status](https://camo.githubusercontent.com/814000f4b061a421e53f2229f148b5a8909953412c88d4ce79c64a496fe651af/68747470733a2f2f7472617669732d63692e6f72672f56656b7461682f627567667265652d64616e6765727a6f6e652e706e673f6272616e63683d6d6173746572)](https://travis-ci.org/Vektah/bugfree-dangerzone)
=============================================================================================================================================================================================================================================================================================================================

[](#bugfree-dangerzone-)

Bugfree Dangerzone is a PHP namespace validator written in PHP. It uses your autoloader to verify that:

- all of the use statements are valid
- that all exception catch blocks and type hints have a valid type
- all doc block types are valid (eg @param Foo $foo)
- all Doctrine annotations can be resolved (eg @FOobar())
- access level validation for constructors and static methods
- Finally that all use statements are actually used.

Getting Started
---------------

[](#getting-started)

Add "vektah/bugfree-dangerzone" to your projects composer.json, it should look something like this:

```
    "require-dev": {
        "vektah/bugfree-dangerzone": "0.2.0"
    },

```

Then of course:

```
composer.phar update

```

to update your dependencies

then run

```
./vendor/bin/bugfree lint src

```

If your project has its own autoloader you can use it instead:

```
./vendor/bin/bugfree lint --bootstrap yourautoloader.php src

```

XML Output
----------

[](#xml-output)

For use in CI tools like Jenkins some pretty test count output is just not good enough!

To generate machine readable output:

```
./vendor/bin/bugfree lint src --junitXml junit_results.xml --checkstyleXml checkstyle_results.xml

```

Configuration
-------------

[](#configuration)

Bugfree Dangerzone is rather picky out of the box, but its easy to decrease its verbosity.

from your projects base directory run:

```
./vendor/bin/bugfree generateConfig

```

which will build a config file bugfree.json in your current directory:

```
{
    "emitLevel": {
        "unableToResolveType": "error",
        "unableToResolveTypeInComment": "error",
        "unableToResolveUse": "error",
        "useOfUnqualifiedType": "warning",
        "useOfUnqualifiedTypeInComment": "warning",
        "duplicateAlias": "error",
        "malformedUse": "error",
        "multiStatementUse": "warning",
        "missingNamespace": "error",
        "unusedUse": "warning"
    }
}

```

each of these warning types can be either error, warning, or suppress. For example to ignore all messages about missing namespaces then just change

```
"missingNamespace": "error",

```

to

```
"missingNamespace": "suppress",

```

If the configuration gets updated in the future to have more options then running generateConfig again will keep your current settings and add any new defaults.

###  Health Score

35

—

LowBetter than 79% of packages

Maintenance18

Infrequent updates — may be unmaintained

Popularity31

Limited adoption so far

Community22

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 74.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 ~49 days

Recently: every ~237 days

Total

26

Last Release

3463d ago

PHP version history (2 changes)0.3.6PHP &gt;=5.4.0

0.4.3PHP &gt;=5.5.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/05cbc29645134e6b4b1472e66a3966f5627d346ddbfacf6c873e48b2e15c64af?d=identicon)[Vektah](/maintainers/Vektah)

---

Top Contributors

[![vektah](https://avatars.githubusercontent.com/u/2247982?v=4)](https://github.com/vektah "vektah (32 commits)")[![guymers](https://avatars.githubusercontent.com/u/1100841?v=4)](https://github.com/guymers "guymers (11 commits)")

---

Tags

testingtypetypehintci

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/vektah-bugfree-dangerzone/health.svg)

```
[![Health](https://phpackages.com/badges/vektah-bugfree-dangerzone/health.svg)](https://phpackages.com/packages/vektah-bugfree-dangerzone)
```

###  Alternatives

[behat/behat

Scenario-oriented BDD framework for PHP

4.0k96.8M1.9k](/packages/behat-behat)[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.2k26.2M1.8k](/packages/infection-infection)[phpbench/phpbench

PHP Benchmarking Framework

2.0k13.0M627](/packages/phpbench-phpbench)[brianium/paratest

Parallel testing for PHP

2.5k118.8M753](/packages/brianium-paratest)[magento/magento2-functional-testing-framework

Magento2 Functional Testing Framework

15511.5M30](/packages/magento-magento2-functional-testing-framework)[moodlehq/moodle-plugin-ci

Helps running Moodle plugins analysis checks and tests under various CI environments.

612.6M](/packages/moodlehq-moodle-plugin-ci)

PHPackages © 2026

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