承接 splash/metadata 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

splash/metadata

Composer 安装命令:

composer require splash/metadata

包简介

Splash Metadata Accessor for Symfony Applications

README 文档

README

N|Solid

Splash Metadata

PHP Version Symfony License

Metadata-driven field automation for Splash Sync on Doctrine entities.

Splash Metadata eliminates manual field definitions in Splash connectors by using PHP 8.1+ attributes to automatically discover, configure, and expose Doctrine entity properties as Splash fields.

What It Does

  • Automatic field discovery -- annotate your Doctrine entities with PHP attributes, and Splash Metadata collects, types, and publishes fields for you.
  • SubResource & ListResource support -- nested objects (addresses, line items) are flattened into child fields with zero boilerplate.
  • Built-in data transformation -- PHP types (DateTime, bool, float, ...) are converted to/from Splash types transparently.

Installation

composer require splash/metadata

The Symfony bundle is registered automatically via Flex.

Quick Start

use Doctrine\ORM\Mapping as ORM;
use Splash\Metadata\Attributes as SPL;

#[ORM\Entity]
#[SPL\SplashObject(name: "Product", ico: "fa fa-box")]
class Product
{
    #[ORM\Id]
    #[ORM\Column]
    #[ORM\GeneratedValue]
    public ?int $id = null;

    #[ORM\Column]
    #[SPL\Field(desc: "Product name")]
    #[SPL\Flags(required: true, listed: true, searchable: true)]
    #[SPL\Microdata(itemType: "https://schema.org/Product", itemProp: "name")]
    public ?string $name = null;

    #[ORM\Column(nullable: true)]
    #[SPL\Field(desc: "Unit price")]
    public ?float $price = null;

    #[ORM\Column(nullable: true)]
    #[SPL\Field(desc: "Is product active")]
    public ?bool $active = null;
}

That's it. The library handles field collection, type detection, and data transformation automatically.

Compatibility

PHPSymfony 5.4Symfony 6.4Symfony 7.0
8.1yesyes--
8.2yesyesyes
8.3--yesyes
8.4----yes

Runtime requirement: splash/php-bundle ^3.0

Documentation

PageDescription
Attributes ReferenceComplete reference of all 24 PHP attributes
FieldsField discovery lifecycle, identifiers, type detection
SubResourcesNested objects, ListResource, separator patterns
MultilingualLanguage attribute, multi-language field grouping
Data TransformersBuilt-in transformers, custom transformer creation
Generic ObjectsGenericDoctrineObject, AbstractDoctrineObject

Contributing

All code must pass quality checks before commit:

make quality    # Runs lint + style + stan (GrumPHP via badpixxel/php-sdk)

Individual suites:

make lint       # Linters (composer, phplint, jsonlint, xmllint, yamllint)
make style      # Code standards (phpcpd, phpcs, phpmd, phpcsfixer)
make stan       # PHPStan static analysis

Run tests across all supported PHP versions with Docker:

make test       # PHPUnit in all containers (PHP 8.1-8.4)
make verify     # quality + tests in all containers

License

This project is licensed under the MIT License. See LICENSE for details.

splash/metadata 适用场景与选型建议

splash/metadata 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 8.5k 次下载、GitHub Stars 达 0, 最近一次更新时间为 2024 年 01 月 12 日, 在 PHP 生态内属于活跃度较高的组件。

我们在过去多个企业项目中使用过 splash/metadata 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 splash/metadata 我们能提供哪些服务?
定制开发 / 二次开发

基于 splash/metadata 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-01-12