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(6y ago)015MITPHPPHP &gt;=7.1CI failing

Since Jun 4Pushed 6y ago1 watchersCompare

[ Source](https://github.com/bogegithub/contract)[ Packagist](https://packagist.org/packages/princebo/contract)[ RSS](/packages/princebo-contract/feed)WikiDiscussions master Synced 3w 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

23

—

LowBetter than 26% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity51

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

2220d 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

[aura/di

A serializable dependency injection container with constructor and setter injection, interface and trait awareness, configuration inheritance, and much more.

352982.2k59](/packages/aura-di)[maclof/kubernetes-client

A simple yet elegant client for accessing and controlling a Kubernetes cluster.

237916.9k5](/packages/maclof-kubernetes-client)

PHPackages © 2026

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