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

[11.x] Apc Cache - Remove long-time gone apc_* functions #51010

Merged

Conversation

serpentblade
Copy link
Contributor

APC has been deprecated since PHP 7 with the introduction of opcache, and no longer even compiles for PHP 8.x.

Removes the usage of apc_* functions and the need to check which version of the functions to call in ApcWrapper.

This has a code maintenance benefit of clearing out code paths that are no longer relevant due to supported PHP versions.
This has a minor performance benefit as usage of Apcu cache no longer has an extra boolean check on every method call.

Note: An even better implementation would be to ditch the ApcWrapper altogether and move the simple implementation of each cache method directly into ApcStore, but that requires more creative changes to the CacheApcStoreTest as it relied on mocking the ApcWrapper to validate the implementation. Updating these tests to mocking the builtin apcu_* functions would be a chore. Or perhaps with the implementation being simply a wrapper around apcu_* calls anyway it would be safe to kill off the test entirely. But that may also be viewed as a breaking change.

APC has been deprecated since PHP 7, and no longer even compiles for PHP 8.x

Removes the usage of apc_* functions and the need to check which version of the functions to call.
@taylorotwell taylorotwell merged commit 3da39ec into laravel:11.x Apr 10, 2024
58 of 59 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants