PHPackages                             evyex/symfony-extender - 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. [Framework](/categories/framework)
4. /
5. evyex/symfony-extender

ActiveSymfony-bundle[Framework](/categories/framework)

evyex/symfony-extender
======================

Symfony bundle to must have features

8.1.0(1w ago)075MITPHPPHP ^8.4CI passing

Since Jan 16Pushed 2mo ago1 watchersCompare

[ Source](https://github.com/evyex/symfony-extender)[ Packagist](https://packagist.org/packages/evyex/symfony-extender)[ RSS](/packages/evyex-symfony-extender/feed)WikiDiscussions symfony-7.4 Synced today

READMEChangelog (10)Dependencies (55)Versions (54)Used By (0)

Symfony Extender Bundle
=======================

[](#symfony-extender-bundle)

A Symfony bundle that provides commonly used features and utilities to enhance your development workflow.

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

[](#installation)

Install the bundle using Composer:

```
composer require evyex/symfony-extender
```

The bundle should be automatically registered by Symfony Flex. If not, add it to your `config/bundles.php`:

```
return [
    // ...
    Evyex\SymfonyExtender\SymfonyExtenderBundle::class => ['all' => true],
];
```

Configuration
-------------

[](#configuration)

You can configure the bundle in `config/packages/symfony_extender.yaml`:

```
symfony_extender:
    entity_collection:
        default_limit: 20      # Default paginator limit when no explicit limit is provided (min: 1)
    is_granted_listener:
        enabled: true          # Set to false to disable grant execution after Map** resolving
    phone_number:
        clean_string: true     # Strip spaces, hyphens, and parentheses before validation
        pattern: '/^\+?[1-9][0-9]{9,14}$/'  # Regex used to validate the phone number
```

Features
--------

[](#features)

### 1. Phone Number Validator

[](#1-phone-number-validator)

A simple validator for international phone numbers. It allows digits, spaces, hyphens, and parentheses, but ensures the underlying value follows a valid international format (e.g., `+1234567890`).

**Usage:**

```
use Evyex\SymfonyExtender\Validator\PhoneNumber;

class UserDTO
{
    #[PhoneNumber(message: 'Please provide a valid phone number.')]
    public string $phone;
}
```

The default regex accepts international numbers with an optional `+` prefix, 10–15 digits total, and allows formatting characters (spaces, hyphens, parentheses) that are stripped before matching. All defaults can be changed globally via bundle configuration or per-field via the attribute:

```
// Override pattern for this field only, keeping global clean_string setting
#[PhoneNumber(pattern: '/^\+380[0-9]{9}$/')]
public string $ukrainianPhone;
```

### 2. MapEntityCollection Value Resolver

[](#2-mapentitycollection-value-resolver)

Automatically resolves a collection of entities from request query parameters. This is highly useful for list endpoints with filtering, ordering, and pagination support.

Detailed documentation: [`MapEntityCollection.md`](src/ValueResolver/MapEntityCollection/MapEntityCollection.md).

**Usage in Controller:**

```
use Evyex\SymfonyExtender\ValueResolver\MapEntityCollection\MapEntityCollection;
use App\Entity\Product;
use Doctrine\ORM\Tools\Pagination\Paginator;

#[Route('/products', methods: ['GET'])]
public function list(
    #[MapEntityCollection(
        class: Product::class,
        defaultOrdering: ['createdAt' => MapEntityCollection::ORDERING_DESC],
        fetchAssociation: ['category', 'images'],
    )]
    Paginator $products
): Response {
    // ...
}
```

`fetchAssociation` explicitly loads and hydrates related entities or collections in the same query. Each value may be either an association property of the root entity, such as `category`, or an alias of a join previously added by a custom Doctrine filter.

### 3. IsGranted Attribute Decorator

[](#3-isgranted-attribute-decorator)

Decorates the default Symfony `controller.is_granted_attribute_listener` to ensure it runs at the correct priority when used with other argument resolvers.

This works transparently in the background, ensuring that `#[IsGranted]` attributes on controller arguments are handled correctly before the value resolvers are called.

Can be disabled via configuration if the decorator conflicts with your setup (see [Configuration](#configuration)).

Quality Assurance
-----------------

[](#quality-assurance)

The project maintains high code quality standards:

- **Static Analysis**: PHPStan
- **Coding Style**: PHP-CS-Fixer
- **Testing**: PHPUnit

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE) for more information.

###  Health Score

45

—

FairBetter than 91% of packages

Maintenance86

Actively maintained with recent releases

Popularity10

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity65

Established project with proven stability

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

Recently: every ~14 days

Total

35

Last Release

10d ago

Major Versions

7.4.2 → 8.0.22026-04-21

6.4.3 → 7.4.32026-04-27

7.4.3 → 8.0.32026-04-27

6.4.4 → 7.4.42026-06-22

7.4.4 → 8.0.42026-06-22

PHP version history (3 changes)0.1PHP ^8.1

7.4.0PHP ^8.2

8.0.0PHP ^8.4

### Community

Maintainers

![](https://www.gravatar.com/avatar/3cf6f7b34ef681a5e160feb9bb2eeb0050d0515b38e7c6f4bde489f3d87f86fd?d=identicon)[EvgenijVy](/maintainers/EvgenijVy)

---

Top Contributors

[![evgenij-vy](https://avatars.githubusercontent.com/u/120460020?v=4)](https://github.com/evgenij-vy "evgenij-vy (98 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/evyex-symfony-extender/health.svg)

```
[![Health](https://phpackages.com/badges/evyex-symfony-extender/health.svg)](https://phpackages.com/packages/evyex-symfony-extender)
```

###  Alternatives

[open-dxp/opendxp

Content &amp; Product Management Framework (CMS/PIM)

9421.6k61](/packages/open-dxp-opendxp)[chameleon-system/chameleon-base

The Chameleon System core.

1028.6k5](/packages/chameleon-system-chameleon-base)[pimcore/pimcore

Content &amp; Product Management Framework (CMS/PIM/E-Commerce)

3.8k3.8M508](/packages/pimcore-pimcore)[prestashop/prestashop

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

9.1k17.8k](/packages/prestashop-prestashop)[oro/platform

Business Application Platform (BAP)

645143.5k115](/packages/oro-platform)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

585.6M574](/packages/shopware-core)

PHPackages © 2026

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