prismicio-community / php-kit

Community maintained development kit for Prismic and the PHP language
https://prismic.io
Other
108 stars 82 forks source link

[Bug] APC and APCU mismatch #162

Closed OwenMelbz closed 1 year ago

OwenMelbz commented 5 years ago

Hi,

There seems to be a mismatch in the code with apc and apcu.

The Apc driver specifically uses apcu e.g.

public function has($key)
{
    return \apcu_exists($key);
}

however the "default cache" method checks for the wrong extension e.g.

if (extension_loaded('apc') && ini_get('apc.enabled')) {
    return new ApcCache();
}

extension_loaded('apc') returns false.

This is because it's registered as apcu

Changing the code to extension_loaded('apcu') fixes the problem and enables the built in cache.

--

Can we look into getting this patched and released?

Thanks :)

c0nst4ntin commented 1 year ago

@OwenMelbz I'm happy to tell you, that this issue was finally fixed in feat!: support PHP 8 #190

To make use of this change please upgrade to Version 5.2.0

Sadly, I couldn't use your old PR, since the branch got deleted. I will proceed to close this issue.

If you run into any trouble with the package again, please feel free to open up a new Issue