Update Composer packages
This commit is contained in:
parent
9252d9ce90
commit
134266af8a
176 changed files with 7930 additions and 2262 deletions
|
@ -377,8 +377,8 @@ class Environment
|
|||
$data['https'] = $this->detectHttpsProtocol($fields['proto']);
|
||||
}
|
||||
|
||||
if ($data['port'] === null && $data['https'] === true) {
|
||||
$data['port'] = 443;
|
||||
if ($data['https'] === true) {
|
||||
$data['port'] ??= 443;
|
||||
}
|
||||
|
||||
$data['for'] = $parts['for'] ?? null;
|
||||
|
@ -772,18 +772,28 @@ class Environment
|
|||
|
||||
/**
|
||||
* Loads and returns options from environment-specific
|
||||
* PHP files (by host name and server IP address)
|
||||
* PHP files (by host name and server IP address or CLI)
|
||||
*
|
||||
* @param string $root Root directory to load configs from
|
||||
*/
|
||||
public function options(string $root): array
|
||||
{
|
||||
$configCli = [];
|
||||
$configHost = [];
|
||||
$configAddr = [];
|
||||
|
||||
$host = $this->host();
|
||||
$addr = $this->ip();
|
||||
|
||||
// load the config for the cli
|
||||
if ($this->cli() === true) {
|
||||
$configCli = F::load(
|
||||
file: $root . '/config.cli.php',
|
||||
fallback: [],
|
||||
allowOutput: false
|
||||
);
|
||||
}
|
||||
|
||||
// load the config for the host
|
||||
if (empty($host) === false) {
|
||||
$configHost = F::load(
|
||||
|
@ -802,7 +812,7 @@ class Environment
|
|||
);
|
||||
}
|
||||
|
||||
return array_replace_recursive($configHost, $configAddr);
|
||||
return array_replace_recursive($configCli, $configHost, $configAddr);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue