Skip to content

Devfalse or Devtrue driver not worked #425

@LaFa777

Description

@LaFa777

###Configuration:

PhpFastCache version: V6-rc1
PHP version: 7.1.1
Operating system: windows 10 x64

####Issue description:

When I try use Devfalse or Devtrue driver, php printed Fatal error.
Example:

D:\projects\phpfastcache\tests>php Psr16Adapter.test.php Devfalse
[PHPFASTCACHE API V1.2.4]
[Begin Test: 'Psr16Adapter helper']
---
PHP Fatal error:  Uncaught TypeError: Argument 1 passed to phpFastCache\Drivers\Devfalse\Item::__construct() must be an instance of phpFastCache\Drivers\Devnull\Driver, instance of phpFastCache\Drivers\Devfalse\Driver given in D:\projects\phpfastcache\src\phpFastCache\Drivers\Devfalse\Item.php:37
Stack trace:
#0 [internal function]: phpFastCache\Drivers\Devfalse\Item->__construct(Object(phpFastCache\Drivers\Devfalse\Driver), 'test-key')
#1 D:\projects\phpfastcache\src\phpFastCache\Core\Pool\CacheItemPoolTrait.php(74): ReflectionClass->newInstanceArgs(Array)
#2 D:\projects\phpfastcache\src\phpFastCache\Helper\Psr16Adapter.php(175): phpFastCache\Drivers\Devfalse\Driver->getItem('test-key')
#3 D:\projects\phpfastcache\tests\Psr16Adapter.test.php(20): phpFastCache\Helper\Psr16Adapter->has('test-key')
#4 {main}
  thrown in D:\projects\phpfastcache\src\phpFastCache\Drivers\Devfalse\Item.php on line 37
 
...

It's a bug?

Metadata

Metadata

Assignees

No one assigned

    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