PHPackages                             auto1-oss/service-api-client-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. auto1-oss/service-api-client-bundle

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

auto1-oss/service-api-client-bundle
===================================

Auto1 Service API Client for PHP projects

v2.10.0(7mo ago)281.1k↓56.3%22[3 issues](https://github.com/auto1-oss/service-api-client-bundle/issues)[3 PRs](https://github.com/auto1-oss/service-api-client-bundle/pulls)MITPHPPHP ^7.4|^8.0CI failing

Since Feb 19Pushed 7mo ago4 watchersCompare

[ Source](https://github.com/auto1-oss/service-api-client-bundle)[ Packagist](https://packagist.org/packages/auto1-oss/service-api-client-bundle)[ RSS](/packages/auto1-oss-service-api-client-bundle/feed)WikiDiscussions master Synced 2w ago

READMEChangelog (10)Dependencies (23)Versions (36)Used By (0)

Usage
-----

[](#usage)

Bundle uses *php-http/httplug* client abstraction. So you'll need to install some psr7-compatible client into your project to be used by this bundle. For more details: [php-http/httplug clients and adapters](http://docs.php-http.org/en/latest/clients.html).

This bundle builds requests via [PSR-17](https://www.php-fig.org/psr/psr-17/) HTTP factories, discovered with `Http\Discovery\Psr17FactoryDiscovery`. Your project therefore also needs a discoverable PSR-17 factory implementation (for example `nyholm/psr7`, or `guzzlehttp/psr7` **&gt;= 2.0** — the PSR-17 factory was introduced in Guzzle PSR-7 2.0, so `1.x` is not enough).

> **Upgrade note:** `Service\Request\RequestFactory` no longer depends on the abandoned `php-http/message-factory`. Its constructor now takes PSR-17 factories (`Psr\Http\Message\UriFactoryInterface`, `RequestFactoryInterface`, `StreamFactoryInterface`) instead of `Http\Message\UriFactory` + `Http\Message\MessageFactory`. If you instantiate or re-register this service yourself, update the wiring — the container service `auto1.api.message_factory` was replaced by `auto1.api.request_factory` and `auto1.api.stream_factory`.

config.yml
----------

[](#configyml)

```
auto1_service_api_client:
    request_visitors:
        - '@visitor1'
        - '@visitor2'
    strict_mode: false
```

- **request\_visitors** - Request visitors (RequestVisitorInterface) are aimed to modify your Request - like adding custom headers. You can also TAG services with '**auto1.api.request\_visitor**' to make them visitors. **Warning!** By setting this configuration you will override default values!
- **strict\_mode** - boolean, `false` by default. If it is `true` the request factory ignores any request body for GET, HEAD, OPTIONS and TRACE HTTP methods. In other words, client will always send such requests without body.

Example of EP definition (yaml):
--------------------------------

[](#example-of-ep-definition-yaml)

```
postUnicorn:
    method:        'POST'
    baseUrl:       'http://google.com'
    path:          '/v1/unicorn'
    requestFormat: 'url'
    requestClass:  'Auto1\ServiceDTOCollection\Unicorns\Request\PostUnicorn'
    responseClass: 'Auto1\ServiceDTOCollection\Unicorns\Response\Unicorn'

listUnicorns:
    method:        'GET'
    baseUrl:       'http://google.com'
    path:          '/v1/unicorns'
    requestFormat: 'json'
    requestClass:  'Auto1\ServiceDTOCollection\Unicorns\Request\SearchUnicorns'
    responseClass: 'Auto1\ServiceDTOCollection\Unicorns\Response\Unicorn[]'
```

Example of ServiceRequest implementation:
-----------------------------------------

[](#example-of-servicerequest-implementation)

```
class PostUnicorn implements ServiceRequestInterface
{
    private $horn;

    public function setHorn(string $horn): self
    {
        $this->horn = $horn;

        return $this;
    }

    public function getHorn()
    {
        return $this->horn;
    }
}
```

Example of Repository implementation:
-------------------------------------

[](#example-of-repository-implementation)

```
class UnicornRepository
{
    public function __construct(APIClientInterface $apiClient,)
    {
        $this->apiClient = $apiClient;
    }

    /**
     * @param string $horn
     *
     * @return Unicorn[]
     */
    public function getListByHorn(string $horn): array
    {
        $serviceRequest = (new GetUnicornsByHornRequest())->setHorn($horn);

        return $this->apiClient->send($serviceRequest);
    }
}
```

For more info - have a look at [service-api-components-bundle](https://github.com/auto1-oss/service-api-components-bundle) usage:

###  Health Score

49

—

FairBetter than 94% of packages

Maintenance44

Moderate activity, may be stable

Popularity36

Limited adoption so far

Community28

Small or concentrated contributor base

Maturity78

Established project with proven stability

 Bus Factor7

7 contributors hold 50%+ of commits

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 ~83 days

Recently: every ~76 days

Total

31

Last Release

221d ago

Major Versions

v1.1.0 → v2.0.02020-07-02

PHP version history (3 changes)v1.0.0PHP &gt;=7.0.8

v2.3.0PHP ^7.3|^8.0

v2.9.0PHP ^7.4|^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/454acf55975295ff3419c512f37726965bd162c36ecf96608c98276252331192?d=identicon)[dmitry-auto1](/maintainers/dmitry-auto1)

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

![](https://www.gravatar.com/avatar/b8838fde794e03fccc7b390a26ae3167a0e8f44fd563f64fbbb86d45d01dc6be?d=identicon)[devops-auto1](/maintainers/devops-auto1)

---

Top Contributors

[![sklabinsky](https://avatars.githubusercontent.com/u/20512721?v=4)](https://github.com/sklabinsky "sklabinsky (5 commits)")[![michalczyzynski](https://avatars.githubusercontent.com/u/1697796?v=4)](https://github.com/michalczyzynski "michalczyzynski (4 commits)")[![diego1auto](https://avatars.githubusercontent.com/u/39913169?v=4)](https://github.com/diego1auto "diego1auto (2 commits)")[![buldezir](https://avatars.githubusercontent.com/u/29286?v=4)](https://github.com/buldezir "buldezir (2 commits)")[![l7ssha](https://avatars.githubusercontent.com/u/23033957?v=4)](https://github.com/l7ssha "l7ssha (2 commits)")[![v-chmykov](https://avatars.githubusercontent.com/u/8100395?v=4)](https://github.com/v-chmykov "v-chmykov (2 commits)")[![alex-sun](https://avatars.githubusercontent.com/u/9051692?v=4)](https://github.com/alex-sun "alex-sun (2 commits)")[![vladimir-chmykov](https://avatars.githubusercontent.com/u/50660350?v=4)](https://github.com/vladimir-chmykov "vladimir-chmykov (2 commits)")[![milan-miscevic](https://avatars.githubusercontent.com/u/7656767?v=4)](https://github.com/milan-miscevic "milan-miscevic (2 commits)")[![lukashin](https://avatars.githubusercontent.com/u/5064002?v=4)](https://github.com/lukashin "lukashin (1 commits)")[![mprzypadlo](https://avatars.githubusercontent.com/u/33673338?v=4)](https://github.com/mprzypadlo "mprzypadlo (1 commits)")[![ppietak](https://avatars.githubusercontent.com/u/4834548?v=4)](https://github.com/ppietak "ppietak (1 commits)")[![rooodik](https://avatars.githubusercontent.com/u/47384543?v=4)](https://github.com/rooodik "rooodik (1 commits)")[![justenj](https://avatars.githubusercontent.com/u/8820060?v=4)](https://github.com/justenj "justenj (1 commits)")[![agoosev](https://avatars.githubusercontent.com/u/4441170?v=4)](https://github.com/agoosev "agoosev (1 commits)")[![aivus](https://avatars.githubusercontent.com/u/1021703?v=4)](https://github.com/aivus "aivus (1 commits)")[![akryvushenko](https://avatars.githubusercontent.com/u/161847959?v=4)](https://github.com/akryvushenko "akryvushenko (1 commits)")[![daydiff](https://avatars.githubusercontent.com/u/2212845?v=4)](https://github.com/daydiff "daydiff (1 commits)")[![Dropaq](https://avatars.githubusercontent.com/u/3353781?v=4)](https://github.com/Dropaq "Dropaq (1 commits)")[![Enzovera](https://avatars.githubusercontent.com/u/19622675?v=4)](https://github.com/Enzovera "Enzovera (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/auto1-oss-service-api-client-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/auto1-oss-service-api-client-bundle/health.svg)](https://phpackages.com/packages/auto1-oss-service-api-client-bundle)
```

###  Alternatives

[sylius/sylius

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

8.5k6.0M777](/packages/sylius-sylius)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

595.8M672](/packages/shopware-core)[shopware/platform

The Shopware e-commerce core

3.4k1.5M3](/packages/shopware-platform)[contao/core-bundle

Contao Open Source CMS

1301.7M3.1k](/packages/contao-core-bundle)[chameleon-system/chameleon-base

The Chameleon System core.

1029.4k6](/packages/chameleon-system-chameleon-base)[flow-php/flow

PHP ETL - Extract Transform Load - Data processing framework

86337.5k](/packages/flow-php-flow)

PHPackages © 2026

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