File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -158,14 +158,18 @@ public static function createWithHttpClient(
158158 ClientInterface $ httpClient ,
159159 RequestFactoryInterface $ requestFactory ,
160160 StreamFactoryInterface $ streamFactory ,
161- string $ baseUrl ,
162- #[\SensitiveParameter]
163- string $ secret ,
161+ UrlBuilder $ urlBuilder ,
164162 ): static {
165163 // Extending classes need to override this method, if they change the
166164 // constructor signature.
167165 // @phpstan-ignore new.static
168- $ instance = new static ($ baseUrl , $ secret );
166+ $ instance = new static (
167+ // The current version of the constructor does not support injecting
168+ // A UrlBuilder instance. As a stop-gap, extract the relevant values
169+ // so that a new instance will be created in the constructor.
170+ $ urlBuilder ->getBaseUrl (),
171+ $ urlBuilder ->getSecret (),
172+ );
169173 $ instance ->httpClient = $ httpClient ;
170174 $ instance ->requestFactory = $ requestFactory ;
171175 $ instance ->streamFactory = $ streamFactory ;
Original file line number Diff line number Diff line change @@ -68,6 +68,19 @@ public function setSecret(
6868 return $ this ;
6969 }
7070
71+ /**
72+ * Gets the secret.
73+ *
74+ * This method only exists to support a deprecated property in the
75+ * BigBlueButton class.
76+ *
77+ * @internal
78+ */
79+ public function getSecret (): string
80+ {
81+ return $ this ->secret ;
82+ }
83+
7184 public function setBaseUrl (string $ baseUrl ): self
7285 {
7386 // add tailing dir-separator if missing
@@ -80,6 +93,19 @@ public function setBaseUrl(string $baseUrl): self
8093 return $ this ;
8194 }
8295
96+ /**
97+ * Gets the base url.
98+ *
99+ * This method only exists to support a deprecated property in the
100+ * BigBlueButton class.
101+ *
102+ * @internal
103+ */
104+ public function getBaseUrl (): string
105+ {
106+ return $ this ->baseUrl ;
107+ }
108+
83109 public function setHashingAlgorithm (HashingAlgorithm $ hashingAlgorithm ): self
84110 {
85111 $ this ->hashingAlgorithm = $ hashingAlgorithm ;
You can’t perform that action at this time.
0 commit comments