jbzoo/composer-graph 问题修复 & 功能扩展

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

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

jbzoo/composer-graph

Composer 安装命令:

composer require jbzoo/composer-graph

包简介

Render composer.json + composer.lock dependencies graph

README 文档

README

CI Coverage Status Psalm Coverage Psalm Level CodeFactor

Stable Version Total Downloads Dependents GitHub License

Installation

Requirements: PHP 8.2+

composer require        jbzoo/composer-graph # For a specific project
composer global require jbzoo/composer-graph # As global tool

# OR use phar file.
wget https://github.com/JBZoo/Composer-Graph/releases/latest/download/composer-graph.phar

Usage

$ php ./vendor/bin/composer-graph --help

Usage:
  build [options]

Options:
  -r, --root=ROOT                The path has to contain "composer.json" and "composer.lock" files [default: "./"]
  -o, --output=OUTPUT            Path to html output. [default: "./build/composer-graph.html"]
  -f, --format=FORMAT            Output format. Available options: html,mermaid [default: "html"]
  -D, --direction=DIRECTION      Direction of graph. Available options: LR,TB,BT,RL [default: "LR"]
  -p, --show-php                 Show PHP-node
  -e, --show-ext                 Show all ext-* nodes (PHP modules)
  -d, --show-dev                 Show all dev dependencies
  -s, --show-suggests            Show not installed suggests packages
  -l, --show-link-versions       Show version requirements in links
  -P, --show-package-versions    Show version of packages
  -O, --abc-order                Strict ABC ordering nodes in graph. It's fine tuning, sometimes it useful.
      --no-progress              Disable progress bar animation for logs. It will be used only for text output format.
      --mute-errors              Mute any sort of errors. So exit code will be always "0" (if it's possible).
                                 It has major priority then --non-zero-on-error. It's on your own risk!
      --stdout-only              For any errors messages application will use StdOut instead of StdErr. It's on your own risk!
      --non-zero-on-error        None-zero exit code on any StdErr message.
      --timestamp                Show timestamp at the beginning of each message.It will be used only for text output format.
      --profile                  Display timing and memory usage information.
      --output-mode=OUTPUT-MODE  Output format. Available options:
                                 text - Default text output format, userfriendly and easy to read.
                                 cron - Shortcut for crontab. It's basically focused on human-readable logs output.
                                 It's combination of --timestamp --profile --stdout-only --no-progress -vv.
                                 logstash - Logstash output format, for integration with ELK stack.
                                  [default: "text"]
      --cron                     Alias for --output-mode=cron. Deprecated!
  -h, --help                     Display help for the given command. When no command is given display help for the build command
      --silent                   Do not output any message
  -q, --quiet                    Only errors are displayed. All other output is suppressed
  -V, --version                  Display this application version
      --ansi|--no-ansi           Force (or disable --no-ansi) ANSI output
  -n, --no-interaction           Do not ask any interactive question
  -v|vv|vvv, --verbose           Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug

Examples

All examples are screenshots based on the package JBZoo/Toolbox.

Default output (no args) - minimal view

php ./vendor/bin/composer-graph

Example

Default output with PHP extensions (modules)

php ./vendor/bin/composer-graph  --show-ext

Example

Default output with versions of packages and relations

php ./vendor/bin/composer-graph  --show-link-versions  --show-package-versions

Example

Show suggested packages which are not installed

php ./vendor/bin/composer-graph  --show-suggests

Example

Show dev dependencies

php ./vendor/bin/composer-graph  --show-dev

Example

Full Report

All options are enabled but --show-php (too many packages).

php ./vendor/bin/composer-graph            \
                 --show-ext                \
                 --show-dev                \
                 --show-suggests           \
                 --show-link-versions      \
                 --show-package-versions

Example

Unit tests and check code style

make update
make test-all

License

MIT

See Also

  • CI-Report-Converter - Converting different error reports for deep compatibility with popular CI systems.
  • Composer-Diff - See what packages have changed after composer update.
  • Mermaid-PHP - Generate diagrams and flowcharts with the help of the mermaid script language.
  • Utils - Collection of useful PHP functions, mini-classes, and snippets for every day.
  • Image - Package provides object-oriented way to manipulate with images as simple as possible.
  • Data - Extended implementation of ArrayObject. Use files as config/array.
  • Retry - Tiny PHP library providing retry/backoff functionality with multiple backoff strategies and jitter support.
  • SimpleTypes - Converting any values and measures - money, weight, exchange rates, length, ...

jbzoo/composer-graph 适用场景与选型建议

jbzoo/composer-graph 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 743.24k 次下载、GitHub Stars 达 67, 最近一次更新时间为 2020 年 07 月 02 日, 在 PHP 生态内属于活跃度较高的组件。

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

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

围绕 jbzoo/composer-graph 我们能提供哪些服务?
定制开发 / 二次开发

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

BUG 修复 & 性能优化

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

项目外包 & 长期维护

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

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

统计信息

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

GitHub 信息

  • Stars: 67
  • Watchers: 2
  • Forks: 7
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2020-07-02