I am working with a Drupal 8 setup when production, test and development environments which periodically sync database. In Drupal 7 it was easy to override the $conf variables in
settings.php to force a site in maintenance mode. However, in Drupal 8, the maintenance_mode is not a configuration anymore, but a state that is not possible to override from settings.php, so we have to use additional
drush command after each sync to put one of the environments to maintenance mode.
And I am confused how come State API documentation asserts it's environment-specific, when in fact, it gets synced together with database and it is not easy to keep environment-specific settings using State API.
On the contrary, $config is easy to override in
settings.php (which is excluded during sync), so it does provide easy way of setting environment-specific configurations.