CBOR Encoder/Decoder Bundle for Symfony.

Installs: 7 461

Dependents: 2

Suggesters: 0

Security: 0

Stars: 2

Watchers: 1

Forks: 1

Open Issues: 0


v2.0.3 2020-07-12 22:47 UTC

This package is auto-updated.

Last update: 2020-10-12 23:33:08 UTC


Scrutinizer Code Quality Coverage Status

Build Status

Latest Stable Version Total Downloads Latest Unstable Version License


This bundle wraps the spomky-labs/cbor-php library and provides the decoder as a service This will help you to eausily decode CBOR streams (Concise Binary Object Representation from RFC7049).


Install the bundle with Composer: composer require spomky-labs/cbor-budle.

This project follows the semantic versioning strictly.


Object Creation

For object creation, please refer to the documentation of the library.

Object Loading

If you want to load a CBOR encoded data, you just have to use de decoder available from the container.


use CBOR\Decoder;
use CBOR\StringStream;

// CBOR object (in hex for the example)
$data = hex2bin('fb3fd5555555555555');

// String Stream
$stream = new StringStream($data);

// Load the data
$object = $container->get(Decoder::class)->decode($stream); // Return a CBOR\OtherObject\DoublePrecisionFloatObject class with normalized value ~0.3333 (=1/3)

Custom Tags / Other Objects


I bring solutions to your problems and answer your questions.

If you really love that project and the work I have done or if you want I prioritize your issues, then you can help me out for a couple of 🍻 or more!

Become a Patreon


Requests for new features, bug fixed and all other ideas to make this project useful are welcome. The best contribution you could provide is by fixing the opened issues where help is wanted.

Please report all issues in the main repository.

Please make sure to follow these best practices.

Security Issues

If you discover a security vulnerability within the project, please don't use the bug tracker and don't publish it publicly. Instead, all security issues must be sent to security [at] spomky-labs.com.


This project is release under MIT licence.