spomky-labs / cbor-bundle
CBOR Encoder/Decoder Bundle for Symfony.
Package info
github.com/Spomky-Labs/cbor-bundle
Type:symfony-bundle
pkg:composer/spomky-labs/cbor-bundle
Requires
- php: >=8.0
- spomky-labs/cbor-php: ^3.3.3
- symfony/config: ^5.3|^6.0|^7.0
- symfony/dependency-injection: ^5.3|^6.0|^7.0
- symfony/http-kernel: ^5.3|^6.0|^7.0
Requires (Dev)
- symfony/framework-bundle: ^5.3|^6.0|^7.0
Suggests
None
Provides
None
Conflicts
None
Replaces
None
This package is auto-updated.
Last update: 2026-11-23 14:28:48 UTC
README
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:
- ⭐ Star the project on GitHub
- 💰 Become a sponsor
- ☕ Support via Patreon
License
This project is released under the MIT License.
Credits
This bundle is maintained by Florent Morselli and contributors.