orm icon indicating copy to clipboard operation
orm copied to clipboard

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

Open aftabnaveed opened this issue 3 years ago • 8 comments

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 avatar May 28 '21 12:05 aftabnaveed

Looks like ArrayCache is deprecated in doctrine/cache:2.0
https://github.com/doctrine/cache/pull/355

Would it be safe to remove it from Laravel Doctrine ?

aftabnaveed avatar May 28 '21 13:05 aftabnaveed

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

eigan avatar May 28 '21 16:05 eigan

Released a version which locks to ^1 now.

Should look into finding replacements. Maybe symfony/cache.

eigan avatar May 31 '21 06:05 eigan

Yes, symfone/cache sounds better.

aftabnaveed avatar May 31 '21 10:05 aftabnaveed

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

vvval avatar Aug 02 '21 10:08 vvval

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

rakshitbharat avatar Mar 12 '22 06:03 rakshitbharat

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

eigan avatar Mar 12 '22 06:03 eigan

@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.

cesaric avatar Mar 22 '22 03:03 cesaric