PHPackages                             atournayre/phparkitect-rules - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. atournayre/phparkitect-rules

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

atournayre/phparkitect-rules
============================

Provides additional rules for phparkitect/phparkitect for Symfony and API Platform

0.1.0(1y ago)568[1 issues](https://github.com/atournayre/phparkitect-rules/issues)MITPHPPHP &gt;=8.1

Since Dec 2Pushed 1y ago1 watchersCompare

[ Source](https://github.com/atournayre/phparkitect-rules)[ Packagist](https://packagist.org/packages/atournayre/phparkitect-rules)[ RSS](/packages/atournayre-phparkitect-rules/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (2)Dependencies (6)Versions (4)Used By (0)

phparkitect rules
=================

[](#phparkitect-rules)

The project is structured around the concept of architectural rules for PHP classes, with a focus on namespace dependencies and class naming conventions.

Installing
----------

[](#installing)

```
composer require --dev atournayre/phparkitect-rules
```

Usage
-----

[](#usage)

Rules must be used in a phparkitect configuration file.

Here is an example of how to use it:

```
// phparkitect.php
use Arkitect\ClassSet;
use Arkitect\CLI\Config;
use Arkitect\Expression\ForClasses\IsFinal;
use Arkitect\Expression\ForClasses\ResideInOneOfTheseNamespaces;
use Arkitect\Rules\Rule;
use Atournayre\PHPArkitect\Builder\RuleBuilder;
use Atournayre\PHPArkitect\Rules\ListenerMustBeLoggableLog;
use Atournayre\PHPArkitect\Set\Sets;

return static function (Config $config): void {
    $classSet = ClassSet::fromDir(__DIR__ . '/src');

    $rules = RulesBuilder::create
        ->add(new ListenerMustBeLoggableLog)
        // Add rules for Symfony Command
        ->set(Sets::symfonyCommand())
        // Add rules for Doctrine Naming
        ->set(Sets::doctrineUniformNaming())
        // Add regular rules
        ->add(
            Rule::allClasses()
                ->that(new ResideInOneOfTheseNamespaces('App'))
                ->should(new IsFinal())
                ->because('All classes in App namespace must be final')
        )
        ->rules();

    $config->add($classSet, ...$rules);
};
```

You can use sets or rules individually.

Contributing
------------

[](#contributing)

Contributions are welcome!

License
-------

[](#license)

This project is licensed under the MIT License.

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance28

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity43

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 95.7% 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 ~95 days

Total

3

Last Release

699d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/be702ea3d10de6d97d83c32866fc9cfe1830a055e7f8b685c8434ccad40416c1?d=identicon)[atournayre](/maintainers/atournayre)

---

Top Contributors

[![atournayre](https://avatars.githubusercontent.com/u/4262077?v=4)](https://github.com/atournayre "atournayre (22 commits)")[![mend-bolt-for-github[bot]](https://avatars.githubusercontent.com/in/16809?v=4)](https://github.com/mend-bolt-for-github[bot] "mend-bolt-for-github[bot] (1 commits)")

---

Tags

phparkitectphparkitect-rules

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/atournayre-phparkitect-rules/health.svg)

```
[![Health](https://phpackages.com/badges/atournayre-phparkitect-rules/health.svg)](https://phpackages.com/packages/atournayre-phparkitect-rules)
```

###  Alternatives

[phpdocumentor/reflection-docblock

With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.

9.4k722.2M1.2k](/packages/phpdocumentor-reflection-docblock)[icanhazstring/composer-unused

Show unused packages by scanning your code

1.7k7.0M188](/packages/icanhazstring-composer-unused)[symplify/monorepo-builder

Not only Composer tools to build a Monorepo.

5205.3M82](/packages/symplify-monorepo-builder)[phpdocumentor/reflection

Reflection library to do Static Analysis for PHP Projects

12521.4M108](/packages/phpdocumentor-reflection)[sylius/fixtures-bundle

Configurable fixtures for Symfony applications.

517.7M12](/packages/sylius-fixtures-bundle)[sylius/promotion

Flexible promotion management for PHP applications.

28477.8k9](/packages/sylius-promotion)

PHPackages © 2026

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