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

[BUG] Error Class "Doctrine\Common\Cache\ArrayCache" not found #493

Open
aftabnaveed opened this issue May 28, 2021 · 8 comments
Open

[BUG] Error Class "Doctrine\Common\Cache\ArrayCache" not found #493

aftabnaveed opened this issue May 28, 2021 · 8 comments

Comments

@aftabnaveed
Copy link

aftabnaveed commented May 28, 2021

1.7, 8.45

I configured a brand new Laravel application and installed the latest version of Laravel Doctrine when trying to navigate to a page or execute an artisan command I get that error. Do you know why would this be happening?

@aftabnaveed aftabnaveed changed the title Error Class "Doctrine\Common\Cache\ArrayCache" not found [BUG] Error Class "Doctrine\Common\Cache\ArrayCache" not found May 28, 2021
@aftabnaveed
Copy link
Author

Looks like ArrayCache is deprecated in doctrine/cache:2.0
doctrine/cache#355

Would it be safe to remove it from Laravel Doctrine ?

@eigan
Copy link
Member

eigan commented May 28, 2021

We should probably lock to doctrine/cache 1.* for know.

@eigan
Copy link
Member

eigan commented May 31, 2021

Released a version which locks to ^1 now.

Should look into finding replacements. Maybe symfony/cache.

@aftabnaveed
Copy link
Author

Yes, symfone/cache sounds better.

@vvval
Copy link

vvval commented Aug 2, 2021

if php ^8.0needed, doctrine/common will be locked to a version without cache. php artisan package:discovercauses error even ifsymfony/cache` is required

@rakshitbharat
Copy link

Having same error
Guys please do something, My almost 2 projects failed in staging server

@eigan
Copy link
Member

eigan commented Mar 12, 2022

@rakshitbharat we did. See the comments. What versions are you using? Both from laravel-doctrine and doctrine.

@cesaric
Copy link

cesaric commented Mar 22, 2022

@dpslwk closed it because the fix didn't seem to work out.

I'm on versions (php 8.1) :
laravel-doctrine: 1.7.7
doctrine/orm: 2.11.2
doctrine/cache: 2.1.1

It doesn't appear that we have the Doctrine\Common\Cache{ArrayCache, FileSystemCache, etc..} in doctrine/cache 2.x but it's being referenced in places like laravel-doctrine/orm/src/Configuration/Cache/FileCacheProvider.php.

Adding/locking "doctrine/cache": "^1.12.1" to composer.json does fix it since doc/orm works with either.

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

No branches or pull requests

5 participants