Install the bundle via Composer:
php composer.phar require --dev matthimatiker/opcache-bundle
Enable the bundle in your kernel:
<?php
// app/AppKernel.php
public function registerBundles()
{
/ ...
if (in_array($this->getEnvironment(), array('dev', 'test'))) {
// ...
$bundles[] = new Matthimatiker\OpcacheBundle\MatthimatikerOpcacheBundle();
}
}
Configure Twig as template engine in your config.yml
:
framework:
templating: { engines: ['twig'] }
After bundle activation, an additional info box shows up in the profiler toolbar. It provides quick access to the current memory usage and hit rate of the Opcache.
The detail page provides comprehensive information about memory state, cache key usage and cached scripts:
- Updated template reference syntax to be compatible to Symfony 4 with Symfony flex (thanks to David Ward)
- Added support for Symfony 4 (thanks to PabloKowalczyk)
- Dropped support for Symfony 2.3
- Added missing dependencies (thanks to PabloKowalczyk)
- Added statistics about interned strings (thanks to PabloKowalczyk)
- Avoid conflict on installation with Symfony Flex
- Dropped PHP 5 support
- Dropped HHVM support