Skip to content

Error: Class 'Kevinrob\GuzzleCache\CacheMiddleware' not found #65

Closed
@bradynpoulsen

Description

@bradynpoulsen

Reproduction Steps

  1. Install via Composer
$ composer require launchdarkly/launchdarkly-php
  1. Construct an instance of the LDClient
$client = new LaunchDarkly\LDClient('sdk-...');

Expected Outcome

LaunchDarkly\GuzzleFeatureRequester will try to utilize the Kevinrob\GuzzleCache\CacheMiddleware class if the class is available

Actual Outcome

Error: Class 'Kevinrob\GuzzleCache\CacheMiddleware' not found

Proposed Resolution

Allow for utilization of the GuzzleFeatureRequester without requiring a 3rd party caching handler in scenarios that Kevinrob\GuzzleCache\CacheMiddleware is not suitable (ie, single run containers that discard their filesystem and memory after use)

  1. Modify LaunchDarkly\GuzzleFeatureRequester to utilize Kevinrob\GuzzleCache\CacheMiddleware if it is available via class_exists
  2. Add a message to the kevinrob/guzzle-cache-middleware composer.json suggestion describing its role in the library

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions