PHPackages                             ecphp/php-directive-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. ecphp/php-directive-bundle

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

ecphp/php-directive-bundle
==========================

Let users customize the PHP directives through a custom ini file.

1.0.1(4y ago)0881[1 PRs](https://github.com/ecphp/php-directive-bundle/pulls)BSD-3-ClausePHPPHP &gt;= 7.4

Since Jun 21Pushed 3y ago1 watchersCompare

[ Source](https://github.com/ecphp/php-directive-bundle)[ Packagist](https://packagist.org/packages/ecphp/php-directive-bundle)[ Docs](http://github.com/ecphp/php-directive-bundle)[ RSS](/packages/ecphp-php-directive-bundle/feed)WikiDiscussions master Synced 1w ago

READMEChangelog (2)Dependencies (16)Versions (4)Used By (0)

[![Latest Stable Version](https://camo.githubusercontent.com/0e1fb66a389ec553b98ab77a091e7fbc35387e3de06df895e71838afb91dc6ae/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f65637068702f7068702d6469726563746976652d62756e646c652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/ecphp/php-directive-bundle)[![GitHub stars](https://camo.githubusercontent.com/5d887e87396a6f1393c9c7bb3e5b466b078fd66c66c16d9afa9921541ec21816/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f73746172732f65637068702f7068702d6469726563746976652d62756e646c652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/ecphp/php-directive-bundle)[![Total Downloads](https://camo.githubusercontent.com/eb7bde54d763914b6febdfd2233eca8b682ddee97f1db9c8ff690168bede6886/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f65637068702f7068702d6469726563746976652d62756e646c652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/ecphp/php-directive-bundle)[![GitHub Workflow Status](https://camo.githubusercontent.com/0f98a8fdb8bb155146213a4bb45c99e9fefb7492e7681cbe518bba3030b2f19f/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f65637068702f7068702d6469726563746976652d62756e646c652f556e697425323074657374733f7374796c653d666c61742d737175617265)](https://github.com/ecphp/php-directive-bundle/actions)[![Scrutinizer code quality](https://camo.githubusercontent.com/405b9e6c4ed04c90bf9f09166077a9a7debbf2bcc0faf6776a36ed31012d3ad9/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f7175616c6974792f672f65637068702f7068702d6469726563746976652d62756e646c652f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/ecphp/php-directive-bundle/?branch=master)[![Type Coverage](https://camo.githubusercontent.com/a996b7b7dd2da6dce79f001534c3f6610158a71db6dc2600a075e74a7749caca/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f64796e616d69632f6a736f6e3f7374796c653d666c61742d73717561726526636f6c6f723d636f6c6f72266c6162656c3d54797065253230636f7665726167652671756572793d6d6573736167652675726c3d687474707325334125324625324673686570686572642e64657625324667697468756225324665637068702532467068702d6469726563746976652d62756e646c65253246636f766572616765)](https://shepherd.dev/github/ecphp/php-directive-bundle)[![Code Coverage](https://camo.githubusercontent.com/14e0e3a4e40d32bb6c3879d7f2efcf220a4d27a05c1c63dc2b838bee1cbe8bd1/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f636f7665726167652f672f65637068702f7068702d6469726563746976652d62756e646c652f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/ecphp/php-directive-bundle/?branch=master)[![License](https://camo.githubusercontent.com/ef595764ad47240200d5a4184d5ace9a642a92aeca487d44892066819fa6aca0/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f65637068702f7068702d6469726563746976652d62756e646c652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/ecphp/php-directive-bundle)

PHP Directive Bundle
====================

[](#php-directive-bundle)

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

[](#description)

This bundle for Symfony 5 let users alter and customize their PHP configuration through directives.

Usually the PHP configuration lives in a system wide `php.ini` file and most of the time regular users do not have the permissions to alter it.

This bundle fix this by providing an easy way to alter the PHP configuration through a `.ini` file, file that can then be committed in the project repository.

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

[](#installation)

`composer require ecphp/php-directive-bundle`

Usage
-----

[](#usage)

Create a new Symfony configuration file in `config/packages/php-directive-bundle.yaml` as such:

```
php_directive:
  user_ini_file: "%env(resolve:USER_INI_FILE)%"
```

Then add a new environment variable in the appropriate `.env` file of your choice:

```
USER_INI_FILE=php.user.ini
```

Then create a `php.user.ini` file in your project directory, containing some custom directives:

```
memory_limit=512M
max_execution_time=120
SMTP=smtp.example.com
date.timezone="Europe/Brussels"
xdebug.mode=debug
```

Documentation
-------------

[](#documentation)

Find all the available [PHP directives](https://www.php.net/manual/en/ini.list.php) on the official PHP website.

Code quality, tests, benchmarks
-------------------------------

[](#code-quality-tests-benchmarks)

Every time changes are introduced into the library, [Github](https://github.com/ecphp/php-directive-bundle/actions) runs the tests.

The library has tests written with [PHPSpec](http://www.phpspec.net/). Feel free to check them out in the `spec` directory. Run `composer phpspec` to trigger the tests.

Before each commit, some inspections are executed with [GrumPHP](https://github.com/phpro/grumphp); run `composer grumphp` to check manually.

The quality of the tests is tested with [Infection](https://github.com/infection/infection) a PHP Mutation testing framework, run `composer infection` to try it.

Static analyzers are also controlling the code. [PHPStan](https://github.com/phpstan/phpstan) and [PSalm](https://github.com/vimeo/psalm) are enabled to their maximum level.

Contributing
------------

[](#contributing)

Changelog
---------

[](#changelog)

See [CHANGELOG.md](https://github.com/ecphp/php-directive-bundle/blob/master/CHANGELOG.md) for a changelog based on [git commits](https://github.com/ecphp/php-directive-bundle/commits/master).

For more detailed changelogs, please check [the release changelogs](https://github.com/ecphp/php-directive-bundle/releases).

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 69.6% 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 ~13 days

Total

2

Last Release

1778d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/252042?v=4)[Pol Dellaiera](/maintainers/drupol)[@drupol](https://github.com/drupol)

---

Top Contributors

[![drupol](https://avatars.githubusercontent.com/u/252042?v=4)](https://github.com/drupol "drupol (39 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (16 commits)")[![babeuloula](https://avatars.githubusercontent.com/u/4849233?v=4)](https://github.com/babeuloula "babeuloula (1 commits)")

###  Code Quality

TestsBehat

### Embed Badge

![Health badge](/badges/ecphp-php-directive-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/ecphp-php-directive-bundle/health.svg)](https://phpackages.com/packages/ecphp-php-directive-bundle)
```

###  Alternatives

[winzou/state-machine-bundle

Bundle for the very lightweight yet powerful PHP state machine

34010.4M15](/packages/winzou-state-machine-bundle)[stfalcon/tinymce-bundle

This Bundle integrates TinyMCE WYSIWYG editor into a Symfony2 project.

2692.9M24](/packages/stfalcon-tinymce-bundle)[sylius/taxonomy-bundle

Flexible categorization system for Symfony.

26388.2k7](/packages/sylius-taxonomy-bundle)[symfony/ai-bundle

Integration bundle for Symfony AI components

30282.3k6](/packages/symfony-ai-bundle)[sylius/addressing-bundle

Addressing and zone management for Symfony applications.

33221.4k3](/packages/sylius-addressing-bundle)[sylius/inventory-bundle

Flexible inventory management for Symfony applications.

19176.7k4](/packages/sylius-inventory-bundle)

PHPackages © 2026

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