PHPackages                             spiral/marshaller-bridge - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Parsing &amp; Serialization](/categories/parsing)
4. /
5. spiral/marshaller-bridge

ActiveLibrary[Parsing &amp; Serialization](/categories/parsing)

spiral/marshaller-bridge
========================

Marshaller bridge for Spiral Framework

v1.0.1(2y ago)0607[2 PRs](https://github.com/spiral/marshaller-bridge/pulls)1MITPHPPHP &gt;=8.1

Since Jul 1Pushed 2y ago1 watchersCompare

[ Source](https://github.com/spiral/marshaller-bridge)[ Packagist](https://packagist.org/packages/spiral/marshaller-bridge)[ Docs](https://github.com/spiral/marshaller-bridge)[ RSS](/packages/spiral-marshaller-bridge/feed)WikiDiscussions 1.x Synced 1mo ago

READMEChangelog (2)Dependencies (9)Versions (5)Used By (1)

Marshaller bridge for Spiral Framework
======================================

[](#marshaller-bridge-for-spiral-framework)

[![PHP Version Require](https://camo.githubusercontent.com/c85f757d47a62fff438a122ecd4874b250f843d1ca72c2c4504449654a93e1d5/68747470733a2f2f706f7365722e707567782e6f72672f73706972616c2f6d61727368616c6c65722d6272696467652f726571756972652f706870)](https://packagist.org/packages/spiral/marshaller-bridge)[![Latest Stable Version](https://camo.githubusercontent.com/aedba69535cff494e1542af839b85ef15806375f9e778598797b3c758345fb07/68747470733a2f2f706f7365722e707567782e6f72672f73706972616c2f6d61727368616c6c65722d6272696467652f762f737461626c65)](https://packagist.org/packages/spiral/marshaller-bridge)[![phpunit](https://github.com/spiral/marshaller-bridge/actions/workflows/phpunit.yml/badge.svg)](https://github.com/spiral/marshaller-bridge/actions)[![psalm](https://github.com/spiral/marshaller-bridge/actions/workflows/psalm.yml/badge.svg)](https://github.com/spiral/marshaller-bridge/actions)[![Codecov](https://camo.githubusercontent.com/bd905a0abd31c5880cca5df597afb93ee28a67b165ca1ea9ebc2b7f9878b9542/68747470733a2f2f636f6465636f762e696f2f67682f73706972616c2f6d61727368616c6c65722d6272696467652f6272616e63682f312e782f67726170682f62616467652e737667)](https://codecov.io/gh/spiral/marshaller-bridge)[![Total Downloads](https://camo.githubusercontent.com/2ab3b7de5a324e6c8e6423690c63e3221a1d1d609aa4be7e335f492ed06e6057/68747470733a2f2f706f7365722e707567782e6f72672f73706972616c2f6d61727368616c6c65722d6272696467652f646f776e6c6f616473)](https://packagist.org/packages/spiral/marshaller-bridge)[![type-coverage](https://camo.githubusercontent.com/77259ee5eddc41c215565dcdaa9597fa43e9d499ef0f8960a16c17057dd96198/68747470733a2f2f73686570686572642e6465762f6769746875622f73706972616c2f6d61727368616c6c65722d6272696467652f636f7665726167652e737667)](https://shepherd.dev/github/spiral/marshaller-bridge)[![psalm-level](https://camo.githubusercontent.com/3f3f1337279daf05067cfe715a9587a1894050568c31373450aac22ad92a79f6/68747470733a2f2f73686570686572642e6465762f6769746875622f73706972616c2f6d61727368616c6c65722d6272696467652f6c6576656c2e737667)](https://shepherd.dev/github/spiral/marshaller-bridge)

Requirements
------------

[](#requirements)

Make sure that your server is configured with following PHP version and extensions:

- PHP &gt;=8.1
- Spiral Framework ^3.0

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require spiral/marshaller-bridge
```

After package install you need to register bootloader from the package.

```
protected const LOAD = [
    // ...
    \Spiral\MarshallerBridge\Bootloader\MarshallerBootloader::class,
];
```

> **Note**Bootloader `Spiral\Serializer\Bootloader\SerializerBootloader` can be removed. If you are using [`spiral-packages/discoverer`](https://github.com/spiral-packages/discoverer), you don't need to register bootloader by yourself.

Configuration
-------------

[](#configuration)

The package is already configured by default, use these features only if you need to change the default configuration.

The package provides the ability to configure the `Spiral\Marshaller\Mapper\MapperFactoryInterface` and `matchers` used by the `Spiral\Marshaller\Marshaller` class. Create a file `app/config/marshaller.php`. Add the `mapperFactory` and `matchers` configuration parameters. For example:

```
