定制 dwenzel/reporter 二次开发

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

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

dwenzel/reporter

Composer 安装命令:

composer require dwenzel/reporter

包简介

Reporting extension for the TYPO3 CMS

README 文档

README

Reporting extension for the TYPO3 CMS that provides additional reporting and auditing capabilities for TYPO3 instances.

Requirements

  • TYPO3 CMS >= 12.4 or >= 13.4
  • PHP >= 8.1
  • Instance in Composer Mode
  • cpsit/auditor package for auditing functionality
  • cpsit/api-token package for API authentication
  • dwenzel/reporter-api package for API endpoints

What does it do

Reporter provides comprehensive reporting and auditing capabilities for your TYPO3 instance:

  • System Information Toolbar: Displays bundle name and version in the TYPO3 backend toolbar
  • Backend Reports Module: Detailed reports including:
    • Composer bundle information
    • Package dependency analysis
    • Security and compliance auditing
  • REST API Endpoints: External system integration capabilities
  • Package Analysis: Extensive reflection system for composer package metadata

Features

Backend Integration

  • System Information Toolbar integration showing current bundle status
  • Dedicated Reports module with comprehensive package information
  • Real-time dependency analysis and version tracking

API Capabilities

  • REST API middleware for external integrations
  • Custom route compilation and enhancement
  • Standardized endpoints for system reporting

Package Analysis

The extension includes an extensive property reflection system that analyzes:

  • Package properties (Name, Version, Description, License, Keywords, etc.)
  • Distribution information (URL, Type, Reference)
  • Source information (URL, Type, Reference)
  • Configuration details (Scripts, Repositories, Extra data)

Installation

Install via Composer:

composer require dwenzel/reporter

Activate the extension in the TYPO3 Extension Manager or via CLI:

vendor/bin/typo3 extension:activate reporter

API Configuration

The Reporter extension provides REST API endpoints for external system integration. Follow these steps to configure and use the API:

1. Import API Routes

Add the Reporter API route enhancers to your TYPO3 site configuration file (config/sites/{site-identifier}/config.yaml):

routeEnhancers:
  ReporterApi:
    type: ReporterApiEnhancer
    limitToPath: '/api/reporter/v{version}'
    namespace: 'rest_api'
    routes:
      - { routePath: '/application/report', method: 'GET', default: true }
    defaults:
      version: '1'
    requirements:
      version: '\d+'

2. Generate API Token

The Reporter API uses token-based authentication via the cpsit/api-token package. Generate tokens using the CLI:

Interactive Mode:

./vendor/bin/typo3 apitoken:generate

Non-Interactive Mode:

./vendor/bin/typo3 apitoken:generate \
    --name="Reporter API Token" \
    --description="Authentication for reporter API endpoints" \
    --expires="+6 months" \
    --no-interaction

JSON Output for Automation:

./vendor/bin/typo3 apitoken:generate \
    --name="Reporter API Token" \
    --output-format=json \
    --no-interaction

Backend Module:

  1. Navigate to System > API Token Management
  2. Click Create New Token
  3. Fill in name, description, and expiration
  4. Important: Copy the secret immediately - it won't be shown again!

3. API Usage

Available Endpoints

  • GET /api/reporter/v1/application/report - Retrieve application report data

Authentication Headers

All API requests require the following headers:

x-api-identifier: {your-api-identifier}
application-authorization: {your-api-secret}
Content-Type: application/json

Example Requests

cURL:

curl -X GET "https://your-site.com/api/reporter/v1/application/report" \
     -H "x-api-identifier: 4a6f8b2e3d" \
     -H "application-authorization: 7a5c9f2b-4d8e-1a3c-9e5f-2b4d8e1a3c82" \
     -H "Content-Type: application/json"

HTTP File (for IDE testing):

GET https://your-site.com/api/reporter/v1/application/report
x-api-identifier: 4a6f8b2e3d
application-authorization: 7a5c9f2b-4d8e-1a3c-9e5f-2b4d8e1a3c82
Content-Type: application/json

Response Format

The API returns JSON responses with application report data including:

  • Bundle information
  • Package versions
  • Dependency analysis
  • System configuration details

4. Security Considerations

  • Token Management: API tokens should be stored securely and rotated regularly
  • Access Control: Limit API access to authorized systems only
  • HTTPS: Always use HTTPS in production environments
  • Expiration: Set appropriate expiration dates for tokens

Dependencies

  • Core Dependencies:

    • typo3/cms-core: ^12.4 || ^13.4
    • typo3/cms-reports: ^12.4 || ^13.4
    • cpsit/auditor: ^1.0.0
    • cpsit/api-token: For API authentication
    • dwenzel/reporter-api: For API endpoints
  • Development Dependencies:

    • PHPUnit for testing
    • PHP-CS-Fixer for code standards
    • PHPStan for static analysis
    • TYPO3 Rector for code migrations

dwenzel/reporter 适用场景与选型建议

dwenzel/reporter 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 24.17k 次下载、GitHub Stars 达 1, 最近一次更新时间为 2019 年 01 月 25 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「extension」 「Audit」 「report」 「typo3」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 dwenzel/reporter 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 dwenzel/reporter 我们能提供哪些服务?
定制开发 / 二次开发

基于 dwenzel/reporter 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: GPL-2.0
  • 更新时间: 2019-01-25