Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does not work without Doctrine #32

Closed
shadowhand opened this issue Sep 15, 2015 · 4 comments
Closed

Does not work without Doctrine #32

shadowhand opened this issue Sep 15, 2015 · 4 comments
Assignees

Comments

@shadowhand
Copy link

The simple example provided in the README:

$stack->push(new CacheMiddleware(), 'cache');

does not work without Doctrine installed:

Fatal error: Class undefined: Doctrine\Common\Cache\ArrayCache in vendor/kevinrob/guzzle-cache-middleware/src/Strategy/PrivateCacheStrategy.php on line 61

Suggesting doctrine/cache seems misleading if the package doesn't work without it.

@Kevinrob
Copy link
Owner

You're right. This is not optimal.

By default (without parameter) the constructor of CacheMiddleware use a PrivateCacheStrategy with new DoctrineCacheWrapper(new ArrayCache()).

I will change that,

@Kevinrob Kevinrob self-assigned this Sep 16, 2015
@shadowhand
Copy link
Author

It would be nice if the Doctrine remained optional and the default created a temporary file for storage. Or if a Flysystem adapter was included.

@Kevinrob
Copy link
Owner

I didn't know Flysystem. I will take a look!

@Kevinrob
Copy link
Owner

@shadowhand: With the version 0.6.2 the simple example:

$stack->push(new CacheMiddleware(), 'cache');

work without doctrine/cache.

Thanks for reporting this issue!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants