定制 scedel/schema 二次开发

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

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

scedel/schema

最新稳定版本:0.2.1

Composer 安装命令:

composer require scedel/schema

包简介

Typed schema repository builder for Scedel

README 文档

README

logo

Intermediate layer between scedel/parser AST and downstream packages (validator/codegen).

RFC support

What it provides

  • Recursive include loading (DFS include-first)
  • Include cycle detection
  • Diamond include graphs (shared canonical targets are loaded once)
  • Warnings for direct duplicate includes in a single file
  • Type merge (type expr + annotation-only declarations)
  • Validator merge by (targetType, name) with strict structural duplicate checks
  • Immutable SchemaRepository with types, validators, annotation trees, and document include graph

Usage

use Scedel\Parser\ParserService;
use Scedel\Schema\Infrastructure\FilesystemIncludeResolver;
use Scedel\Schema\Infrastructure\FilesystemSourceLoader;
use Scedel\Schema\RepositoryBuilder;

$builder = new RepositoryBuilder(
    new ParserService(),
    new FilesystemIncludeResolver(),
    new FilesystemSourceLoader(),
);

$repository = $builder->buildFromFile('/absolute/path/schema.scedel');
$type = $repository->getType('Post');
$validator = $repository->getValidator('String', 'noAds');

buildFromString() supports includes if baseUri is provided.

$repository = $builder->buildFromString(
    $source,
    'inline.scedel',
    'file:///absolute/path/inline.scedel',
);

Schema info utility

Print human-readable schema info (version, documents/includes, types with constraints, validators, annotations):

php bin/describe-schema.php /absolute/path/schema.scedel

Include builtin types/validators in output:

php bin/describe-schema.php --show-builtins /absolute/path/schema.scedel

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-02-18

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固