chameleon-system/symfony-customization-bundle
Offers customization for symfony framework settings.
Requires
- symfony/symfony: ^4.4
- symfony/monolog-bundle: ^3.5
Suggests
- symfony/symfony: The target bundle this bundle is created for.
README
This bundle is intended for symfony customization.
Currently, it supports the following features:
- DebugHandler log level customization
Installation
First, add the bundle to your packages:\
$>composer require chameleon-system/symfony-customization-bundle
After that, you need to load the bundle in your app kernel:\
new \ChameleonSystem\SymfonyCustomizationBundle\ChameleonSystemSymfonyCustomizationBundle()
Now you are set to go.
Features
DebugHandler log level customization
By default, the symfony (v4.4) debug handler will log everything (\E_ALL), including all the "annoying" DEPRECATED
entries like
[2023-11-30 14:41:23] php.INFO: Deprecated: strncmp(): Passing null to parameter #1 ($string1) of type string is deprecated ...
[2023-11-30 14:41:23] php.INFO: Deprecated: strlen(): Passing null to parameter #1 ($string) of type string is deprecated ...
With this bundle, this will change to ignore DEPRECATED php messages (\E_DEPRECATED, \E_USER_DEPRECATED) by default.
If you want to change this behaviour for your needs you can achieve this by creating a configuration setup (e.g.
in config.yml) by adding the following
chameleon_system_symfony_customization:
debug_handler_log_level: 8191
If no configuration is made, or you want to override it (for e.g. temporary situations), you may just add the setting to your parameters like
parameters:
chameleon_system_symfony_customization.debug_handler_log_level: 8191
The number value is a bit mask based on the error levels like (see php core):
- E_ERROR: 1
- E_DEPRECATED: 8192
- E_USER_DEPRECATED: 16384
- E_ALL: 32767
- ...