upscale/doctrine-value-object-bundle 问题修复 & 功能扩展

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

邮箱: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
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

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

其他信息

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

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固