Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Symfony Serializer Extension Laravel Package

invis1ble/symfony-serializer-extension

A lightweight extension for Symfony Serializer that adds practical enhancements to object (de)serialization, helping PHP applications handle common normalization and denormalization scenarios with less custom code.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Framework-upgrade roadmap: v1.2.0 adds Symfony Serializer 8 support while keeping PHP 8.1 / Symfony 6.4 / Symfony 7 working. That means the serialization layer is no longer the blocker for either "upgrade the platform" or "keep the long tail of services on older PHP" — the same package version serves both, so you don't need a forked or pinned dependency per service.
  • Build vs buy: serialization/normalization is commodity plumbing. This package extends Symfony Serializer rather than asking you to write bespoke normalizers, so the buy signal is strong if you've already chosen Symfony Serializer inside Laravel. If you're on Laravel's native Eloquent resources, this is not a decision you need to make yet.
  • Zero-cost adoption / no migration budget: existing ^1.0 and ^1.1 constraints already resolve to v1.2.0. You get framework compatibility without a composer.json edit or a migration ticket — only pin ^1.2 explicitly if you want the new line to be deliberate and visible in review.
  • API contract stability: the release explicitly does not change the normalizer API. Serialization shape leaks into customer-facing payloads and partner integrations, so "no API change" is the single most important attribute of this release — it means this is a safe window to lock in serialization behavior with contract tests rather than a risky one.
  • Use cases this unblocks: context-driven normalization, URI/IRI round-trip correctness (newly covered by integration tests), JSON encoding paths, cached normalizers for latency-sensitive endpoints, and graceful handling of invalid input.

When to Consider This Package

Adopt when:

  • You already use (or have decided to use) Symfony Serializer inside a Laravel app instead of, or alongside, Laravel's JsonResource / toArray conventions.
  • You need serialization behavior to be consistent across multiple services or a mixed Symfony/Laravel estate — a shared extension beats divergent in-house normalizers.
  • You need URI round-trip correctness or context-driven normalization and don't want to maintain that logic yourselves.
  • You need cached normalization on hot endpoints where per-request normalizer construction is measurable.
  • You're planning a Symfony 8 / PHP 8.4.1+ move and want a dependency that doesn't force you to drop PHP 8.1 support everywhere at once.

Look elsewhere / treat with caution when:

  • Your serialization is entirely Laravel-native resources and API Resources; adding a second serialization paradigm is a net complexity increase for the team.
  • You require commercial support, SLAs, or a multi-maintainer project — this is a small single-namespace package; treat bus factor as a real vendor risk and keep the dependency behind a thin internal interface so it's swappable.
  • You need guarantees beyond the package's own suite. The release cites 25 tests per suite and 100% statement/method coverage across four PHP versions, plus integration coverage of URI round trips, JSON, context, cached support, and invalid data — good for a package this size, but it is not a substitute for your own contract tests on your payloads.
  • Symfony 8 requires PHP 8.4.1+. If any deployment target is below that, you must verify your runtime matrix before letting Composer resolve Symfony 8 transitively; the package supports it, your infrastructure may not.

How to Pitch It (Stakeholders)

To executives: A free, low-risk dependency update. It keeps our serialization layer compatible with both our current PHP versions and the next platform upgrade, so it removes a known blocker from the upgrade roadmap without a migration project or a change to any API response our customers or partners see. No new spend, no new vendor contract, no customer-visible behavior change.

To engineering: Patch-level upgrade, no normalizer API changes, existing ^1.0/^1.1 constraints already pick it up. It adds Symfony Serializer 8 support (PHP 8.4.1+ on that path) while retaining PHP 8.1 / Symfony 6.4 / 7, and ships CI fixes, stable dev dependencies, and integration coverage for URI round trips, JSON, context, cached support, and invalid data — all green including Codecov and Docker Lint, 25 tests per suite at 100% statement/method coverage across PHP 8.1/8.2/8.4/8.5. Two tracked compatibility issues are closed. Action: bump and let CI confirm; pin ^1.2 explicitly if you want the new line recorded rather than resolved implicitly. Watch item: it's a small maintainer footprint, so keep it isolated behind our own serialization boundary.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
ignibyte/aic-framework
glavweb/data-schema-bundle
glavweb/datagrid-bundle
tacticmedia/scim-server
uni-method/frame
neika-ai/sdk
adachsoft/php-code-style
pharaonic/laravel-notification-dependencies
beautinow/translug
dev-brainiac/bot-cloaked
octoberrain/html
octoberrain/extension
octoberrain/exception
octoberrain/contracts
adachsoft/api-version-bundle
cgv/localized-resource
noith/settings
kda/laravel-package
kda/filament-dynamic-navigation
bypersoft/signbox