Load the config only when needed in the method

Created on 16 May 2024, 6 months ago
Updated 17 May 2024, 6 months ago

Problem/Motivation

In acquia_dam.authentication_service, instead of loading & initiating the config in constructor, load it in method only when needed.

The problem is, when service is already initialized somewhere & configs are saved programatically after that. If the configuration form is built with form_builder service, it gives error InvalidArgumentException: The URI '' is invalid. You must use a valid URI scheme because it uses pre-loaded service with no configs. In this case, the condition in form validates but call from auth service, doesn't.

This happened while writing a test case for specific use case.

Proposed resolution

Instead of initiating settings in constructor, we should only load it when needed in method of acquia_dam.authentication_service.

📌 Task
Status

Active

Version

1.1

Component

Code

Created by

🇮🇳India tanmayk Maharashtra

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024