PHPackages                             proklung/custom-request-responser-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. proklung/custom-request-responser-bundle

ActiveSymfony-bundle

proklung/custom-request-responser-bundle
========================================

Request response tools for custom Symfony

1.0.3(5y ago)13MITPHPPHP &gt;=7.3

Since May 12Pushed 5y ago1 watchersCompare

[ Source](https://github.com/ProklUng/custom.request.responser.bundle)[ Packagist](https://packagist.org/packages/proklung/custom-request-responser-bundle)[ RSS](/packages/proklung-custom-request-responser-bundle/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (4)Dependencies (7)Versions (5)Used By (0)

Инструментарий для работы с request-response в кастомных вариантах Symfony
==========================================================================

[](#инструментарий-для-работы-с-request-response-в-кастомных-вариантах-symfony)

***INTERNAL***

Установка
---------

[](#установка)

composer.json:

```
    "repositories": [
        {
            "type": "git",
            "url": "https://github.com/proklung/custom.request.responser.bundle"
        }
    ]
```

```
composer require proklung/custom-request-responser-bundle
```

Пример конфигурации
-------------------

[](#пример-конфигурации)

По адресу `local/packages/custom_request_responser.yaml` (или `/config/packages/custom_request_responser.yaml` для Wordpress).

```
custom_request_responser:
  defaults:
    enabled: true

  # True - middleware запрещено, false - нет.
  # По умолчанию false.
  middlewares_disabled:
    custom_request_responser.middleware.inline_css: true
    custom_request_responser.middleware.dns_prefetch: true
    custom_request_responser.middleware.remove_comments: true
    custom_request_responser.middleware.collapse_whitespace: true
    custom_request_responser.middleware.remove_quotes: true
    custom_request_responser.middleware.elide_attributes: true

  # Middleware, запускаемые на контент Битрикса.
  # True - middleware запрещено, false - нет.
  # По умолчанию false.
  bitrix_middlewares_disabled:
    custom_request_responser.middleware.inline_css: false
    custom_request_responser.middleware.dns_prefetch: false
    custom_request_responser.middleware.remove_comments: false
    custom_request_responser.middleware.collapse_whitespace: false
    custom_request_responser.middleware.remove_quotes: false
    custom_request_responser.middleware.elide_attributes: false

  headers:
    # Apply a CSP on all the responses
    - Content-Security-Policy: default-src 'self'

    - name: Cache-Control
      value: max-age=31536000, public
      condition: response.headers.get('Content-Type') matches '/^html/'
```

Комплект
--------

[](#комплект)

### Обработчики kernel.response

[](#обработчики-kernelresponse)

- `custom_request_responser.logger_response` - логгирование Request &amp; Response
- `custom_request_responser.robots` - управление индексацией роута
- `custom_request_responser.compress_response` - минификация Response для типа txt/html
- `custom_request_responser.set.headers`

### Response middlewares

[](#response-middlewares)

- `custom_request_responser.middleware.dns_prefetch` - injects tags in the HEAD to enable the browser to do DNS prefetching
- `custom_request_responser.middleware.remove_comments` - eliminates HTML, JS and CSS comments
- `custom_request_responser.middleware.collapse_whitespace` - reduces bytes transmitted in an HTML file by removing unnecessary whitespace
- `custom_request_responser.middleware.remove_quotes` - eliminates unnecessary quotation marks from HTML attributes
- `custom_request_responser.middleware.elide_attributes` - removing attributes from tags when the specified value is equal to the default value
- `custom_request_responser.middleware.inline_css` - transforms the inline "style" attribute of tags into classes by moving the CSS to the header

Помечаются тэгом `response.middleware` и должны наследоваться от `AbstractPageSpeed`.

### Пример кастомного обработчика - нужно ли индексировать роут или нет

[](#пример-кастомного-обработчика---нужно-ли-индексировать-роут-или-нет)

```
use Prokl\CustomRequestResponserBundle\Services\Contracts\IndexRouteManagerInterface;
use Symfony\Component\HttpFoundation\Request;

class AdminRouteProcessor implements IndexRouteManagerInterface
{
    /**
     * @inheritDoc
     */
    public function shouldIndex(Request $request): bool
    {
        $url = $request->getPathInfo();

        // Не индексировать страницы, в url которых встречается /api/.
        if (stripos($url, '/api/') !== false) {
            return false;
        }

        return true;
    }
}
```

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity50

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

Total

4

Last Release

1831d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/9210c86ee6734e537eaf22c0f2fe7a965451e340e39e1aae2b74013f24c2660d?d=identicon)[gedovan](/maintainers/gedovan)

---

Top Contributors

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

---

Tags

bitrix-symfonyphp7symfony-bundlewordpress-symfony

### Embed Badge

![Health badge](/badges/proklung-custom-request-responser-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/proklung-custom-request-responser-bundle/health.svg)](https://phpackages.com/packages/proklung-custom-request-responser-bundle)
```

###  Alternatives

[sylius/sylius

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

8.4k5.6M651](/packages/sylius-sylius)[symfony/security-bundle

Provides a tight integration of the Security component into the Symfony full-stack framework

2.5k172.9M1.8k](/packages/symfony-security-bundle)[sulu/sulu

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

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

A PHP implementation of a SAML 2.0 service provider and identity provider.

1.1k12.4M193](/packages/simplesamlphp-simplesamlphp)[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)[contao/core-bundle

Contao Open Source CMS

1231.6M2.4k](/packages/contao-core-bundle)

PHPackages © 2026

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