-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Better document SQL Server settings in config/database.php #9459
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Wanted to better document how to enable MultiSubnetFailover, this 'missing' option had caused some confusion on my side. And added the rest of the options just in case. |
Can we instead just give an example of how setting any configuration option you want using |
Please mark as ready for review when it's ready for me to take a look again. |
Removed all the (deprecated?) array documentation. Merely reference Microsoft documentation.
I've slashed the documentation as requested. Is the array syntax deprecated? 🤔 I did find a bug in \Illuminate\Support\ConfigurationUrlParser->getDatabase() /**
* Get the database name from the URL.
*
* @param array $url
* @return string|null
*/
protected function getDatabase($url)
{
$path = $url['path'] ?? null;
return $path && $path !== '/' ? substr($path, 1) : null;
} It receives an But This should be more appropriate: /**
* Get the database name from the URL.
*
* @param array $url
* @return string|null
*/
protected function getDatabase($url)
{
$path = $url['path'] ?? null;
$pairs = explode(';', $path);
$databaseName = null;
// Iterate over each pair
foreach ($pairs as $pair) {
// Split the pair into key and value
list($key, $value) = explode('=', $pair, 2); // Limit to 2 elements to ensure it splits only on the first '='
// Check if the key matches 'Database', case-insensitively
if (strcasecmp($key, 'Database') === 0) {
$databaseName = $value;
break; // Stop the loop once we've found the database name
}
}
return $databaseName;
} I'll submit patches on laravel/framework. |
Until something is fixed in the handling of DATABASE_URL (for |
Hi there. We'd released v11 now. Please re-send this to 11.x if you still want to get this in. Thanks. |
No description provided.