@@ -424,6 +424,7 @@ class Configuration implements ConfigurationInterface
424424 'logentries ' => ['token ' , 'use_ssl ' , 'level ' , 'bubble ' , 'timeout ' , 'connection_timeout ' ],
425425 'insightops ' => ['token ' , 'region ' , 'use_ssl ' , 'level ' , 'bubble ' ],
426426 'flowdock ' => ['token ' , 'source ' , 'from_email ' , 'level ' , 'bubble ' ],
427+ 'rollbar ' => ['id ' , 'token ' , 'config ' , 'level ' , 'bubble ' ],
427428 'server_log ' => ['host ' , 'level ' , 'bubble ' ],
428429 ];
429430
@@ -1069,15 +1070,19 @@ private function handlerTypeAcceptedOptionsValidation(array $v)
10691070 return $ v ;
10701071 }
10711072
1072- if (!array_key_exists (strtolower ($ v ['type ' ]), $ this ->acceptedParamsByHandlerType )) {
1073+ // @todo add again, eventually, if we want to raise exception on next if statement
1074+ // if (in_array($v['type'], ['config', 'id', 'service'])) {
1075+ // return $v;
1076+ // }
1077+
1078+ if (!array_key_exists ($ v ['type ' ], $ this ->acceptedParamsByHandlerType )) {
10731079 return $ v ;
10741080 }
10751081
1076- // @todo array_keys should be converted to lowercase?
10771082 $ acceptableParamsForHandlers = array_intersect ($ this ->provideAllConfigurationParams (), array_keys ($ v ));
10781083 $ unacceptableParamForHandler = array_diff (
10791084 $ acceptableParamsForHandlers ,
1080- $ this ->acceptedParamsByHandlerType [strtolower ( $ v ['type ' ]) ]
1085+ $ this ->acceptedParamsByHandlerType [$ v ['type ' ]]
10811086 );
10821087 if (!empty ($ unacceptableParamForHandler )) {
10831088 throw new InvalidConfigurationException (sprintf (
@@ -1093,88 +1098,6 @@ private function handlerTypeAcceptedOptionsValidation(array $v)
10931098
10941099 private function provideAllConfigurationParams ()
10951100 {
1096- return [
1097- 'accepted_levels ' ,
1098- 'action_level ' ,
1099- 'activation_strategy ' ,
1100- 'api_version ' ,
1101- 'app_name ' ,
1102- 'auto_log_stacks ' ,
1103- 'bubble ' ,
1104- 'bot_name ' ,
1105- 'buffer_size ' ,
1106- 'channel ' ,
1107- 'client_id ' ,
1108- 'config ' ,
1109- 'connection_string ' ,
1110- 'connection_timeout ' ,
1111- 'console_formater_options ' ,
1112- 'content_type ' ,
1113- 'date_format ' ,
1114- 'deduplication_level ' ,
1115- 'document_type ' ,
1116- 'dsn ' ,
1117- 'elasticsearch ' ,
1118- 'email_prototype ' ,
1119- 'environment ' ,
1120- 'exchange ' ,
1121- 'exchange_name ' ,
1122- 'excluded_404s ' ,
1123- 'excluded_http_codes ' ,
1124- 'facility ' ,
1125- 'filename_format ' ,
1126- 'file_permission ' ,
1127- 'flush_on_overflow ' ,
1128- 'from_email ' ,
1129- 'handler ' ,
1130- 'headers ' ,
1131- 'host ' ,
1132- 'icon_emoji ' ,
1133- 'id ' ,
1134- 'ident ' ,
1135- 'include_extra ' ,
1136- 'index ' ,
1137- 'lazy ' ,
1138- 'level ' ,
1139- 'logopts ' ,
1140- 'mailer ' ,
1141- 'max_files ' ,
1142- 'max_level ' ,
1143- 'message_format ' ,
1144- 'message_type ' ,
1145- 'min_level ' ,
1146- 'members ' ,
1147- 'mongo ' ,
1148- 'nickname ' ,
1149- 'notify ' ,
1150- 'path ' ,
1151- 'passthru_level ' ,
1152- 'persistent ' ,
1153- 'port ' ,
1154- 'publisher ' ,
1155- 'redis ' ,
1156- 'release ' ,
1157- 'region ' ,
1158- 'room ' ,
1159- 'source ' ,
1160- 'stop_buffering ' ,
1161- 'store ' ,
1162- 'subject ' ,
1163- 'tags ' ,
1164- 'team ' ,
1165- 'time ' ,
1166- 'timeout ' ,
1167- 'title ' ,
1168- 'token ' ,
1169- 'to_email ' ,
1170- 'url ' ,
1171- 'user ' ,
1172- 'use_attachment ' ,
1173- 'use_locking ' ,
1174- 'use_short_attachment ' ,
1175- 'use_ssl ' ,
1176- 'verbosity_levels ' ,
1177- 'webhook_url ' ,
1178- ];
1101+ return array_unique (call_user_func_array ('array_merge ' , $ this ->acceptedParamsByHandlerType ));
11791102 }
11801103}
0 commit comments