willdurand/hateoas
Hateoas is a PHP library for building HATEOAS-friendly REST representations. Configure links and embedded resources via annotations/attributes, XML or YAML, with expression language support, URL generators, and serializers (HAL JSON/XML) for rich hypermedia APIs.
hal+json) is still required.SplObjectStorage deprecation warning fix in PHP 8.5 (PR #346) resolves a critical compatibility issue, making the package fully compliant with PHP 8.5.Resource implementations with internal SplObjectStorage usage (beyond the package’s core) may still face edge cases. Validate thoroughly.SplObjectStorage fix resolves all warnings.Resource implementations using SplObjectStorage internally (not just the package’s public API)? Test for regressions.SplObjectStorage deprecation resolved, should the team plan to drop PHP <8.5 support in future releases?Hateoas\Hateoas service binding or InjectLinks middleware.Hateoas\Resource as before. Example:
class OrderResource extends \Hateoas\Resource { ... }
Hateoas\ResourceCollection for paginated responses.Resource implementations.composer.json to target PHP 8.5:
"require": {
"php": "^8.5",
"willdurand/hateoas": "^3.14"
}
Resource logic, especially those using SplObjectStorage internally.SplObjectStorage fix.| Step | Priority | Effort | Dependencies |
|---|---|---|---|
| Update PHP version (if applicable) | High | Medium | CI/CD pipeline, testing suite |
Update hateoas package |
High | Low | Composer, dependency checks |
Validate SplObjectStorage usage |
Critical | High | Custom Resource implementations |
| Audit for PHP 8.5 optimizations | Medium | Medium | Team bandwidth |
| Set up package | High | Low | Laravel 10.x+, PHP 8.1+ |
| Define link schema | High | Medium | API design docs |
| Pilot endpoint | Medium | Low | Monitoring |
| Core resource refactor | High | High | CI/CD pipeline updates |
SplObjectStorage fix eliminates deprecation warnings, reducing maintenance overhead.Resource implementations.links() methods remain critical.SplObjectStorage internally.SplObjectStorage fix.SplObjectStorage issues in custom code.SplObjectStorage usage.dd($resource->links()) or curl for inspection.SplObjectStorage warnings (if any remain).hateoas.link_generation_ms and hateoas.missing_links.Resource performance post-PHP 8.5 upgrade.Resource testing for teams upgrading.How can I help you explore Laravel packages today?