定制 milpa/core 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

milpa/core

Composer 安装命令:

composer require milpa/core

包简介

Milpa Framework — core contracts and primitives. Framework-agnostic: no ORM, no HTTP client, no host-application coupling (ADR-001).

README 文档

README

The framework-agnostic core of Milpa — a modular, AI-native PHP framework. Siembra módulos, cosecha aplicaciones.

CI Packagist PHP License

milpa/core is the dependency-light heart of the Milpa framework: the attributes, events, value objects, enums, interfaces, and the verification seam that every Milpa module builds on. No Doctrine, no HTTP client, no product coupling — just the contracts and primitives, so you can depend on them from anywhere.

Install

composer require milpa/core

Requirements

  • PHP ≥ 8.3

Quick example

Value objects are immutable and self-validating. For instance, SemanticVersion:

use Milpa\app\ValueObjects\SemanticVersion;

$v = SemanticVersion::parse('2.4.1');

$v->satisfies('^2.0');                              // true
$v->greaterThan(SemanticVersion::parse('2.4.0'));   // true
$v->incrementMinor();                              // 2.5.0 (a new instance)
$v->isStable();                                    // true — no pre-release tag

What's inside

Namespace What it provides
Milpa\app\Attributes Declarative attributes (RegisterService, BusinessRule, Subscribe, …)
Milpa\app\Events Framework event contracts + dispatch primitives
Milpa\app\ValueObjects Immutable, validated values (SemanticVersion, capability & verification VOs, …)
Milpa\app\Enums Shared enums (Roles, Events, …)
Milpa\app\Interfaces Core contracts (MilpaEventDispatcherInterface, PluginManifestInterface, …)
Milpa\app\Support Small framework-agnostic helpers

Every public symbol carries a DocBlock — the API reference is generated straight from them.

Documentation

Full API reference: getmilpa.github.io/core — generated straight from the source DocBlocks and dressed with the Milpa design system.

Contributing

Contributions are welcome — see CONTRIBUTING.md. Please report security issues via SECURITY.md, and note that this project follows a Code of Conduct.

License

Apache-2.0 © the Milpa authors.

统计信息

  • 总下载量: 0
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: Apache-2.0
  • 更新时间: 2026-07-05

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固