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

Unknown driver path reference (phpFastCache\Drivers\Setup\Driver) #460

Closed
jackie-d opened this issue May 19, 2017 · 4 comments
Closed

Unknown driver path reference (phpFastCache\Drivers\Setup\Driver) #460

jackie-d opened this issue May 19, 2017 · 4 comments

Comments

@jackie-d
Copy link

jackie-d commented May 19, 2017

###Configuration:

PhpFastCache version: 1.2.5 (got from Api.php)
PHP version: 5.6.30
Operating system: Mac OSX

####Issue description:

Fresh install, cloned the whole dir on my virtualhost, and setupping it without composer as follow:

    use phpFastCache\CacheManager;

    require __DIR__ . '/libs/PhpFastCache/src/autoload.php';

    CacheManager::setup(array(
        "path" => $_SERVER['DOCUMENT_ROOT']."cache",
    ));
    $InstanceCache = CacheManager::getInstance('files');

and I get the following error:

Fatal error: Class 'phpFastCache\Drivers\Setup\Driver' not found in /Users/Jack/Documents/VirtualHosts/xxx/inc/libs/PhpFastCache/src/phpFastCache/CacheManager.php on line 198

How could I make it work without composer?

Thanks.

@Geolim4
Copy link
Member

Geolim4 commented May 19, 2017

Hello,

The version is wrong (it's the API version), where did you got the lib ?
Also the method setup() is no longer valid use setDefaultConfig() instead.

See:
https://github.com/PHPSocialNetwork/phpfastcache/blob/final/src/phpFastCache/CacheManager.php#L324

Cheers,
Georges

@Geolim4 Geolim4 self-assigned this May 19, 2017
@Geolim4
Copy link
Member

Geolim4 commented May 19, 2017

However I'll add a deprecation message regarding this method.

Geolim4 added a commit that referenced this issue May 19, 2017
@jackie-d
Copy link
Author

I confirm that using setDefaultConfig() the problem is solved.

I still don't know where to get the version from.

@Geolim4
Copy link
Member

Geolim4 commented May 25, 2017

The version can be revealed with composer (if you are using it).
Or from github on releases page :)

@Geolim4 Geolim4 added this to the 6.0.1 milestone Jun 14, 2017
@Geolim4 Geolim4 added this to Fixed in V6 Roadmap Jun 21, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
V6 Roadmap
  
Done
Development

No branches or pull requests

2 participants