Skip to content

Releases: carsdotcom/php-request-class

v1.6.0: Merge pull request #22 from carsdotcom/use-stale

20 May 14:11
1cb4e8f
Compare
Choose a tag to compare

Adds support for Use-Stale-While-Revalidating pattern!

This request class type has two cache timeouts:

  1. a short one indicates when it's time to start a background process to re-download the data.
  2. a long one holds on to a known good result for a maximum hold time (including "forever")

When a request happens after the refreshCacheKey expires, we return the responseFromCache and defer a job to run this request that will not read from cache but will write to cache. This way, all callers are served in the much faster cached response time, but results are still routinely updated behind the scenes.

v1.5.0

08 May 17:41
c3f7ddf
Compare
Choose a tag to compare

Laravel 12 support!

v1.4.1

28 Feb 19:28
88794ef
Compare
Choose a tag to compare

Fixes #19, cache entries now contain the full log folder of log files, in case the next cache hit would have used a different folder.

v1.4.0

10 Dec 19:39
02fd826
Compare
Choose a tag to compare

What's Changed

This release updates the ParseResponseJSONSchemaOrThrow trait to better reflect schema validation for empty objects to avoid {} vs [] confusion using the new validateEncodedStringOrThrow method provided by Carsdotcom\JsonSchemaValidation. This release also drops support for older versions of that library.

Full Changelog: v1.3.0...v1.4.0

v1.3.0

30 Oct 21:35
a085746
Compare
Choose a tag to compare

This release introduces a new feature where children of AbstractRequest can customize their own LogFile helper by overriding getLogFileHelper. This is especially useful for logging headers -- most of the time we think it's a bad idea, headers are for boring things like Content-Type and unloggable things like Authentication and bearer tokens -- but sometimes a request is using custom headers for tracing or even application logic that are exceptions to the rule.

v1.2.1

20 Aug 19:13
926581a
Compare
Choose a tag to compare

The cache key seed shouldn't be configurable. This caused a deployment issue for us when the default seed changed (because the cached data structure changed incompatibly) and our configured value didn't. This looked fine in unit tests and local development where the cache is mostly cold, but caused a short outage in production where the cache was warm and the keys didn't update with a new seed.

v1.2.0

19 Aug 14:15
066cd42
Compare
Choose a tag to compare

This release separates the method that get a Guzzle Client, which would allow one request class to use a different Guzzle Client than the main dependency injector. This is especially useful if you have a one Request that needs to use mocked responses even in production, while the requests around it are making real HTTP calls.

This also deprecated the private method MocksGuzzleInstance::mockGuzzleAppInstanceWithHandler and added a new public GuzzleTapper::makeMockedGuzzleClient since it's now practical to make a one-off Guzzle client inside a request's getGuzzleClient

v1.1.1

07 Aug 14:25
827b0ce
Compare
Choose a tag to compare

What's Changed

  • feat: On cache hit, the request class has access to the log file when the cache was written by @jwadhams in #11

Full Changelog: v1.1.0...v1.1.1

v1.1.0

12 Jul 19:26
c7488fd
Compare
Choose a tag to compare

Formal support for Laravel 10 and 11, including a matrix test runner for PRs.

v1.0.5

26 Jun 15:17
79c4517
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v1.0.4...v1.0.5