PHPackages                             zinvapel/symfony-basis-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. [Utility &amp; Helpers](/categories/utility)
4. /
5. zinvapel/symfony-basis-bundle

ActiveSymfony-bundle[Utility &amp; Helpers](/categories/utility)

zinvapel/symfony-basis-bundle
=============================

Common classes for symfony service

0.1.5(5y ago)089PHPPHP ^7.4 || ^8.0

Since Dec 15Pushed 5y ago1 watchersCompare

[ Source](https://github.com/zinvapel/symfony-basis-bundle)[ Packagist](https://packagist.org/packages/zinvapel/symfony-basis-bundle)[ RSS](/packages/zinvapel-symfony-basis-bundle/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (9)Versions (12)Used By (0)

Symfony Basis Bundle
====================

[](#symfony-basis-bundle)

Contains common things for creation of Symfony application. Basically, can be used for every PHP application.

Versions
--------

[](#versions)

Version X.Y.Z imply:

- X - const 1 before concepts does not changed
- Y - every update contains new features
- Z - bug fixes

BasisBundle for Symfony users
-----------------------------

[](#basisbundle-for-symfony-users)

Plug BasisBundle into your `bundles.php`.

Explain configuration:

```
basis:
    routes:
        get_user:
            context:
                factory_type: denormalize
                data_extractor: 'route', 'empty', 'json', 'post_json'
                dto_class: Zinvapel\Basis\BasisBundle\Regular\Dto\Service\EmptyDto
                constraints_provider: Zinvapel\Basis\BasisBundle\Regular\Dto\Service\EmptyDto::getConstraints
            service: some.service.name
            responses:
                Some\Dto\Name:
                    factory_type: no_content
                    status_code: 204
                    custom: factory
```

This config will generate `basis.routes.get_user.controller` service, instance of `Zinvapel\Basis\BasisBundle\Http\Flow\Controller`.

- `context.factory_type` defines factory, instance of `Zinvapel\Basis\BasisBundle\Http\Flow\Context\Factory\ContextFactoryInterface`. This factory respond for transformation Request into `Zinvapel\Basis\BasisBundle\Core\Dto\ServiceDtoInterface`. Can be:
    - `denormalize` - extracts data from Request, validates it and assemble `ServiceDtoInterface`
    - `custom` - indicates to take service name from custom parameter.
- `context.custom` - user defined factory.
- `context.data_extractor` define how to extract data from request. Can be:
    - `route` - from route parameters
    - `empty` - returns empty array
    - `json` - gets json from body and converts into associative array
    - `post_json` - combines `route` and `json`
- `context.dto_class` defines class, instance of `Zinvapel\Basis\BasisBundle\Core\Dto\ServiceDtoInterface`, into which Request will be converted.
- `context.constraints_provider` defines callable, which returns Symfony constraints array for Request validation.
- `service` defines instance of `Zinvapel\Basis\BasisBundle\Core\ServiceInterface`. Presents route business logic, accepts the above `ServiceDtoInterface`, returns `Zinvapel\Basis\BasisBundle\Core\Dto\StatefulDtoInteface`.
- `responses.Some\Dto\Name` defines how convert `Some\Dto\Name`, instance of `Zinvapel\Basis\BasisBundle\Core\Dto\StatefulDtoInteface`, to Symfony Response.
- `responses.X.factory_type` defines response factory, can be:
    - `no_content`
    - `json`
    - `custom`
- `responses.X.status_code` defines status code.

Use env `ZINVAPEL_BASIS_HTTP_FLOW_DEBUG` for force display all HTTP exceptions

OpenApiAssertionBundle (deep beta)
----------------------------------

[](#openapiassertionbundle-deep-beta)

Generate assertions and classes from Swagger documentation. Provide one command:

```
$ php bin/console zinvapel:oa:parse-swagger  [--target  [--class ]]
Where:
 - path to yaml file with swagger spec
 - one of 'full', 'object', 'http'
 - for target 'object'. Generate just this class
```

Result examples:

- Class

```
ChatIdMessageMessageIdPatchDto0DtoErrorsItemDto:
final class ChatIdMessageMessageIdPatchDto0DtoErrorsItemDto
{
        /**
         * @Serializer\Groups({"body"})
         */
        private ?string $path;

        /**
         * @Serializer\Groups({"body"})
         */
        private ?string $error;

        public function setPath(?string $path = null): self
        {
                $this->path = path;

                return $this;
        }

        public function getPath(): ?string
        {
                return $this->path;
        }

        public function setError(?string $error = null): self
        {
                $this->error = error;

                return $this;
        }

        public function getError(): ?string
        {
                return $this->error;
        }

}
```

- Assertions

```
ChatWithStatDto1StatDto:
new Assert\Collection([
    'allowExtraFields' => true,
    'fields' => [
        'unreadCount' => [
            new Assert\Type([
                'type' => 'integer',
            ]),
            new Assert\GreaterThanOrEqual([
                'value' => 0,
            ]),
        ],
        'mentionsCount' => [
            new Assert\Type([
                'type' => 'integer',
            ]),
            new Assert\GreaterThanOrEqual([
                'value' => 0,
            ]),
        ],
    ],
])
```

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity55

Maturing project, gaining track record

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

Total

11

Last Release

1896d ago

PHP version history (2 changes)0.0.1PHP ^7.4

0.0.3PHP ^7.4 || ^8.0

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/13212142?v=4)[zinvapel](/maintainers/zinvapel)[@zinvapel](https://github.com/zinvapel)

---

Top Contributors

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

###  Code Quality

Static AnalysisPHPStan

Code StylePHP\_CodeSniffer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/zinvapel-symfony-basis-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/zinvapel-symfony-basis-bundle/health.svg)](https://phpackages.com/packages/zinvapel-symfony-basis-bundle)
```

PHPackages © 2026

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