liip / LiipMonitorBundle

Integrates the LiipMonitor library into Symfony
http://liip.ch
467 stars 103 forks source link

null default values are invalid for many settings expecting integers, e.g. ttl #302

Open tacman opened 5 months ago

tacman commented 5 months ago

Absent a recipe with default values, at a minimum the bundle should be able to create a valid config file, even if everything is disabled by default.

After installation for version 3 and changing the class name in bundles.php, run

bin/console config:dump-reference liip_monitor > config/packages/monitor.yaml 
bin/console cache:clear

It seems like the configuration should contain reasonable values for ttl, warning_duration, etc.

kbond commented 4 months ago

Hmm, the null value means "don't use this feature"

bin/console config:dump-reference liip_monitor > config/packages/monitor.yaml

I don't think you should configure bundles this way. Just add the config you require. That being said, I'll look into why using null causes an error - can you show the exception you see?

tacman commented 4 weeks ago

This is less pressing now that there's a recipe, but still I don't think that command should generate an invalid configuration.

In IntegerNode.php line 26:

Invalid type for path "liip_monitor.checks.groups.name.messenger_transports.name.critical_threshold". Expected "int", but got "null".