PHPackages                             princebo/contract - 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. [PSR &amp; Standards](/categories/psr-standards)
4. /
5. princebo/contract

ActiveContract[PSR &amp; Standards](/categories/psr-standards)

princebo/contract
=================

开发一些规范,契约优于配置

v1.0(5y ago)015MITPHPPHP &gt;=7.1CI failing

Since Jun 4Pushed 5y ago1 watchersCompare

[ Source](https://github.com/bogegithub/contract)[ Packagist](https://packagist.org/packages/princebo/contract)[ RSS](/packages/princebo-contract/feed)WikiDiscussions master Synced 1w ago

READMEChangelogDependencies (1)Versions (2)Used By (0)

使用
==

[](#使用)

`composer require princebo/contract`

目标
--

[](#目标)

统一API接口的数据返回规范。

规约
--

[](#规约)

### [异常规约](exception-convention.md)

[](#异常规约)

### [Controller返回规约](controller-convention.md)

[](#controller返回规约)

### [路由规约](router-convention.md)

[](#路由规约)

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

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

Unknown

Total

1

Last Release

2174d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/23090283?v=4)[bogegithub](/maintainers/bogegithub)[@bogegithub](https://github.com/bogegithub)

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/princebo-contract/health.svg)

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

###  Alternatives

[phpdocumentor/type-resolver

A PSR-5 based resolver of Class names, Types and Structural Element Names

9.2k719.5M166](/packages/phpdocumentor-type-resolver)[pimple/pimple

Pimple, a simple Dependency Injection Container

2.7k130.5M1.4k](/packages/pimple-pimple)[league/container

A fast and intuitive dependency injection container.

86387.8M343](/packages/league-container)[stella-maris/clock

A pre-release of the proposed PSR-20 Clock-Interface

7947.5M2](/packages/stella-maris-clock)[wptrt/wpthemereview

PHP\_CodeSniffer rules (sniffs) to verify theme compliance with the rules for theme hosting on wordpress.org

217736.5k29](/packages/wptrt-wpthemereview)[inpsyde/modularity

Modular PSR-11 implementation for WordPress plugins, themes or libraries.

54383.3k3](/packages/inpsyde-modularity)

PHPackages © 2026

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