dmaicher / doctrine-test-bundle

Symfony bundle to isolate your app's doctrine database tests and improve the test performance
MIT License
1.08k stars 60 forks source link

Fatal error: Declaration of DAMA\DoctrineTestBundle\Doctrine\Cache\Psr6StaticArrayCache::getItem must be compatible with Psr\Cache\CacheItemPoolInterface::getItem #166

Closed mamchyts closed 3 years ago

mamchyts commented 3 years ago

PHP 8

/var/www/html $ php -v
PHP 8.0.7 (cli) (built: Jun 28 2021 21:13:18) ( NTS )
Copyright (c) The PHP Group
Zend Engine v4.0.7, Copyright (c) Zend Technologies
    with Zend OPcache v8.0.7, Copyright (c), by Zend Technologies
    with Xdebug v3.0.4, Copyright (c) 2002-2021, by Derick Rethans

/var/www/html $ php bin/console cache:clear --env=test

Fatal error: Declaration of DAMA\DoctrineTestBundle\Doctrine\Cache\Psr6StaticArrayCache::getItem($key) must be compatible with Psr\Cache\CacheItemPoolInterface::getItem(string $key): Psr\Cache\CacheItemInterface in /var/www/html/vendor/dama/doctrine-test-bundle/src/DAMA/DoctrineTestBundle/Doctrine/Cache/Psr6StaticArrayCache.php on line 40

composer.lock:

...
        {
            "name": "dama/doctrine-test-bundle",
            "version": "v6.6.0",
            "source": {
                "type": "git",
                "url": "https://github.com/dmaicher/doctrine-test-bundle.git",
                "reference": "8cfd3f9a4cc0f26101e6170f592900384b78b799"
            },

...
dmaicher commented 3 years ago

Which version of symfony/cache are you using?

mamchyts commented 3 years ago
        {
            "name": "symfony/cache",
            "version": "6.0.x-dev",
            "source": {
                "type": "git",
                "url": "https://github.com/symfony/cache.git",
                "reference": "f37739fa007686a3cfcb67f3ed99e1af62642708"
            },
dmaicher commented 3 years ago

Ok this version should not even be allowed since this bundle so far only supports ^4.4 and ^5.2.

I will look into this at some point once Symfony 6.0 is closer to being released.

mamchyts commented 3 years ago

ok