承接 upscale/doctrine-value-object-bundle 相关项目开发

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

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

upscale/doctrine-value-object-bundle

最新稳定版本:1.0.1

Composer 安装命令:

composer require upscale/doctrine-value-object-bundle

包简介

Symfony bundle for yokai/doctrine-value-object

README 文档

README

This package wraps yokai/doctrine-value-object in a bundle to simplify its use in Symfony projects.

Features:

  • Zero config setup
  • Attribute annotation

Installation

Install via Composer as a dependency:

composer require upscale/doctrine-value-object-bundle

Usage

Attribute Annotation

Register a value object using an attribute annotation (available since PHP 8):

use Upscale\DoctrineValueObjectBundle\Attribute\ValueObject; use Yokai\DoctrineValueObject\StringValueObject; #[ValueObject] class PhoneNumber implements StringValueObject {...}

Reference the value object type by an underscore separated short class name:

#[Entity] class Person { #[Column(type: 'phone_number')] private PhoneNumber $phone; // ... }

Type Naming

You can customize the type name, including use a fully-qualified class name, for example:

#[ValueObject(type: PhoneNumber::class)] class PhoneNumber implements StringValueObject {...}
#[Entity] class Person { #[Column(type: PhoneNumber::class)] private PhoneNumber $phone; // ... }

Contributing

Pull Requests with fixes and improvements are welcome!

License

Copyright © Upscale Software. All rights reserved.

Licensed under the Apache License, Version 2.0.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: Apache-2.0
  • 更新时间: 2026-01-04