PHPackages                             yusefauto1/service-api-components-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. yusefauto1/service-api-components-bundle

ActiveAuto1-bundle

yusefauto1/service-api-components-bundle
========================================

Auto1 Common Components for Service API/Client/Handler Bundles

v1.0.2(6y ago)0871MITPHPPHP &gt;=7.0.8

Since Feb 19Pushed 6y agoCompare

[ Source](https://github.com/yusefauto1/service-api-components-bundle)[ Packagist](https://packagist.org/packages/yusefauto1/service-api-components-bundle)[ RSS](/packages/yusefauto1-service-api-components-bundle/feed)WikiDiscussions master Synced 1w ago

READMEChangelog (2)Dependencies (15)Versions (6)Used By (1)

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

[](#installation)

### config.yml

[](#configyml)

```
framework:
    serializer: { enabled: true }
    property_info: { enabled: true }
```

Example EP Provider symfony.service declaration:
------------------------------------------------

[](#example-ep-provider-symfonyservice-declaration)

### tag

[](#tag)

```
{ name: 'auto1.api.endpoint_provider', priority: 0 }
```

### services.yml

[](#servicesyml)

```
services:
    your_app.api.endpoint.provider:
        class: Auto1\ServiceAPIComponentsBundle\Service\Endpoint\EndpointProviderConfiguration
        arguments:
            - '@auto1.api.endpoint.factory'
            - '@your_app.api.endpoint_configuration.loader'
        tags:
            - { name: 'auto1.api.endpoint_provider', priority: 0 }

    your_app.api.endpoint_configuration.loader:
        class: Auto1\ServiceAPIComponentsBundle\Service\Endpoint\EndpointsConfigurationLoader
        arguments:
            - '%kernel.project_dir%/src/Resources/endpoints.yml'
```

### Super Quick Start:

[](#super-quick-start)

Only for proof of concept etc.

```
class YourProvider implements EndpointProviderInterface
{
    public function getEndpoints(): array
    {
        return [
            new EndpointImmutable(
                ...,
            ),
        ];
    }
}
```

```
services:
    your_app.api.endpoint.provider:
        class: YourProvider
        tags:
            - { name: 'auto1.api.endpoint_provider', priority: 0 }
```

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

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

```
# Auth
- method:        'POST'
  baseUrl:       '%wkda.java_api.url%'
  path:          '/v1/auth/oauth/token'
  requestFormat: 'url'
  requestClass:  'Auto1\ServiceDTOCollection\Authentication\OAuth\Request\PostRefreshTokenRequest'
  responseClass: 'Auto1\ServiceDTOCollection\Authentication\OAuth\Response\Token'

- method:        'GET'
  baseUrl:       '%wkda.java_api.admin_url%'
  path:          '/v1/auth/user/admin/{userUuid}/roles'
  requestFormat: 'url'
  requestClass:  'Auto1\ServiceDTOCollection\Authentication\User\Request\GetUserRolesRequest'
  responseClass: 'Auto1\ServiceDTOCollection\Authentication\User\Response\UserRoles'

# CarLead
- method:        'GET'
  baseUrl:       '%wkda.java_api.url%'
  path:          '/v1/carlead/vin/{vin}'
  requestClass:  'Auto1\ServiceDTOCollection\CarLead\CarLeadRead\Request\GetCarDetailsByVinRequest'
  responseClass: 'Auto1\ServiceDTOCollection\CarLead\CarLeadRead\Response\CarLead[]'
```

### Alternative:

[](#alternative)

```
# Auth
refreshToken:
    method:        'POST'
    baseUrl:       '%wkda.java_api.url%'
    path:          '/v1/auth/oauth/token'
    requestFormat: 'url'
    requestClass:  'Auto1\ServiceDTOCollection\Authentication\OAuth\Request\PostRefreshTokenRequest'
    responseClass: 'Auto1\ServiceDTOCollection\Authentication\OAuth\Response\Token'

getUserRoles:
    method:        'GET'
    baseUrl:       '%wkda.java_api.admin_url%'
    path:          '/v1/auth/user/admin/{userUuid}/roles'
    requestFormat: 'url'
    requestClass:  'Auto1\ServiceDTOCollection\Authentication\User\Request\GetUserRolesRequest'
    responseClass: 'Auto1\ServiceDTOCollection\Authentication\User\Response\UserRoles'

# CarLead
getCarLeadByVin:
    method:        'GET'
    baseUrl:       '%wkda.java_api.url%'
    path:          '/v1/carlead/vin/{vin}'
    requestClass:  'Auto1\ServiceDTOCollection\CarLead\CarLeadRead\Request\GetCarDetailsByVinRequest'
    responseClass: 'Auto1\ServiceDTOCollection\CarLead\CarLeadRead\Response\CarLead[]'
```

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

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

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

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

        return $this;
    }

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

Url resolution
--------------

[](#url-resolution)

For altering the default behaviour of Url resolution see `UrlResolverCompilerPass` and use `auto1.api.url_resolver` tag together with `priority`:

```
    # this is a default resolver
    auto1.api.url_resolver.parameter_aware:
        class: Auto1\ServiceAPIComponentsBundle\Service\UrlResolver\ParameterAwareUrlResolver
        arguments:
            - '@service_container'
        tags:
            - { name: 'auto1.api.url_resolver', priority: 0 }
```

Debug:
------

[](#debug)

To output all registered endpoints:

```
bin/console auto1.debug.endpoints
```

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 75% 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 ~68 days

Total

5

Last Release

2373d ago

Major Versions

v0.3 → v1.0.12019-11-06

### Community

Maintainers

![](https://www.gravatar.com/avatar/60728f07226bb4d84565912a54014fd8733d6611b027fee79ec1bde2699f5ffa?d=identicon)[yusefauto1](/maintainers/yusefauto1)

---

Top Contributors

[![yusefauto1](https://avatars.githubusercontent.com/u/53563897?v=4)](https://github.com/yusefauto1 "yusefauto1 (12 commits)")[![sklabinsky](https://avatars.githubusercontent.com/u/20512721?v=4)](https://github.com/sklabinsky "sklabinsky (4 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/yusefauto1-service-api-components-bundle/health.svg)

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

###  Alternatives

[shopware/platform

The Shopware e-commerce core

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

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

8.4k5.6M651](/packages/sylius-sylius)[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)
