PHPackages                             vitaliiivanovspryker/project-architecture-sniffer - 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. vitaliiivanovspryker/project-architecture-sniffer

Abandoned → [spryker/project-architecture-sniffer](/?search=spryker%2Fproject-architecture-sniffer)Library

vitaliiivanovspryker/project-architecture-sniffer
=================================================

Spryker Project Architecture Sniffer

04PHP

Since Jan 9Pushed 2y ago1 watchersCompare

[ Source](https://github.com/vitaliiivanovspryker/project-architecture-sniffer)[ Packagist](https://packagist.org/packages/vitaliiivanovspryker/project-architecture-sniffer)[ RSS](/packages/vitaliiivanovspryker-project-architecture-sniffer/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Project Architecture Sniffer
============================

[](#project-architecture-sniffer)

[![Minimum PHP Version](https://camo.githubusercontent.com/905c670b6e3bc20026bddbc8923df4d38111e526b88f1252ac4ceb6643299d96/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d253345253344253230382e302d3838393242462e737667)](https://php.net/)[![License](https://camo.githubusercontent.com/6406aba2f1f5dd0f5b25e0b748f7c8c6c9c974d9db12d617605de69f7aa41350/68747470733a2f2f706f7365722e707567782e6f72672f737072796b65722f6172636869746563747572652d736e69666665722f6c6963656e73652e737667)](https://packagist.org/packages/spryker/architecture-sniffer)

Architecture Sniffer for Spryker projects. Over `80` rules adapted for Spryker Project.

Priority Levels
---------------

[](#priority-levels)

- `1`: Сritical (stop it)
- `2`: Major (it is not a Spryker project)
- `3`: Medium (better to have)
- `4`: Minor (nice to have)
- `5`: Spryker Core (code matches Spryker Architecture Rules and even more)

We recommend minimum priority `3` by default for local and CI checks.

Note: Lower priorities (higher numbers) always include the higher priorities (lower numbers).

Content
-------

[](#content)

- `36` adapted PHPMD rules
- `38` adapted Spryker Architecture sniffer rules
- `10` new Project level rules

Usage
-----

[](#usage)

Make sure you include the sniffer as `require-dev` dependency:

```
composer require --dev vitaliiivanovspryker/project-architecture-sniffer:dev-main

```

### Spryker Usage

[](#spryker-usage)

```
namespace Pyz\Zed\Development;

class DevelopmentConfig extends \Spryker\Zed\Development\DevelopmentConfig
{
    public function getArchitectureSnifferRuleset(): string
    {
        $vendorDir = APPLICATION_VENDOR_DIR . DIRECTORY_SEPARATOR;

        return $vendorDir . 'vitaliiivanovspryker/project-architecture-sniffer/src/ruleset.xml';
    }
}
```

When using Spryker you can use the Spryker CLI console command for it:

```

console code:sniff:architecture [-m ModuleName] [optional-sub-path] -v [-p priority]

```

Verbose output is recommended here.

### Manual Usage

[](#manual-usage)

You can also manually run the Project Architecture Sniffer from console by using:

```

vendor/bin/phpmd src/Pyz/ (xml|text|html) vendor/vitaliiivanovspryker/project-architecture-sniffer/src/ruleset.xml --minimumpriority 2

```

### Local Code Review Usage

[](#local-code-review-usage)

```

vendor/bin/phpmd src json vendor/vitaliiivanovspryker/project-architecture-sniffer/src/ruleset.xml --minimumpriority 4 --reportfile results.json

cp vendor/vitaliiivanovspryker/project-architecture-sniffer/tools/script.php script.php

php script.php

```

### Debugging

[](#debugging)

```
docker/sdk cli -x

PHPMD_ALLOW_XDEBUG=true vendor/bin/phpmd src/Pyz/ (xml|text|html) vendor/vitaliiivanovspryker/project-architecture-sniffer/src/ruleset.xml --minimumpriority 2

```

Roadmap (expected rules)
------------------------

[](#roadmap-expected-rules)

feel free to suggest

Writing new sniffs
------------------

[](#writing-new-sniffs)

Add them to inside src/Project folder with the same folder structure.

Don't forget to update `ruleset.xml`.

Every sniff needs to implement either the `ClassAware`, `FunctionAware`, `InterfaceAware`, or `MethodAware` interface to be recognised.

### Setup

[](#setup)

Run

```

composer install

```

### Testing

[](#testing)

no testing at this moment

### Running code-sniffer on this project

[](#running-code-sniffer-on-this-project)

Make sure this repository is Spryker coding standard conform:

```

composer cs-check

```

If you want to fix the fixable errors, use

```

composer cs-fix

```

If you want to run phpstan

```

composer stan

```

Once everything is green you can make a PR with your changes.

###  Health Score

13

—

LowBetter than 1% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity19

Early-stage or recently created project

 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/799f9a8c1b19c2532c51ab10b6ec19cd7ecf6dc218f614ed961625cd9c393de4?d=identicon)[vitaliiivanovspryker](/maintainers/vitaliiivanovspryker)

---

Top Contributors

[![vitaliiivanovspryker](https://avatars.githubusercontent.com/u/70893950?v=4)](https://github.com/vitaliiivanovspryker "vitaliiivanovspryker (11 commits)")

### Embed Badge

![Health badge](/badges/vitaliiivanovspryker-project-architecture-sniffer/health.svg)

```
[![Health](https://phpackages.com/badges/vitaliiivanovspryker-project-architecture-sniffer/health.svg)](https://phpackages.com/packages/vitaliiivanovspryker-project-architecture-sniffer)
```

PHPackages © 2026

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