Skip to content

3.5.1

Choose a tag to compare

@peterujah peterujah released this 05 Mar 10:32
· 53 commits to main since this release

Full Changelog: 3.5.0...3.5.1

New Features

  • Application Logger Class: Added support for Telegram logging, allowing log messages to be sent directly to a Telegram bot chat, ensuring that no errors go unnoticed. Once configured your telegram bot token and chatId, on production critical log levels will be sent to Telegram instead of logging to file.

    • telegram - method to explicitly sends log messages to a Telegram bot.
  • Novakit Setup Command: Introduced support for setting up application environment variables through a command. This guides users in configuring required variables for supported environments.

    Example
    The following command walks you through the database configuration setup:

    php novakit env:setup --t=database
  • Command Utilities (Terminal Class): Added new methods for command-line operations:

    • tablist - Creates a selectable option list using key events (e.g., Tab, Arrow Up, Arrow Down, and Enter to select). Supports Escape and Ctrl+C to close.
    • keyEvent - Captures key events and returns an array containing the ANSI sequence code and human-readable key name.
    • cursorVisibility - Toggles cursor visibility.
  • Command Text Utils Class: Added support for handling text with emojis.

    • emojiStrlen - Calculates the total character length of emojis in a string.
    • countEmojis - Counts the total number of emojis in a string.
    • stripEmojis - Removes all emojis from a given string.
    • hasEmoji - Determines whether the given text contains emojis.

Optimizations

  • Command Utilities (Terminal Class): Optimized existing methods and introduced additional parameters where necessary.
    • chooser - Added a new boolean parameter $multiChoice to determine whether multiple options can be selected.
    • input - Added a new string parameter $default to specify a default return value for user input.
    • clear - Added a new string parameter $mode to control the clearing behavior:
      • default (default): Clears the entire screen.
      • partial: Clears from the cursor position downward.
      • full: Clears the entire screen and scrollback buffer.

Fixes

  • Command Text Utils Class: Fixed an issue where text containing emojis would overlap when using the block and card methods to create CLI output layouts.

  • Input Validation Class: Fixed an issue where the keys_exists and keys_exist validation rules incorrectly failed when the value was 0, even if it existed.


Deprecations

  • Deprecated PHP Constant: Removed the deprecated E_STRICT constant to prevent unnecessary warnings.