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

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

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

Auto1 Service API Handler Bundle for creating micro-services with PHP

v1.4.0(4mo ago)365.6k↓35.8%14MITPHPPHP ^8.1CI failing

Since Feb 19Pushed 4mo ago5 watchersCompare

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

READMEChangelog (10)Dependencies (15)Versions (17)Used By (0)

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

[](#installation)

### Register required Bundles:

[](#register-required-bundles)

```
    Auto1\ServiceAPIComponentsBundle\Auto1ServiceAPIComponentsBundle::class => ['all' => true],
    Auto1\ServiceAPIHandlerBundle\Auto1ServiceAPIHandlerBundle::class => ['all' => true],
```

### config/routing.yml

[](#configroutingyml)

```
endpoints:
    resource: "@Auto1ServiceAPIHandlerBundle/Resources/config/routing.yml"
```

Description
-----------

[](#description)

Use Endpoints specifications to handle symfony request flow.

Prepares `RequestDTO` from `$_GLOBALS` and serializes response from `ServiceResponse(ResponseDTO, HTTP_CODE)`

Controller
----------

[](#controller)

- Controllers must be tagged with `controller.service_arguments` and suffixed with `Controller`
- Action methods must be suffixed with `Action`

ServiceResponse
---------------

[](#serviceresponse)

- Fully imitates, but not implements behaviour of `HttpFoundation\Response` (JsonResponse)
- Agnostic to the response format, and performs serialization after being returned from the controller

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

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

```
# CarLead
getCarLeadByVin:
    method:        'GET'
    baseUrl:       '%auto1.api.url%'
    path:          '/v1/carlead/vin/{vin}'
    requestClass:  'Auto1\ServiceDTOCollection\CarLead\CarLeadRead\Request\GetCarLeadByVinRequest'
    responseClass: 'Auto1\ServiceDTOCollection\CarLead\CarLeadRead\Response\CarLead'
```

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

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

```
class GetCarLeadByVinRequest implements ServiceRequestInterface
{
    private $vin;

    public function setVin(string $vin): self
    {
        $this->vin = $vin;

        return $this;
    }

    public function getVin()
    {
        return $this->vin;
    }
}
```

Example of EP implementation:
-----------------------------

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

```
use Auto1\ServiceAPIHandlerBundle\Response\ServiceResponse;
use Auto1\ServiceDTOCollection\CarLead\CarLeadRead\Request\GetCarLeadByVinRequest;
use Auto1\ServiceDTOCollection\CarLead\CarLeadRead\Response\CarLead;

class MyController {

    public function carLeadByVinAction(GetCarLeadByVinRequest $carLeadRequestDTO): ServiceResponse
    {
        /** @var CarLead $carLead */
        $carLead = $this->...->find($carLeadRequestDTO->getVin());

        return new ServiceResponse(
            $carLead,
            200
        );
    }
}
```

Swagger generation
------------------

[](#swagger-generation)

For `symfony:>=6.0` and `nelmio/api-doc-bundle:>=4.0` swagger json file is generated in OpenApi v3 format `"openapi": "3.0.0"`. For previous versions of `symfony` and `nelmio/api-doc-bundle` swagger json file is generated in Swagger V2 format `"swagger": "2.0"`.

Debug
-----

[](#debug)

```
bin/console c:c && bin/console debug:router --show-controllers
```

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

###  Health Score

57

—

FairBetter than 98% of packages

Maintenance76

Regular maintenance activity

Popularity36

Limited adoption so far

Community26

Small or concentrated contributor base

Maturity77

Established project with proven stability

 Bus Factor5

5 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 ~179 days

Recently: every ~129 days

Total

15

Last Release

130d ago

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

v1.1.0PHP &gt;=7.1

v1.3.0PHP ^7.4|^8.0

v1.4.0PHP ^8.1

### 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 (3 commits)")[![alexandre-xavier-auto1](https://avatars.githubusercontent.com/u/36959068?v=4)](https://github.com/alexandre-xavier-auto1 "alexandre-xavier-auto1 (2 commits)")[![pidhorodetskyi](https://avatars.githubusercontent.com/u/39693338?v=4)](https://github.com/pidhorodetskyi "pidhorodetskyi (2 commits)")[![rakeev](https://avatars.githubusercontent.com/u/1861570?v=4)](https://github.com/rakeev "rakeev (2 commits)")[![alex-sun](https://avatars.githubusercontent.com/u/9051692?v=4)](https://github.com/alex-sun "alex-sun (2 commits)")[![Dropaq](https://avatars.githubusercontent.com/u/3353781?v=4)](https://github.com/Dropaq "Dropaq (2 commits)")[![osalimi](https://avatars.githubusercontent.com/u/1709350?v=4)](https://github.com/osalimi "osalimi (1 commits)")[![vi-auto1](https://avatars.githubusercontent.com/u/187269629?v=4)](https://github.com/vi-auto1 "vi-auto1 (1 commits)")[![adalessa](https://avatars.githubusercontent.com/u/7914601?v=4)](https://github.com/adalessa "adalessa (1 commits)")[![ViAuto1](https://avatars.githubusercontent.com/u/54138830?v=4)](https://github.com/ViAuto1 "ViAuto1 (1 commits)")[![a-olmedo](https://avatars.githubusercontent.com/u/177146653?v=4)](https://github.com/a-olmedo "a-olmedo (1 commits)")[![arturkurbidaev-auto1](https://avatars.githubusercontent.com/u/115999639?v=4)](https://github.com/arturkurbidaev-auto1 "arturkurbidaev-auto1 (1 commits)")[![egorkrestinin1](https://avatars.githubusercontent.com/u/31095467?v=4)](https://github.com/egorkrestinin1 "egorkrestinin1 (1 commits)")[![l7ssha](https://avatars.githubusercontent.com/u/23033957?v=4)](https://github.com/l7ssha "l7ssha (1 commits)")[![milan-miscevic](https://avatars.githubusercontent.com/u/7656767?v=4)](https://github.com/milan-miscevic "milan-miscevic (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[sylius/sylius

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

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

The Shopware e-commerce core

3.3k1.5M3](/packages/shopware-platform)[prestashop/prestashop

PrestaShop is an Open Source e-commerce platform, committed to providing the best shopping cart experience for both merchants and customers.

9.0k15.4k](/packages/prestashop-prestashop)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

595.2M386](/packages/shopware-core)[ec-cube/ec-cube

EC-CUBE EC open platform.

78527.0k1](/packages/ec-cube-ec-cube)[sulu/sulu

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

1.3k1.3M152](/packages/sulu-sulu)

PHPackages © 2026

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