Search by

spomky-labs / cbor-bundle

Spomky

CBOR Encoder/Decoder Bundle for Symfony.

Package info

github.com/Spomky-Labs/cbor-bundle

Homepage

Type:symfony-bundle

pkg:composer/spomky-labs/cbor-bundle

Fund package maintenance!

Spomky

Patreon

Statistics

Installs: 142 282

Dependents: 0

Suggesters: 0

Stars: 5

Open Issues: 0

3.1.0 2026-08-31 17:54 UTC

README

Build Status Latest Stable Version Total Downloads License

OpenSSF Scorecard

A Symfony bundle that provides CBOR (Concise Binary Object Representation) encoding and decoding support for the Symfony Serializer component.

CBOR is a data format whose design goals include the possibility of extremely small code size, fairly small message size, and extensibility without the need for version negotiation. It is defined in RFC 8949.

Features

  • 🔄 Full Symfony Serializer Integration: Works seamlessly with Symfony's serializer component
  • 📦 Complete Type Support: Encode/decode all PHP types (scalars, arrays, objects, enums)
  • ⚙️ Context Options: Fine-grained control over encoding behavior
  • 🎯 Object Serialization: Serialize any PHP object to CBOR format
  • 🔢 Enum Support: Native support for PHP 8.1+ backed and unit enums
  • 📝 Well Documented: Comprehensive PHPDoc and guides
  • ✅ Well Tested: Extensive test coverage

Requirements

  • PHP 8.3 or higher
  • Symfony 6.4, 7.x, or 8.x

Installation

Install the bundle using Composer:

composer require spomky-labs/cbor-bundle

If you're using Symfony Flex, the bundle will be automatically registered. Otherwise, register it manually in config/bundles.php:

return [
    // ...
    SpomkyLabs\CborBundle\SpomkyLabsCborBundle::class => ['all' => true],
];

Documentation

The documentation is available at https://cbor.spomky-labs.com/3.4/bundle/installation/

Upgrading

See UPGRADE-4.0.md for migration instructions from version 3.x to 4.0.

Contributing

Contributions are welcome! Please read our contributing guidelines before submitting a pull request.

Security

If you discover a security vulnerability, please follow our security policy.

Support

If you find this project useful and want to support its development:

License

This project is released under the MIT License.

Credits

This bundle is maintained by Florent Morselli and contributors.