Repository navigation
3.5.1
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, andEnterto select). SupportsEscapeandCtrl+Cto 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$multiChoiceto determine whether multiple options can be selected.input- Added a new string parameter$defaultto specify a default return value for user input.clear- Added a new string parameter$modeto 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
blockandcardmethods to create CLI output layouts. -
Input Validation Class: Fixed an issue where the
keys_existsandkeys_existvalidation rules incorrectly failed when the value was0, even if it existed.
Deprecations
- Deprecated PHP Constant: Removed the deprecated
E_STRICTconstant to prevent unnecessary warnings.