定制 ufo-tech/doctrine-behaviors 二次开发

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

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

ufo-tech/doctrine-behaviors

Composer 安装命令:

composer require ufo-tech/doctrine-behaviors

包简介

Doctrine Behavior Traits for symfony 7+ and Doctrine DBAL 4+ and Doctrine ORM 3+

README 文档

README

Fork of a fork of KnpLabs/DoctrineBehaviors to ensure compatibility with Symfony 7+ and Doctrine DBAL 4+, addressing limitations in the original package, which was restricted to Symfony 6.3 and older versions of Doctrine.

This fork is maintained for use in modern Symfony projects and provides continued support for features like Timestampable, Translatable, Blameable, SoftDeletable, Tree, and Uuid. The original bundle does not work beyond Symfony 6.3, which makes it unsuitable for up-to-date projects.

Features

This bundle includes the following Doctrine behaviors:

  • Timestampable: Automatically handle createdAt and updatedAt fields.
  • Translatable: Add support for translations in your entities.
  • Blameable: Automatically set createdBy and updatedBy fields.
  • SoftDeletable: Add support for soft deletes.
  • Tree: Enable tree structures for your entities.
  • Uuid: Support UUIDs as primary keys or identifiers.

Requirements

  • PHP: >=8.2
  • Symfony: ^7.0 | ^8.0
  • Doctrine DBAL: ^3.2|^4.2
  • Doctrine ORM: ^3.3
  • DoctrineBundle: ^2.6

Installation

Install via Composer:

composer require ufo-tech/doctrine-behaviors

Configuration

Enable the bundle in your Symfony project by adding it to bundles.php:

<?php

return [
    // Other bundles
    Ufo\DoctrineBehaviors\DoctrineBehaviorsBundle::class => ['all' => true],
];

Usage

Read original docs

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-01-13

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固