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]: Wrong #1 parameter given to Phalcon\Cache constructor #14481

Closed
Jeckerson opened this issue Oct 20, 2019 · 1 comment

Comments

@Jeckerson
Copy link
Member

@Jeckerson Jeckerson commented Oct 20, 2019

Describe the bug

Parameter #1 $adapter of class Phalcon\Cache constructor expects Phalcon\Cache\Adapter\AdapterInterface, Phalcon\Cache\Adapter\AbstractAdapter given.

Current issue is also related to ide-stubs, but maybe there might be some internal rework in Phalcon\Cache class..

To Reproduce
Picked from documentation - https://docs.phalcon.io/4.0/en/cache#cache-1

<?php

use Phalcon\Cache;
use Phalcon\Cache\AdapterFactory;
use Phalcon\Storage\Serializer\SerializerFactory;

$serializerFactory = new SerializerFactory();
$adapterFactory    = new AdapterFactory($serializerFactory);

$options = [
    'defaultSerializer' => 'Json',
    'lifetime'          => 7200
];

$adapter = $adapterFactory->newInstance('apcu', $options);

$cache = new Cache($adapter);

Expected behavior

  • Update Phalcon\Cache constructor
  • Update ide-stubs

Details

  • Phalcon version: 4.0.0-rc.1
  • PHP Version: any
  • Operating System: any
@Jeckerson Jeckerson referenced this issue Oct 20, 2019
7 of 7 tasks complete
@niden niden added this to To do in 4.0 Release via automation Oct 21, 2019
@niden niden referenced this issue Oct 21, 2019
5 of 5 tasks complete
@niden niden moved this from To do to In progress in 4.0 Release Oct 21, 2019
@niden

This comment has been minimized.

Copy link
Member

@niden niden commented Oct 21, 2019

Resolved in #14482

@niden niden closed this Oct 21, 2019
4.0 Release automation moved this from In progress to Done Oct 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
4.0 Release
  
Done
2 participants
You can’t perform that action at this time.