定制 adrenalinkin/doctrine-naming-strategy 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

adrenalinkin/doctrine-naming-strategy

最新稳定版本:v3.0.0

Composer 安装命令:

composer require adrenalinkin/doctrine-naming-strategy

包简介

Camel Case Doctrine ORM naming strategy

README 文档

README

PHPUnit Coverage Status Latest Stable Version Total Downloads

Introduction

Component contains Doctrine CamelCase naming strategy.

Installation

Open a command console, enter your project directory and execute the following command to download the latest stable version of this component:

    composer require adrenalinkin/doctrine-naming-strategy

This command requires you to have Composer install globally.

Usage

For registration new naming strategy you should use manual from the official Doctrine documentation Implementing a NamingStrategy.

<?php declare(strict_types=1);
$namingStrategy = new \Linkin\Component\DoctrineNamingStrategy\ORM\Mapping\CamelCaseNamingStrategy();
/** @var \Doctrine\ORM\Configuration $configuration */
$configuration->setNamingStrategy($namingStrategy);

In that case, when you use Doctrine as part of the Symfony Framework - you should look into appropriated part of the DoctrineBundle documentation: Configuration Reference.

# Register CamelCaseNamingStrategy as service
services:
    Linkin\Component\DoctrineNamingStrategy\ORM\Mapping\CamelCaseNamingStrategy:
        class: Linkin\Component\DoctrineNamingStrategy\ORM\Mapping\CamelCaseNamingStrategy

doctrine:
    orm:
        naming_strategy: Linkin\Component\DoctrineNamingStrategy\ORM\Mapping\CamelCaseNamingStrategy

How will the generated SQL change?

To demonstrate difference let's take association example entities from the official Doctrine documentation

Compare DefaultNamingStrategy and CamelCaseNamingStrategy

Compare

Raw SQL for different strategies

License

license

统计信息

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

GitHub 信息

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

其他信息

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

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固