PHPackages                             phpsoftbox/requisites - 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. phpsoftbox/requisites

ActiveLibrary[Framework](/categories/framework)

phpsoftbox/requisites
=====================

Requisites component for the PhpSoftBox framework

07PHP

Since Apr 23Pushed 2mo agoCompare

[ Source](https://github.com/phpsoftbox/requisites)[ Packagist](https://packagist.org/packages/phpsoftbox/requisites)[ RSS](/packages/phpsoftbox-requisites/feed)WikiDiscussions master Synced 2w ago

READMEChangelogDependenciesVersions (1)Used By (0)

Requisites (Design Draft)
=========================

[](#requisites-design-draft)

Компонент для хранения и валидации реквизитов/паспортных данных/заявлений в унифицированном виде.

Статус: `draft` (дизайн и план внедрения).

Что решает
----------

[](#что-решает)

- Не привязан к одной предметной области (`Company`).
- Поддерживает разные сущности-владельцы (компания, пользователь, заявление и т.д.).
- Поддерживает разные схемы полей и валидации, в том числе country-specific.
- Позволяет использовать как общую таблицу, так и кастомные таблицы проекта.

Документация
------------

[](#документация)

- [01-instructions.md](docs/01-instructions.md)
    - включает детальную стратегию `payload`-миграций (`schema_version`, lazy/eager, backfill);
    - включает обязательную тестовую стратегию и DoD по этапам.

Payload Migrations
------------------

[](#payload-migrations)

- `PayloadMigrationEngine` — выполняет пошаговые `N -> N+1` миграции payload.
- `MigrationAwareStorageAdapter` — lazy-миграция на `find()`/`save()`.
- `BackfillMigrationRunner` — eager/backfill миграция таблицы `requisites_records`.
- `StaticTargetVersionResolver` — целевая версия схемы по `profile/selector`.

CLI
---

[](#cli)

Пакет регистрирует команду `requisites:migrate`.

Примеры:

- `php psb requisites:migrate --profile=company --dry-run`
- `php psb requisites:migrate --profile=company --selector=country:RU --from=1 --to=3 --batch-size=200`

Profile Contract
----------------

[](#profile-contract)

- `RequisitesProfileInterface` — контракт profile-definition:
    - selector (`selectorKey/defaultSelector`);
    - схемы (`schemas`);
    - target versions + payload migrators;
    - `requestSchemaClasses` для request-level валидации;
    - `storageDefinition` для profile-routed storage.

Built-in Catalogs And Forms
---------------------------

[](#built-in-catalogs-and-forms)

- `PhpSoftBox\Requisites\Country\RequisitesCountryCatalog`:
    - `countryCodes()`
    - `countryOptions()`
    - `defaultCountryCode()`
    - `normalizeCountryCode(...)`
- `PhpSoftBox\Requisites\Validation\Form\Company\CompanyRequisitesRuFormValidation`
- `PhpSoftBox\Requisites\Validation\Form\Company\CompanyRequisitesKzFormValidation`
- `PhpSoftBox\Requisites\Validation\Form\Company\CompanyRequisitesByFormValidation`
- `PhpSoftBox\Requisites\Validation\Form\Company\CompanyRequisitesAmFormValidation`
- `PhpSoftBox\Requisites\Validation\Form\Company\CompanyRequisitesAzFormValidation`
- `PhpSoftBox\Requisites\Validation\Form\Company\CompanyRequisitesGenericFormValidation`

Для зарубежных форм (`KZ/AM/AZ/BY`) текущий минимальный набор полей:

- `organization_type`
- `organization_name`
- `organization_inn`
- `organization_address`
- `bank_name`
- `bank_account_number`

Built-in Rules By Country
-------------------------

[](#built-in-rules-by-country)

- `Validation\Rule\Ru\*`:
    - `InnChecksumValidation`
    - `OgrnByTypeValidation`
    - `BankAccountChecksumValidation`
    - `KppFormatValidation`
    - `SnilsChecksumValidation`
- `Validation\Rule\Kz\*`:
    - `BinIinChecksumValidation`
    - `IbanFormatValidation`
- `Validation\Rule\By\*`:
    - `UnpFormatValidation`
    - `IbanFormatValidation`
- `Validation\Rule\Am\*`:
    - `TinFormatValidation`
    - (для банковских реквизитов в `AM` используется SWIFT/BIC + формат номера счета, без IBAN-правила в пакете)
- `Validation\Rule\Az\*`:
    - `VoenFormatValidation`
    - `IbanFormatValidation`

###  Health Score

20

—

LowBetter than 13% of packages

Maintenance58

Moderate activity, may be stable

Popularity4

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity11

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/0279d150240c97d210034878b0467462246dc14d29b5618157ff6a8be49a50e3?d=identicon)[inspector-who](/maintainers/inspector-who)

---

Top Contributors

[![inspector-who](https://avatars.githubusercontent.com/u/6973963?v=4)](https://github.com/inspector-who "inspector-who (1 commits)")

### Embed Badge

![Health badge](/badges/phpsoftbox-requisites/health.svg)

```
[![Health](https://phpackages.com/badges/phpsoftbox-requisites/health.svg)](https://phpackages.com/packages/phpsoftbox-requisites)
```

###  Alternatives

[laravel/socialite

Laravel wrapper around OAuth 1 &amp; OAuth 2 libraries.

5.7k104.3M829](/packages/laravel-socialite)[laravel/dusk

Laravel Dusk provides simple end-to-end testing and browser automation.

1.9k38.6M289](/packages/laravel-dusk)[pinguo/php-msf

Pinguo Micro Service Framework For PHP

1.7k4.2k](/packages/pinguo-php-msf)[nineinchnick/edatatables

Grid widget for the Yii Framework, wrapper for the DataTables jQuery plugin

173.2k](/packages/nineinchnick-edatatables)[link-cloud/fast-hyperf

LinkCloud Fast Hyperf

241.2k1](/packages/link-cloud-fast-hyperf)

PHPackages © 2026

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