zendframework/zend-json
Convenience utilities for encoding PHP data to JSON and decoding JSON back to native types, including helpers for advanced cases. Note: this Zend Framework repository was abandoned on 2019-12-31; development continues as laminas/laminas-json.
json_encode/json_decode (95%+ coverage) or Laminas JSON (actively maintained) for all other cases. This package remains a technical debt sink—use only to prevent critical failures in legacy systems.prettyPrint behavior (e.g., preserving spaces after commas in JSON output) or array/string offset fixes that aren’t available in PHP’s native functions.spatie/array-to-json).Executives:
*"This package (v3.1.2) is a legacy compatibility patch—not a strategic investment. It fixes critical issues for PHP 7.4+ in old Zend Framework 1/2 apps, but adopting it locks us into unsupported tech. We must:
- Accelerate migration of these systems to Laminas JSON or modern stacks (Laravel/Symfony).
- Isolate dependencies on this package to minimize blast radius.
- Avoid new use cases—PHP’s native JSON functions or Laminas are 10x better supported. Budget for a migration sprint to eliminate this technical debt."*
Engineering:
*"Key changes in 3.1.2:
- PHP 7.4+ compatibility: Fixes for curly brace → square bracket offset access (prevents crashes).
prettyPrinttweak: Preserves spaces after commas (useful for legacy debugging).Action items:
- For legacy Zend apps: Update to 3.1.2 only to avoid PHP 7.4+ deprecation warnings. Document this as a temporary fix.
- For new features: Refactor to use
json_encodeor Laminas\Json.- Security risk: This package has no updates since 2019. Block new pull requests into it; prioritize migration.
Alternatives:
- Laminas\Json: Drop-in replacement with active support.
- Laravel: Use
response()->json()orcollect()->toJson().- Symfony: Use
Serializercomponent for advanced use cases."*
How can I help you explore Laravel packages today?