Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Opcache Bundle

Opcache Bundle Laravel Package

sixdays/opcache-bundle

Symfony bundle for inspecting and managing PHP OPcache from your app: view cache statistics, memory usage, hit rates, and cached scripts, then reset or invalidate OPcache when needed. Useful for debugging performance and deployments.

View on GitHub
Deep Wiki
Context7

Provides a command line task to clear opcache cache from the console

Frequently asked questions about Opcache Bundle
Is sixdays/opcache-bundle compatible with Laravel?
No. Despite being catalogued alongside Laravel/PHP packages, sixdays/opcache-bundle is a Symfony bundle that ships a bundle class, DI extension, and console command registered through the Symfony kernel. There is no Laravel service provider, facade, extra.laravel block, or publishable config. The only reusable piece is the command class, and that requires rewriting and registering it yourself.
How do I install sixdays/opcache-bundle?
In Symfony you would install it with Composer and register the bundle in the kernel, but there is no supported Laravel installation path. Expect Composer resolution failures against modern Symfony and Laravel constraints because the repository is archived. For a Laravel app, do not bridge the Symfony DI layer; extract or rewrite the command instead.
Does resetting OPcache from a CLI command clear the PHP-FPM cache?
Usually no. OPcache shared memory is scoped per SAPI and per pool, so a CLI invocation clears the CLI segment, or none when opcache.enable_cli=0, and leaves the PHP-FPM cache serving traffic untouched. This package makes a local opcache_reset call and does not speak FastCGI to FPM. The dangerous result is a command that exits 0 while doing nothing operationally.
Can I use this package to clear OPcache after Laravel deployments?
Not reliably. A deploy step that silently no-ops is worse than no step because it removes the incident signal. If opcache.validate_timestamps=0 in production, you need deterministic bytecode invalidation across every node and container, and this package has no cluster awareness. Use a FastCGI-aware tool such as cachetool or orchestrate an FPM reload or restart.
Does sixdays/opcache-bundle work with Laravel Octane?
No. Under Octane, workers hold code independently of OPcache, so an OPcache reset alone will not refresh them. The package is also an archived Symfony bundle with no Laravel or Octane integration. You need to reload Octane workers as part of the deployment sequence.
What Laravel and PHP versions does sixdays/opcache-bundle support?
It is a Symfony bundle, not a Laravel package, and the archived repository has no PHP 8.x or Symfony 6+ compatibility work coming. Composer constraints are likely to conflict with modern Laravel applications. Any extracted command needs modern signatures such as execute(): int, typed properties, and an explicit signature or AsCommand attribute.
Is sixdays/opcache-bundle still maintained?
No. The repository is archived, has roughly 30 stars and zero dependents, so there are no upstream fixes, CVE responses, or compatibility updates. For operational tooling that is a supply-chain risk, not just a cosmetic concern. If your dependency policy forbids archived packages, the evaluation ends here.
What are the alternatives to sixdays/opcache-bundle for OPcache management?
The recommended option is cachetool wrapped in an Artisan command because it is maintained, FastCGI-based, and actually reaches PHP-FPM. Alternatively, vendor the roughly 30-line reset command into app/Console/Commands, strip the bundle boilerplate, and register it via Kernel::commands for full control. Reject installing the bundle and bridging Symfony wiring into Laravel.
How do I test whether an OPcache reset actually works in Laravel?
Validate the premise on staging PHP-FPM: invoke the command, change a served file, and check whether the application picks it up. If it does not, stop and re-scope to a FastCGI-based solution. Also verify the reset return value, which is false on failure, and throw instead of logging and continuing.
What production risks come with an archived OPcache reset command?
The dominant failure mode is not a crash but a suppressed or misrouted reset behind opcache.restrict_api, disable_functions, or shared-memory permission errors that return false without surfacing an error. That can produce a green deploy step that silently does nothing. Confirm the SAPI, node count, orchestration ownership, and opcache.validate_timestamps setting before relying on any reset command.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
elsayed85/laravel-api-exceptions
ouhssini/laravel-demo-mode
daworks/ncloud-outbound-mailer-driver
gp247/cms
ignibyte/aic-gates
nexa-merchant/blog
novasa/laravel-language-center
opencage/geocode
adolfoholzer/parameters
livenetworks/ln-starter
shitoudev/permissionmanager
johannesclimacus/laravel-tui
hocvt/seotools
vitalybaev/sypexgeo
amphibee/themosis-ignition
gito-me/fast-excel
frankyso/laravel-ipaymu
geolize-studio/laravel-chile
boomerangui/chat
cgv/localized-resource