Skip to content

Commit fd04918

Browse files
committed
make node is enum
1 parent 032b1a4 commit fd04918

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
@@ -16,6 +16,7 @@
1616
use Symfony\Component\Config\Definition\ConfigurationInterface;
1717
use Symfony\Component\Config\Definition\Exception\InvalidConfigurationException;
1818
use Monolog\Logger;
19+
use Monolog\Handler\SyslogUdpHandler;
1920

2021
/**
2122
* This class contains the configuration information for the bundle
@@ -162,7 +163,7 @@
162163
* - [level]: level name or int value, defaults to DEBUG
163164
* - [bubble]: bool, defaults to true
164165
* - [ident]: string, defaults to
165-
* - [rfc]: int 0 (RFC3164) or 1 (RFC5424), defaults to 1
166+
* - [rfc]: RFC3164 or RFC5424, defaults to RFC5424
166167
*
167168
* - swift_mailer:
168169
* - from_email: optional if email_prototype is given
@@ -495,7 +496,10 @@ public function getConfigTreeBuilder()
495496
->scalarNode('title')->defaultNull()->end() // pushover
496497
->scalarNode('host')->defaultNull()->end() // syslogudp & hipchat
497498
->scalarNode('port')->defaultValue(514)->end() // syslogudp
498-
->integerNode('rfc')->defaultValue(1)->end() // syslogudp
499+
->enumNode('rfc')
500+
->values([SyslogUdpHandler::RFC5424, SyslogUdpHandler::RFC3164])
501+
->defaultValue(SyslogUdpHandler::RFC5424)
502+
->end() // syslogudp
499503
->arrayNode('publisher')
500504
->canBeUnset()
501505
->beforeNormalization()

0 commit comments

Comments
 (0)