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

Open
#688 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
74/100
Issue type
Feature
Clarity
Clearly specified
Activity status
Active
Tech stack
php
Domain
backend, cli

Research direction

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.

Written by the indexing model from the issue text.

Description

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/
Dominant language
PHP
Stars
43
Forks
22
Avg merge
54m
Merged PRs (30d)
57

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from quantum-php/framework

All issues in quantum-php/framework

Similar issues

More PHP issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.