百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
U

uuid-doctrine

> 开发工具
开源

❄️ 允许使用 ramsey/uuid UUID 作为 Doctrine 字段类型。

904 stars0 点赞4 次浏览
访问官网GitHub

工具介绍

❄️ 允许使用 ramsey/uuid UUID 作为 Doctrine 字段类型。

ramsey/uuid-doctrine 将 ramsey/uuid 用作 Doctrine 字段类型 ramsey/uuid-doctrine 包提供了使用 [ramsey/uuid][ramsey-uuid] 为 [Doctrine 字段类型][doctrine-field-type]。 本项目遵循 行为准则。 通过参与此项目及其社区,您应当 遵守这个准则。

安装

使用 Composer 将此包安装为依赖项。

bash
composer require ramsey/uuid-doctrine

使用方法

配置

要将 Doctrine 配置为使用 ramsey/uuid 作为字段类型,您需要设置 在您的启动程序中添加以下内容:

php
\Doctrine\DBAL\Types\Type::addType('uuid', 'Ramsey\Uuid\Doctrine\UuidType');

在 Symfony 中:

yaml
# config/packages/doctrine.yaml
doctrine:
    dbal:
        types:
            uuid: Ramsey\Uuid\Doctrine\UuidType

在 Zend 框架中:

php
 [
        'configuration' => [
            'orm_default' => [
                'types' => [
                    UuidType::NAME => UuidType::class,

在 Laravel 中:

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

PHPdbaldoctrineguididentifiers

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月17日
分类开发工具
定价开源

> 相关工具

V
VS Code
流行的开源代码编辑器
G
Git
分布式版本控制系统
V
Vite
下一代前端构建工具