PHPackages                             zored/speech - 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. zored/speech

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

zored/speech
============

JSON-RPC 2.0 for PHP. With Symfony 2.0 to 3.0 support.

1.1(9y ago)115MITPHPPHP &gt;=5.6

Since Apr 14Pushed 9y ago1 watchersCompare

[ Source](https://github.com/zored/speech)[ Packagist](https://packagist.org/packages/zored/speech)[ Docs](http://github.com/zored/speech)[ RSS](/packages/zored-speech/feed)WikiDiscussions master Synced yesterday

READMEChangelog (1)Dependencies (6)Versions (7)Used By (0)

Speech
======

[](#speech)

JSON-RPC 2.0 for PHP
--------------------

[](#json-rpc-20-for-php)

[![Build Status](https://camo.githubusercontent.com/16edb02161f1940b58b02f9bc015738c361cf0b07742a2820411cb7a2a40da53/68747470733a2f2f7472617669732d63692e6f72672f7a6f7265642f7370656563682e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/zored/speech)[![Latest Stable Version](https://camo.githubusercontent.com/98ee010daabd15f9de8031b1d2a501ea522404ce896a2023146d2ffd231b4cc3/68747470733a2f2f706f7365722e707567782e6f72672f7a6f7265642f7370656563682f762f737461626c65)](https://packagist.org/packages/zored/speech)

Bundle for JSON-RPC 2.0. You can use as **standalone library**. Or with **Symfony**.

Features
--------

[](#features)

- Validation. Based on [Symfony Validator component](https://github.com/symfony/validator).
- Deserialization. Based on [JMS](https://github.com/schmittjoh/serializer).
- Customization. Change your rules for **[JSON-RPC 2.0](http://json-rpc.org/wiki/specification)**.

Use
---

[](#use)

### Symfony

[](#symfony)

- Install package: `composer require zored/speech`.
- Add bundle `new Zored\SpeechBundle\ZoredSpeechBundle()` to your Symfony kernel `app/AppKernel.php`.
- Add route to default endpoint: `routing.yml`: ```
    json_rpc:
        defaults: { _controller: ZoredSpeechBundle:Default:jsonRpc }
        methods: [POST] # Or GET for Zored RPC.
        path: /json-rpc
    ```
- Add service with your JSON-RPC methods in `services.yml`: ```
    services:
        your.service:
            # Replace with your own class:
            class: 'Zored\SpeechBundle\Test\JsonRpc\Greeter'
    ```
- Allow this service to run in default controller via `parameters.yml`: ```
    parameters:
      zored.speech.controller.context.service_ids: ['your.service']
    ```
- Clear caches.
- Test: ```
    curl http://example.com/json-rpc/ \
        --data '{"id":"1", "method":"your.service:greet", "params":{"person":{"name":"bob","age":19}},"jsonrpc":"2.0"}'
    ```

### Standalone library

[](#standalone-library)

- See example in [`web/index.php`](web/index.php)
- Run there server with `php -S 127.0.0.1:8080`
- Test: ```
    curl http://127.0.0.1:8080 \
        --data '{"id":"1", "method":"your.service:greet", "params":{"person":{"name":"bob","age":19}},"jsonrpc":"2.0"}'
    ```

What's next?
------------

[](#whats-next)

- See [default controller](src/Controller/DefaultController.php) if you need multiple JSON-RPC endpoints.
- See [tests](test/Endpoint/EndpointTest.php) to know how it works.

Inside
------

[](#inside)

- Your request JSON string goes to [endpoint](src/Endpoint/Endpoint.php) which handles it and returns Symfony response.
- Endpoint chooses which [request passer](src/Request/Passer/RequestPasserInterface.php) can pass JSON string to request handler.
    - There are [single](src/Request/Passer/SingleRequestPasser.php) for `{}` and [batch](src/Request/Passer/BatchRequestPasser.php) for `[{},{}]` passers enabled by default.
- Request passer also deserializes JSON to object and validates it.
- Request passer passes request object to [request handler](src/Request/Handler/RequestHandlerInterface.php) that pushes request somewhere to get response.
    - Now [service handler](src/Request/Handler/ServiceHandler.php) is used to:
        - Deserialize request `params` if set with [parameter converter](src/Request/Handler/RequestHandlerInterface.php).
        - Call public method of service with these params. **Services are restricted with [`ServiceContext`](src/Endpoint/Context/ServiceContext.php)**. For default controller see `zored.speech.controller.context` parameter.
        - Wait for `array` or [`AbstractResponse`](src/Response/Entity/AbstractResponse.php).
- Request then passed back and serialized to array.

Events
------

[](#events)

You can see available events [here](src/Event/EventNameInterface.php).

###  Health Score

27

—

LowBetter than 47% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

5

Last Release

3365d ago

Major Versions

0.2 → 1.02017-04-14

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/3776810?v=4)[Robert Akhmerov](/maintainers/zored)[@zored](https://github.com/zored)

---

Top Contributors

[![zored](https://avatars.githubusercontent.com/u/3776810?v=4)](https://github.com/zored "zored (4 commits)")

---

Tags

jsonrpcjsonrpcjson-rpcsymfony2bundlesymfony3bundle

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/zored-speech/health.svg)

```
[![Health](https://phpackages.com/badges/zored-speech/health.svg)](https://phpackages.com/packages/zored-speech)
```

###  Alternatives

[easycorp/easyadmin-bundle

Admin generator for Symfony applications

4.3k17.9M379](/packages/easycorp-easyadmin-bundle)[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.5k5.9M719](/packages/sylius-sylius)[pimcore/pimcore

Content &amp; Product Management Framework (CMS/PIM/E-Commerce)

3.8k3.8M482](/packages/pimcore-pimcore)[shopware/platform

The Shopware e-commerce core

3.4k1.5M3](/packages/shopware-platform)[sulu/sulu

Core framework that implements the functionality of the Sulu content management system

1.3k1.4M196](/packages/sulu-sulu)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

585.4M534](/packages/shopware-core)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
