Use config array instead of object for Email and Secret trait features - #5656
Use config array instead of object for Email and Secret trait features#5656rtloftus wants to merge 3 commits into
Conversation
demiankatz
left a comment
There was a problem hiding this comment.
Thanks, @rtloftus! When changing traits, don't forget to check all the references to those traits. Both of these still have a few calls that need updating -- see details below.
| * @return string | ||
| */ | ||
| protected function getEmailSenderAddress(array|Config $config, ?string $userEmail = null): string | ||
| protected function getEmailSenderAddress(array $config, ?string $userEmail = null): string |
There was a problem hiding this comment.
There are calls to this method in \VuFind\Log\LoggerFactory::addMailHandler and \VuFindConsole\Command\ScheduledSearch\NotifyCommand that still pass a Config object. We'll need to update them before we can change the signature of this method.
| * @return string|null | ||
| */ | ||
| protected function getSecretFromConfig(Config|array|null $config, string $key): ?string | ||
| protected function getSecretFromConfig(array|null $config, string $key): ?string |
There was a problem hiding this comment.
This is still being called with an object in \VuFind\Search\Factory\BrowZineBackendFactory and \VuFindSearch\Backend\EDS\Backend. Those calls will need to be updated to pass the right format -- this is the reason tests are failing.
relies on eds backend test which is in PR #5654 as of right now. Waiting for blender to be merged