Skip to content

v4.0.0 – Major Rewrite: Nested Grouping, TTL, Query Debugging & More

Latest

Choose a tag to compare

@uxmansarwar uxmansarwar released this 01 Jun 11:18
19e8026

This release marks a significant milestone in the evolution of the uxmansarwar/response package.
The core class has been completely restructured to support deeper response formatting, debug capabilities, and modern PHP best practices.


✨ What's New

  • Total Refactor with a cleaner singleton lifecycle
  • New index() method to support nested grouping under a main key()
  • New ttl() method to include TTL (Time-to-Live) in API responses
  • New query() method to inject debug query data (e.g., SQL) into the response
  • Improved input parser: auto-merges $_GET, $_POST, and raw JSON
  • Cleaner structure using class constants like RESULT_KEY_TXT, ERROR_KEY_TXT
  • Fluent interface – chain methods like key(), index(), result(), ttl()
  • Updated README.md with fresh docs, examples, and badges
  • Brand-new CHANGELOG.md for full transparency of all updates

🧼 Developer Notes

  • All old behavior from v3.x is still supported, but some parts are now deprecated in favor of new patterns.
  • Please update your usages if you're migrating from v3.0.0.

📦 Installation

composer require uxmansarwar/response

🙌 Author

Developed and maintained by Uxman Sarwar
Senior PHP Developer since 2013 | Laravel, REST APIs, Tailwind, Vue.js

Feel free to ⭐ star the repo, report issues, or contribute!


🔗 Useful Links