phauthentic/bc-check 问题修复 & 功能扩展

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

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

phauthentic/bc-check

Composer 安装命令:

composer create-project phauthentic/bc-check

包简介

Backward compatibility checker for PHP APIs

README 文档

README

BC Check analyzes PHP code between two git commits to detect backward compatibility (BC) breaking changes using AST parsing. It helps library maintainers follow Semantic Versioning by identifying changes that could break dependent code.

"With a system of the size and importance of API, it is necessary to have some formalized rules to govern how updates are incorporated while still keeping the API stable." — Semantic Versioning 2.0.0

Features 💎

  • BC Break Detection:
    • Detects removed public/protected classes, methods, properties, and constants
    • Detects method signature changes (parameters, types, defaults)
    • Detects return type changes
    • Detects visibility reductions
    • Detects added final, abstract, static, readonly modifiers
    • Detects interface implementation changes
    • Detects parent class changes
  • Flexible Configuration:
    • YAML-based configuration
    • Regex patterns for include/exclude filtering
    • Custom source directories
    • External detector loading for custom BC break detection
  • Multiple Output Formats:
    • Human-readable text output
    • JSON output for programmatic use
    • GitHub Actions annotations
    • SARIF (Static Analysis Results Interchange Format)
    • Checkstyle XML
    • JUnit XML
    • GitLab Code Quality
  • CI/CD Ready:
    • Exit codes for build success/failure
    • GitHub Actions, GitLab CI, CircleCI, Jenkins examples
    • Docker support

Installation ⚙️

composer require --dev phauthentic/bc-check

Or download the PHAR from the releases page.

Documentation 📚

Quick Start 🚀

# Basic usage
vendor/bin/bc-check check /path/to/repo v1.0.0 v2.0.0

# With configuration file
vendor/bin/bc-check check /path/to/repo v1.0.0 v2.0.0 --config=bc-check.yaml

# JSON output
vendor/bin/bc-check check /path/to/repo v1.0.0 v2.0.0 --format=json

For more usage examples and options, see the Usage Guide.

Reporting Issues 🪲

If you find a bug or have a feature request, please open an issue on the GitHub repository.

When reporting issues, please provide:

  • PHP version
  • BC Check version
  • Minimal code example that reproduces the issue
  • Expected vs actual behavior

License ⚖️

Copyright Florian Krämer

Licensed under the MIT License.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: GPL-3.0-or-later
  • 更新时间: 2026-02-03

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固