timegryd/opcache-reset-bundle

Opcache重置包

1.1.2 2018-04-16 18:12 UTC

This package is not auto-updated.

Last update: 2024-09-28 20:54:32 UTC


README

SensioLabsInsight Scrutinizer Code Quality Build Status

命令行界面用于重置opcache

安装

步骤 1: 下载包

打开命令控制台,进入您的项目目录,然后执行以下命令以下载此包的最新稳定版本

$ composer require timegryd/opcache-reset-bundle "1.0.*"

此命令要求您全局安装了Composer,具体请参阅Composer文档的安装章节

步骤 2: 启用包

然后,通过将其添加到项目中的app/AppKernel.php文件中注册的包列表中来启用该包。

<?php
// app/AppKernel.php

// ...
class AppKernel extends Kernel
{
    public function registerBundles()
    {
        $bundles = array(
            // ...

            new Timegryd\OpcacheResetBundle\TimegrydOpcacheResetBundle(),
        );

        // ...
    }

    // ...
}

步骤 3: 配置

设置配置

# app/config/config.yml
timegryd_opcache_reset:
    host: http://timegryd.io
    dir: "%kernel.root_dir%/../web"

步骤 4: 使用它!

$ php bin/console opcache:reset

您还可以覆盖配置

$ php bin/console opcache:reset timegryd.io /web-dir

感谢

由sixdayz重写的OpcacheBundle https://github.com/sixdayz/OpcacheBundle