Releases: uxmansarwar/response
v4.0.0 – Major Rewrite: Nested Grouping, TTL, Query Debugging & More
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 mainkey() - ✅ 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.mdwith fresh docs, examples, and badges - ✅ Brand-new
CHANGELOG.mdfor 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
🚀 Response v3.0.1 - Major Update with Enhanced Flexibility & Composer Support
Description:
As Sr. PHP Developer, I am excited to release Response v3.0.0, a major update that significantly improves response handling, configurability, and integration. This version introduces dynamic response key customization, optimized singleton logic, and enhanced API-friendly structured responses.
🔹 Key Highlights:
✅ Configurable Response Keys – Customize result, error, and input key dynamically.
✅ Enhanced Singleton Management – Improved performance and memory efficiency.
✅ Composer Installation – Now install easily with:
composer require uxmansarwar/response ✅ Refactored Codebase – Optimized for PSR-12 compliance and better maintainability.
✅ Advanced Usage Examples – Updated README with real-world use cases and SEO optimization for developers.
✅ Automated Testing – Introduced PHPStan, PHP-CS-Fixer, and PestPHP for robust code quality checks.
📌 Upgrade Notes:
- Ensure you update dependencies by running:
composer update uxmansarwar/response
- The
collection()method has been refactored for better efficiency, ensuring smoother API response generation.
💡 This release makes Response more powerful for Laravel, Symfony, WordPress, and PHP-based API development. 🚀
👉 Check the full changelog for more details!
🚀 Response v3.0.0 - Major Update with Enhanced Flexibility & Composer Support
Description:
As Sr. PHP Developer, I am excited to release Response v3.0.0, a major update that significantly improves response handling, configurability, and integration. This version introduces dynamic response key customization, optimized singleton logic, and enhanced API-friendly structured responses.
🔹 Key Highlights:
✅ Configurable Response Keys – Customize result, error, and input key dynamically.
✅ Enhanced Singleton Management – Improved performance and memory efficiency.
✅ Composer Installation – Now install easily with:
composer require uxmansarwar/response ✅ Refactored Codebase – Optimized for PSR-12 compliance and better maintainability.
✅ Advanced Usage Examples – Updated README with real-world use cases and SEO optimization for developers.
✅ Automated Testing – Introduced PHPStan, PHP-CS-Fixer, and PestPHP for robust code quality checks.
📌 Upgrade Notes:
- Ensure you update dependencies by running:
composer update uxmansarwar/response
- The
collection()method has been refactored for better efficiency, ensuring smoother API response generation.
💡 This release makes Response more powerful for Laravel, Symfony, WordPress, and PHP-based API development. 🚀
👉 Check the full changelog for more details!
v2.0.1: Merge pull request #6 from uxmansarwar/uxman_dev
.github advanced config
v1.0.3: Merge pull request #4 from uxmansarwar/uxman_dev
v1.0.2: Merge pull request #3 from uxmansarwar/uxman_dev
v1.0.1: Merge pull request #2 from uxmansarwar/uxman_dev
V1.0.0
Merge pull request #1 from uxmansarwar/uxman_dev Uxman dev