Render the `core:version` banner natively and deprecate `povils/figlet`

未关闭
#688 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
74/100
Issue 类型
功能
描述清晰度
描述清楚
活跃度
活跃
技术栈
php
领域
backend, cli

调研方向

Start with src/Console/Commands/VersionCommand.php and trace how it currently calls povils/figlet. Check the starter project's public/assets/shared/fonts/figlet/ files and the existing changelog format. Done means the core renderer handles all four shipped fonts, php qt core:version matches the previous slant banner for QUANTUM PHP 3.2.0, and the changelog records the deprecation.

由索引模型根据 Issue 内容生成。

描述

console enhancement

Summary

Add a small FIGlet renderer to the core and use it for the banner of php qt core:version, instead of povils/figlet. Keep povils/figlet in composer.json, deprecated, and remove it in a later release.

Why

povils/figlet has had no release since 2016. Its last version, 1.0.0, requires symfony/console ~3.0, so it cannot be installed next to the Symfony Console the core uses, and the core is stuck on 0.1.0 (found while working on #687). The only maintained-looking alternative, laminas/laminas-text, is abandoned. The core uses the package for one thing: rendering QUANTUM PHP <version> with the slant font, which the starter project already ships in public/assets/shared/fonts/figlet/.

Proposed change

  • A renderer class in the Console package that reads a FIGlet .flf font file and renders a string, with the three methods VersionCommand uses: setFontDir(), setFont() and render().
  • VersionCommand uses it.
  • povils/figlet stays in composer.json and gets a Deprecated changelog entry: the core no longer uses it, and it will be removed in a later release. Applications that call Povils\Figlet\Figlet themselves should require the package in their own composer.json.

Acceptance criteria

  • php qt core:version prints the same banner as before: a test compares the native output for QUANTUM PHP 3.2.0 with the slant font against the output of povils/figlet 0.1.0.
  • the renderer handles the four fonts the starter project ships (big, slant, small, standard)
  • the changelog records the deprecation

Notes

  • src/Console/Commands/VersionCommand.php
  • the font files are in quantum-php/project, public/assets/shared/fonts/figlet/
主要语言
PHP
星标
43
派生
22
平均合并
54 分钟
30 天内合并 PR
57

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

quantum-php/framework 的其他 Issue

查看 quantum-php/framework 的全部 Issue

相似的 Issue

更多 PHP Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。