承接 evgenijfaustov/debug-snapshot-bundle 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

evgenijfaustov/debug-snapshot-bundle

最新稳定版本:v0.2.1

Composer 安装命令:

composer require evgenijfaustov/debug-snapshot-bundle

包简介

Debug Snapshot Feature

README 文档

README

Symfony bundle for exporting and importing Doctrine ORM aggregates as a debug snapshot ZIP.

Requirements

  • PHP 8.2+
  • Symfony 7.1+
  • Doctrine ORM 2.17+ or 3.x

Installation

composer require evgenijfaustov/debug-snapshot-bundle

If the bundle was not registered automatically, add it to config/bundles.php:

Evgenijfaustov\DebugSnapshotBundle\DebugSnapshotBundle::class => ['all' => true],

Configuration

debug_snapshot:
  enabled: true
  http:
    enabled: false
    role: ROLE_DEBUG_SNAPSHOT
  profiles:
    order:
      root_class: App\Entity\Order
      max_depth: 3
      max_nodes: 5000
      include:
        App\Entity\Order: [customer, items]
        App\Entity\Customer: []
        App\Entity\OrderItem: []
      pii_fields:
        App\Entity\Customer: [email, phone]

include rules

include is an allowlist of Doctrine associations to traverse per entity class.

If a class is present in include with [], no relations are traversed for that class.

Relations not listed in include are not exported.

Export

php bin/console debug:snapshot:export order <ORDER_ID> --out=var/snapshots --anonymize=1

Import

php bin/console debug:snapshot:import var/snapshots/<FILE>.zip

HTTP endpoints

Enable routes and role-based access in your app:

# config/routes/debug_snapshot.yaml
debug_snapshot:
  resource: '@DebugSnapshotBundle/Resources/config/routes.php'
# config/packages/debug_snapshot.yaml
debug_snapshot:
  http:
    enabled: true
    role: ROLE_DEBUG_SNAPSHOT

Export (returns zip):

curl -X POST "https://example.test/_debug/snapshot/export/order/<ORDER_ID>?anonymize=1" -o snapshot.zip

Import:

curl -X POST "https://example.test/_debug/snapshot/import?anonymize=1" -F "snapshot=@snapshot.zip"

Snapshot format (v1)

  • meta.json contains format, createdAt, profile, root, checksum
  • snapshot.json contains format, root, entities with fields and relations

Notes

  • Composite identifiers are not supported.
  • Only scalar fields are exported; relations are stored as references.
  • PII masking is applied when --anonymize=1 is passed.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: proprietary
  • 更新时间: 2026-01-29

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固