PHPackages                             xrow/rest-bundle - 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. [API Development](/categories/api)
4. /
5. xrow/rest-bundle

ActiveSymfony-bundle[API Development](/categories/api)

xrow/rest-bundle
================

REST bundle for CRM interfaces

2.1.0(6y ago)08.2k2MITJavaScript

Since Dec 8Pushed 6y ago12 watchersCompare

[ Source](https://github.com/xrowgmbh/rest-bundle)[ Packagist](https://packagist.org/packages/xrow/rest-bundle)[ RSS](/packages/xrow-rest-bundle/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (3)Versions (20)Used By (0)

xrow RestBundle
===============

[](#xrow-restbundle)

This is a bundle which creates an API for third party application. The data for the API are comming from your favorite CRM (salesforce, navision, and so on).

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

[](#installation)

1. Create a class in your crm bundle and implements CRMPluginInterface. Here is the default [crm plugin class](https://github.com/xrowgmbh/rest-bundle/blob/master/CRM/CRMPlugin.php). Add the path to your crm plugin class in your app/config/config.yml: ```
    # app/config/config.yml

    xrow_rest:
        plugins:
            crmclass:   path\toYour\CRMPluginClass
    ```
2. Edit your ezpublish/config/config.yml. Add this configuration: ```
    # app/config/config.yml

    assetic:
        ...
        assets:
            ...
            xrowrest_js:
                inputs:
                    - %kernel.root_dir%/../vendor/xrow/rest-bundle/Resources/public/js/xrowrest.js
                output: js/xrowrest.js

    doctrine:
        orm:
            auto_mapping: true
    ```

2.1 Choose one of the OAuth2 bundles: FOSOAuthServerBundle (without OpenID Connect) or oauth2-server-bundle (with OpenID Connect)

2.1.1 For FOSOAuthServerBundle () ```yml # app/config/config.yml

```
fos_oauth_server:
    db_driver: orm
    client_class:        xrow\restBundle\Entity\Client
    access_token_class:  xrow\restBundle\Entity\AccessToken
    auth_code_class:     xrow\restBundle\Entity\AuthCode
    refresh_token_class: xrow\restBundle\Entity\RefreshToken
    service:
        user_provider: xrowsso.platform.user.provider
        storage:       xrow_oauth_server.storage
        options:
            supported_scopes: user

```

2.1.2 For oauth2-server-bundle () ```yml # app/config/service.yml

```
services:
    oauth2.user_provider:
        class: xrow\restBundle\Provider\OAuth2UserProvider
        arguments:
            - "@service_container"
            - "@doctrine.orm.entity_manager"
            - "@security.encoder_factory"
    oauth2.openid.storage.authorization_code:
        class: xrow\restBundle\Storage\OAuth2Memory
        arguments:
            - {client_credentials: {%oauth2.client_id%: {client_secret: %oauth2.client_secret%}}, keys: {%oauth2.client_id%: {public_key: %oauth2.public_key%, private_key: %oauth2.private_key%}}}
    oauth2.openid.grant_type.authorization_code:
        class: OAuth2\OpenID\GrantType\AuthorizationCode
        arguments:
            - "@oauth2.openid.storage.authorization_code"
    oauth2.grant_type.user_credentials:
        class: xrow\restBundle\GrantType\OAuth2UserCredentials
        arguments:
            - "@oauth2.storage.user_credentials"
            - "@service_container"
    oauth2.server:
        class: "%oauth2.server.class%"
        arguments:
            - ["@oauth2.storage.client_credentials", "@oauth2.storage.access_token", "@oauth2.openid.storage.authorization_code", "@oauth2.storage.user_credentials", "@oauth2.storage.refresh_token", "@oauth2.storage.scope"]
            - {refresh_token_lifetime: 15552000, use_openid_connect: true, issuer: %oauth_baseurl%, use_jwt_access_tokens: true, always_issue_new_refresh_token: true}
            - {authorization_code: "@oauth2.openid.grant_type.authorization_code", refresh_token: "@oauth2.grant_type.refresh_token", user_credentials: "@oauth2.grant_type.user_credentials"}

```yml
# app/config/parameters.yml
parameters:
    oauth2.grant_type.user_credentials.class: xrow\restBundle\GrantType\UserCredentials
    oauth2.storage.user_credentials.class: xrow\restBundle\Storage\UserCredentials

```

3. Set the right route in your app/config/routing.yml

3.1 For oauth2-server-bundle () ```yml # app/config/routing.yml

```
xrow_rest_api:
    resource: "@xrowRestBundle/Controller/ApiController.php"
    type:     annotation
    prefix:   /xrowapi/v1

```

3.2 For oauth2-server-bundle () ```yml # app/config/routing.yml

```
xrow_rest_apiV2:
    resource: "@xrowRestBundle/Controller/ApiControllerV2.php"
    type:     annotation
    prefix:   /xrowapi/v2

```

3.3 Or both if you would like to use both on the same time

4. Add the page\_head\_script.html.twig to html head-tag and page\_footer\_script.html.twig to your footer (!!!important: after you load the tag )

{% block footer %} {% include 'wuvaboshopBundle::page\_footer\_script.html.twig' %} {% endblock %}

License
-------

[](#license)

This bundle is under the MIT license. See the complete [license](Resources/meta/LICENSE) in the bundle.

Development
-----------

[](#development)

See the [notes for developers](Resources/doc/develop.md)

###  Health Score

35

—

LowBetter than 80% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity20

Limited adoption so far

Community17

Small or concentrated contributor base

Maturity72

Established project with proven stability

 Bus Factor1

Top contributor holds 83.9% 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 ~87 days

Recently: every ~62 days

Total

17

Last Release

2420d ago

Major Versions

1.4.1 → 2.0.02019-01-24

### Community

Maintainers

![](https://www.gravatar.com/avatar/f08bee051f28728169796d79eb57b9387fb49abf244faaa1517952d7e22e1a7d?d=identicon)[xrow](/maintainers/xrow)

---

Top Contributors

[![xrowkristina](https://avatars.githubusercontent.com/u/2361764?v=4)](https://github.com/xrowkristina "xrowkristina (203 commits)")[![xinyuexrow](https://avatars.githubusercontent.com/u/2157109?v=4)](https://github.com/xinyuexrow "xinyuexrow (25 commits)")[![christianxrow](https://avatars.githubusercontent.com/u/2361335?v=4)](https://github.com/christianxrow "christianxrow (9 commits)")[![xrow](https://avatars.githubusercontent.com/u/295491?v=4)](https://github.com/xrow "xrow (3 commits)")[![dennisxrow](https://avatars.githubusercontent.com/u/8330144?v=4)](https://github.com/dennisxrow "dennisxrow (2 commits)")

### Embed Badge

![Health badge](/badges/xrow-rest-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/xrow-rest-bundle/health.svg)](https://phpackages.com/packages/xrow-rest-bundle)
```

###  Alternatives

[sylius/sylius

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

8.4k5.6M651](/packages/sylius-sylius)

PHPackages © 2026

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