I'm trying to automate a site deployment/environment generation using profile installation, but I need to change the
trusted_host_patterns key in the
$settings variable of settings.php.
From what I've read in the API docs, the
Settings class is read-only, which means I can't use the profile install hook to change it.
Has anyone experienced or tried to do this? What strategy did you use?
If I wanted to run a PHP script from the command line to do this, what would be the best way?
I'm new to Drupal, but any thoughts and comments are welcome!