Skip to content

Commit 870a90a

Browse files
committed
make node is enum
1 parent baddd42 commit 870a90a

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

DependencyInjection/Configuration.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
use Symfony\Component\Config\Definition\ConfigurationInterface;
1616
use Symfony\Component\Config\Definition\Exception\InvalidConfigurationException;
1717
use Monolog\Logger;
18+
use Monolog\Handler\SyslogUdpHandler;
1819

1920
/**
2021
* This class contains the configuration information for the bundle
@@ -157,7 +158,7 @@
157158
* - [level]: level name or int value, defaults to DEBUG
158159
* - [bubble]: bool, defaults to true
159160
* - [ident]: string, defaults to
160-
* - [rfc]: int 0 (RFC3164) or 1 (RFC5424), defaults to 1
161+
* - [rfc]: RFC3164 or RFC5424, defaults to RFC5424
161162
*
162163
* - swift_mailer:
163164
* - from_email: optional if email_prototype is given
@@ -487,7 +488,10 @@ public function getConfigTreeBuilder()
487488
->scalarNode('title')->defaultNull()->end() // pushover
488489
->scalarNode('host')->defaultNull()->end() // syslogudp & hipchat
489490
->scalarNode('port')->defaultValue(514)->end() // syslogudp
490-
->integerNode('rfc')->defaultValue(1)->end() // syslogudp
491+
->enumNode('rfc')
492+
->values([SyslogUdpHandler::RFC5424, SyslogUdpHandler::RFC3164])
493+
->defaultValue(SyslogUdpHandler::RFC5424)
494+
->end() // syslogudp
491495
->arrayNode('publisher')
492496
->canBeUnset()
493497
->beforeNormalization()

0 commit comments

Comments
 (0)