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

オープン
#688 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
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分
マージ済み PR(30日)
57

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

quantum-php/framework のほかの issue

quantum-php/framework の issue をすべて見る

似ている issue

PHP の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。