PHPackages                             spryker/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. [Framework](/categories/framework)
4. /
5. spryker/project-architecture-sniffer

ActiveLibrary[Framework](/categories/framework)

spryker/project-architecture-sniffer
====================================

Spryker Project Architecture Sniffer

0.2.1(1y ago)210.1k↓40.2%3[1 PRs](https://github.com/spryker/project-architecture-sniffer/pulls)MITPHPPHP &gt;=8.0

Since Jan 16Pushed 1y ago5 watchersCompare

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

READMEChangelog (3)Dependencies (6)Versions (4)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 Projects.

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

[](#priority-levels)

- `1`: Сritical
- `2`: Major
- `3`: Medium
- `4`: Minor

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)

- `29` adapted [PHPMD rules](documentations/PHPMDrules.md)
- `39` adapted [Spryker Architecture sniffer rules](documentations/SPRYKERrules.md)
- `13` new [Project Architecture sniffer rules](documentations/PROJECTrules.md)

Usage
-----

[](#usage)

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

```
composer require --dev spryker/project-architecture-sniffer

```

### Running

[](#running)

Find [command line option](https://phpmd.org/documentation/index.html).

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

```
vendor/bin/phpmd src/Pyz/ text vendor/spryker/project-architecture-sniffer/src/ruleset.xml --minimumpriority 3

```

### Baseline

[](#baseline)

Existing projectsand demo-shops may contain rule violations. The decision to refactor existing violations may be at the discretion of each project individually. It is recommended to approach this in a differentiated manner. To integrate rules into the project immediately, there recommended to generate a [baseline](https://phpmd.org/documentation/#baseline) and move forward. It is also permissible to [suppress rules](https://phpmd.org/documentation/suppress-warnings.html) on a case-by-case basis.

### Ruleset

[](#ruleset)

#### Ruleset that contains all documented rules

[](#ruleset-that-contains-all-documented-rules)

```
vendor/spryker/project-architecture-sniffer/src/ruleset.xml

```

#### Ruleset that contains [Spryker Architecture sniffer rules](documentations/SPRYKERrules.md) and [Project Architecture sniffer rules](documentations/PROJECTrules.md)

[](#ruleset-that-contains-spryker-architecture-sniffer-rules-and-project-architecture-sniffer-rules)

```
vendor/spryker/project-architecture-sniffer/src/Project/ruleset.xml

```

#### Ruleset that contains [PHPMD rules](documentations/PHPMDrules.md)

[](#ruleset-that-contains-phpmd-rules)

```
vendor/spryker/project-architecture-sniffer/src/PhpMd/ruleset.xml

```

#### More

[](#more)

Find `vendor/spryker/project-architecture-sniffer/src/`

```
├── PhpMd
│   ├── cleancode.xml
│   ├── codesize.xml
│   ├── controversial.xml
│   ├── design.xml
│   ├── naming.xml
│   ├── ruleset.xml
│   └── unusedcode.xml
├── Project
│   ├── Client
│   │   └── ruleset.xml
│   ├── Common
│   │   └── ruleset.xml
│   ├── Glue
│   │   └── ruleset.xml
│   ├── Service
│   │   └── ruleset.xml
│   ├── Shared
│   │   └── ruleset.xml
│   ├── Yves
│   │   └── ruleset.xml
│   ├── Zed
│   │   └── ruleset.xml
│   └── ruleset.xml
└── ruleset.xml

```

### Local Code Review Usage

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

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

cp vendor/spryker/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/ text vendor/spryker/project-architecture-sniffer/src/ruleset.xml --minimumpriority 3

```

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

33

—

LowBetter than 75% of packages

Maintenance41

Moderate activity, may be stable

Popularity30

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity39

Early-stage or recently created project

 Bus Factor1

Top contributor holds 93.3% 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 ~177 days

Total

3

Last Release

498d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/10738957?v=4)[Spryker Bot](/maintainers/spryker-bot)[@spryker-bot](https://github.com/spryker-bot)

---

Top Contributors

[![vitaliiivanovspryker](https://avatars.githubusercontent.com/u/70893950?v=4)](https://github.com/vitaliiivanovspryker "vitaliiivanovspryker (28 commits)")[![profuel](https://avatars.githubusercontent.com/u/3640652?v=4)](https://github.com/profuel "profuel (1 commits)")[![spryker-release-bot](https://avatars.githubusercontent.com/u/26904324?v=4)](https://github.com/spryker-release-bot "spryker-release-bot (1 commits)")

---

Tags

standardsframeworkarchitecturesnifferspryker

###  Code Quality

TestsCodeception

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

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

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

###  Alternatives

[spryker/architecture-sniffer

Spryker Architecture Sniffer

142.7M46](/packages/spryker-architecture-sniffer)[pestphp/pest-plugin-arch

The Arch plugin for Pest PHP.

4145.8M4.0k](/packages/pestphp-pest-plugin-arch)[spryker/code-sniffer

Spryker Code Sniffer Standards

374.1M2.3k](/packages/spryker-code-sniffer)[pestphp/pest-plugin-stressless

Stressless plugin for Pest

67792.6k16](/packages/pestphp-pest-plugin-stressless)

PHPackages © 2026

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