You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So setApiVersion() has no effect on outgoing requests — they always hit /v1/. The $this->apiVersion property is assigned by setApiVersion() (and the vatly-laravelVatlyConfig wires config('vatly.api_version') into it via Vatly::__construct), but it's never read when constructing the URL.
Harmless today since the only version is v1, but it's a latent bug: any future VATLY_API_VERSION override silently doesn't apply.
Bug
VatlyApiClient::performHttpCall()builds the request URL from the class constant, not the configurable property:So
setApiVersion()has no effect on outgoing requests — they always hit/v1/. The$this->apiVersionproperty is assigned bysetApiVersion()(and thevatly-laravelVatlyConfigwiresconfig('vatly.api_version')into it viaVatly::__construct), but it's never read when constructing the URL.Harmless today since the only version is
v1, but it's a latent bug: any futureVATLY_API_VERSIONoverride silently doesn't apply.Suggested fix
(
performHttpCallToFullUrl()already accepts a full URL, so onlyperformHttpCall()needs the change.)Observed in
vatly/vatly-api-phpv0.1.0-alpha.21 while wiring a Laravel app against the staging API.