free-elephants/json-api-dto 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

free-elephants/json-api-dto

最新稳定版本:0.1.0

Composer 安装命令:

composer require free-elephants/json-api-dto

包简介

JsonApi Document Structure Types

README 文档

README

Build Status codecov Installs Releases

Features:

Build Data Transfer Objects from PSR7 Messages.

Full typed objects from request or response body.

See example in test.

Union types support for relationships in PHP 8.

Usage

Extend super types in your own json api documents and it's parts:

  • \FreeElephants\JsonApi\DTO\AbstractAttributes
  • \FreeElephants\JsonApi\DTO\AbstractDocument
  • \FreeElephants\JsonApi\DTO\AbstractRelationships
  • \FreeElephants\JsonApi\DTO\AbstractResourceObject

And use as properties types:

  • \FreeElephants\JsonApi\DTO\RelationshipToOne
  • \FreeElephants\JsonApi\DTO\ResourceIdentifierObject

See tests/ for more examples.

Install

composer require free-elephants/json-api-dto

Development

All dev env is dockerized. Your can use make receipts and bin/ scripts without locally installed php, composer.

For run tests with different php version change PHP_VERSION value in .env and rebuild image with make build.

统计信息

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

GitHub 信息

  • Stars: 2
  • Watchers: 2
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: BSD-2-Clause
  • 更新时间: 2026-01-04

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固