spomky-labs / cbor-bundle
CBOR Encoder/Decoder Bundle for Symfony.
Installs: 111 725
Dependents: 1
Suggesters: 0
Security: 0
Stars: 4
Watchers: 3
Forks: 1
Open Issues: 4
Type:symfony-bundle
Requires
- php: >=8.0
- spomky-labs/cbor-php: ^3.0
- symfony/config: ^5.3|^6.0
- symfony/dependency-injection: ^5.3|^6.0
- symfony/http-kernel: ^5.3|^6.0
Requires (Dev)
- infection/infection: ^0.25.3
- phpstan/extension-installer: ^1.1
- phpstan/phpstan: ^1.0
- phpstan/phpstan-beberlei-assert: ^1.0
- phpstan/phpstan-deprecation-rules: ^1.0
- phpstan/phpstan-phpunit: ^1.0
- phpstan/phpstan-strict-rules: ^1.0
- phpunit/phpunit: ^9.0
- rector/rector: ^0.12.5
- symfony/framework-bundle: ^5.3|^6.0
- symfony/phpunit-bridge: ^5.3|^6.0
- symplify/easy-coding-standard: ^9.4
This package is auto-updated.
Last update: 2024-12-01 20:33:00 UTC
README
Scope
This bundle wraps the spomky-labs/cbor-php library and provides the decoder as a service This will help you to easily decode CBOR streams (Concise Binary Object Representation from RFC8949).
Installation
Install the bundle with Composer: composer require spomky-labs/cbor-bundle
.
This project follows the semantic versioning strictly.
Documentation
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.
<?php use SpomkyLabs\CborBundle\CBORDecoder; // CBOR object (shall be a binary string; in hex for the example) $data = hex2bin('fb3fd5555555555555'); // Load the data $object = $container->get(CBORDecoder::class)->decode($data); // Return a CBOR\OtherObject\DoublePrecisionFloatObject class with normalized value ~0.3333 (=1/3)
Custom Tags / Other Objects
To be written
Support
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!
Or
Contributing
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.
Licence
This project is release under MIT licence.