adt/doctrine-loggable 问题修复 & 功能扩展

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

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

adt/doctrine-loggable

最新稳定版本:v3.0.2

Composer 安装命令:

composer require adt/doctrine-loggable

包简介

Logging of changes in Doctrine entities

README 文档

README

Installation

  1. Install via composer:

    composer require adt/doctrine-loggable
  2. Register this extension in your config.neon:

    extensions:
        - ADT\DoctrineLoggable\DI\LoggableExtension
  3. Do database migrations

  4. Add annotation to entities you wish to log

<?php

use Doctrine\ORM\Mapping as ORM;
use ADT\DoctrineLoggable\Attributes as ADA;
	
/**
 * @ORM\Entity
 * @ADA\LoggableEntity
 */
class User
{

	/**
	 * @ORM\Column(type="string", nullable=true)
	 * @ADA\LoggableProperty(label="entity.user.firstname")
	 */
	protected $firstname;

	/**
	 * @ORM\ManyToMany(targetEntity="Role", inversedBy="users")
	 * @ADA\LoggableProperty(logEntity=false, label="entity.user.roles")
	 */
	protected $roles;
	
}

/**
 * @ORM\Entity
 * @ADA\LoggableIdentification(fields={"name"})
 */
class Role
{

	/**
	 * @ORM\Column(type="string")
	 */
	protected $name;

	/**
	 * @ORM\ManyToMany(targetEntity="User", mappedBy="roles")
	 */
	protected $users;

}

统计信息

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

GitHub 信息

  • Stars: 0
  • Watchers: 12
  • Forks: 3
  • 开发语言: PHP

其他信息

  • 授权协议: BSD-3-Clause
  • 更新时间: 2019-03-26