PHPackages                             raffaelecarelle/bdd-arkitect - 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. raffaelecarelle/bdd-arkitect

ActiveBehat-extension[Testing &amp; Quality](/categories/testing)

raffaelecarelle/bdd-arkitect
============================

A Behat extension for verifying and maintaining naming conventions and file structure rules

10[1 PRs](https://github.com/raffaelecarelle/BddArkitect/pulls)PHPCI passing

Since Aug 22Pushed 5mo agoCompare

[ Source](https://github.com/raffaelecarelle/BddArkitect)[ Packagist](https://packagist.org/packages/raffaelecarelle/bdd-arkitect)[ RSS](/packages/raffaelecarelle-bdd-arkitect/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (2)Used By (0)

BDD Arkitect
============

[](#bdd-arkitect)

A Behat extension for verifying and maintaining naming conventions and file structure rules in your PHP projects.

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

[](#installation)

Install via Composer:

```
composer require raffaelecarelle/bdd-arkitect
```

Overview
--------

[](#overview)

BDD Arkitect provides a set of Behat contexts that allow you to write scenarios to validate your project's:

- File structure and naming conventions
- Namespace structure and PSR-4 compliance
- PHP class structure and dependencies

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

[](#configuration)

BDD Arkitect can be configured in your `behat.yml` file. Here's an example configuration:

```
default:
  suites:
    # Your suites configuration...

  extensions:
    BddArkitect\Extension\ArkitectExtension:
      project_root: "%paths.base%"
      paths:
        - src
        - tests
      excludes:
        - vendor
        - var
        - cache
      ignore_errors:
        - ".*should be final.*"
```

### Configuration Options

[](#configuration-options)

#### project\_root

[](#project_root)

The root directory of the project. Default: `%paths.base%`

```
project_root: "%paths.base%"
```

#### paths

[](#paths)

Array of relative paths where the tool should analyze and validate rules. If empty, all paths will be analyzed (except those in `excludes`).

```
paths:
  - src
  - tests
```

#### excludes

[](#excludes)

Array of relative paths to exclude from validation.

```
excludes:
  - vendor
  - var
  - cache
```

#### ignore\_errors

[](#ignore_errors)

Array of regex patterns to filter errors. Errors matching these patterns will be ignored.

```
ignore_errors:
  - ".*should be final.*"
  - ".*should have attribute.*"
```

Usage
-----

[](#usage)

### File Structure Validation

[](#file-structure-validation)

```
Feature: File Structure Validation

  Scenario: Validate controller file naming
    Given I have a project in directory "src/Controller"
    And I am checking files matching pattern "*.php"
    Then files should follow naming pattern "*Controller.php"
    And files should have extension "php"
```

### Namespace Structure Validation

[](#namespace-structure-validation)

```
Feature: Namespace Structure Validation

  Scenario: Validate controller namespace
    Given I have a PSR-4 compliant project
    And I am analyzing classes in namespace "App\Controller"
    Then namespace "App\Controller" should exist
    And namespace "App\Controller" should contain only classes matching pattern "*Controller"
```

### PHP Class Structure Validation

[](#php-class-structure-validation)

```
Feature: PHP Class Structure Validation

  Scenario: Validate controller class structure
    Given I have a PHP class matching pattern "*Controller"
    And I am analyzing the class "App\Controller\UserController"
    Then the class should be final
    And the class should not be abstract
    And the class should not be interface
```

Examples
--------

[](#examples)

Check the example feature files in the project root:

- `example-file-structure.feature`
- `example-namespace-structure.feature`
- `example-class-structure.feature`

Testing
-------

[](#testing)

See the [tests/README.md](tests/README.md) file for information on running the tests.

License
-------

[](#license)

MIT

###  Health Score

19

—

LowBetter than 10% of packages

Maintenance50

Moderate activity, may be stable

Popularity2

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity15

Early-stage or recently created project

 Bus Factor1

Top contributor holds 82.8% 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/470d7f2b64c268ccd0d73d1d19da604f5049ffdc717170df28ac460d34b8a327?d=identicon)[raffaelecarelle](/maintainers/raffaelecarelle)

---

Top Contributors

[![raffaelecarelle](https://avatars.githubusercontent.com/u/15015792?v=4)](https://github.com/raffaelecarelle "raffaelecarelle (24 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (5 commits)")

### Embed Badge

![Health badge](/badges/raffaelecarelle-bdd-arkitect/health.svg)

```
[![Health](https://phpackages.com/badges/raffaelecarelle-bdd-arkitect/health.svg)](https://phpackages.com/packages/raffaelecarelle-bdd-arkitect)
```

###  Alternatives

[phpspec/prophecy

Highly opinionated mocking framework for PHP 5.3+

8.5k551.7M682](/packages/phpspec-prophecy)[vimeo/psalm

A static analysis tool for finding errors in PHP applications

5.8k77.5M6.7k](/packages/vimeo-psalm)[brianium/paratest

Parallel testing for PHP

2.5k118.8M754](/packages/brianium-paratest)[beberlei/assert

Thin assertion library for input validation in business models.

2.4k96.9M570](/packages/beberlei-assert)[mikey179/vfsstream

Virtual file system to mock the real file system in unit tests.

1.4k108.0M2.7k](/packages/mikey179-vfsstream)[orchestra/testbench

Laravel Testing Helper for Packages Development

2.2k39.1M32.1k](/packages/orchestra-testbench)

PHPackages © 2026

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