From dc331bfd9b2c12b52c132cb52ee562c7f7b53cba Mon Sep 17 00:00:00 2001 From: lukinovec Date: Mon, 29 Jun 2026 15:37:14 +0200 Subject: [PATCH] Use `data_get()` instead of `getAttribute()` in `overrideChannelConfig` The bootstrapper should be able to map nested tenant attributes to config, and `getAttribute()` doesn't support dot notation, so e.g. `$tenant->getAttribute('logging.slackUrl')` would return `null` instead of the actual attribute, so the test failed. `data_get()` supports dot notation, so we'll use that. --- src/Bootstrappers/LogTenancyBootstrapper.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Bootstrappers/LogTenancyBootstrapper.php b/src/Bootstrappers/LogTenancyBootstrapper.php index 4cf8429b..5e14f829 100644 --- a/src/Bootstrappers/LogTenancyBootstrapper.php +++ b/src/Bootstrappers/LogTenancyBootstrapper.php @@ -171,7 +171,7 @@ class LogTenancyBootstrapper implements TenancyBootstrapper // the override is ignored and the channel config key's value remains unchanged. foreach ($override as $configKey => $tenantAttributeName) { /** @var Tenant&Model $tenant */ - $tenantAttribute = $tenant->getAttribute($tenantAttributeName); + $tenantAttribute = data_get($tenant, $tenantAttributeName); if ($tenantAttribute !== null) { $this->config->set("logging.channels.{$channel}.{$configKey}", $tenantAttribute);