src/Config/Config.php
protected function upgrade450()
    {
        $result = true;
        // Keep track of settings that should be updated.
        $newSettings = array();

        // 1) Log level.
        switch ($this->get('logLevel')) {
            case Log::Error:
            case Log::Warning:
                // This is often not giving enough information, so we set it
                // to Notice by default.
                $newSettings['logLevel'] = Log::Notice;
                break;
            case Log::Info:
                // Info was inserted, so this is the former debug level.
                $newSettings['logLevel'] = Log::Debug;
                break;
        }

        // 2) Debug mode.
        switch ($this->get('debug')) {
            case 4: // Value for deprecated PluginConfig::Debug_StayLocal.
                $newSettings['logLevel'] = PluginConfig::Send_TestMode;
                break;
        }

        if (!empty($newSettings)) {
            $result = $this->save($newSettings);
        }
        return $result;
    }
protected function upgrade450()
    {
        $result = true;
        // Keep track of settings that should be updated.
        $newSettings = array();

        // 1) Log level.
        switch ($this->get('logLevel')) {
            case Log::Error:
            case Log::Warning:
                // This is often not giving enough information, so we set it
                // to Notice by default.
                $newSettings['logLevel'] = Log::Notice;
                break;
            case Log::Info:
                // Info was inserted, so this is the former debug level.
                $newSettings['logLevel'] = Log::Debug;
                break;
        }

        // 2) Debug mode.
        switch ($this->get('debug')) {
            case 4: // Value for deprecated PluginConfig::Debug_StayLocal.
                $newSettings['logLevel'] = PluginConfig::Send_TestMode;
                break;
        }

        if (!empty($newSettings)) {
            $result = $this->save($newSettings);
        }
        return $result;
    }
protected function upgrade450 ( ) { $ result = true ; // Keep track of settings that should be updated. $ newSettings = array ( ) ; // 1) Log level. switch ( $ this -> get ( 'logLevel' ) ) { case Log :: Error : case Log :: Warning : // This is often not giving enough information, so we set it // to Notice by default. $ newSettings [ 'logLevel' ] = Log :: Notice ; break ; case Log :: Info : // Info was inserted, so this is the former debug level. $ newSettings [ 'logLevel' ] = Log :: Debug ; break ; } // 2) Debug mode. switch ( $ this -> get ( 'debug' ) ) { case 4 : // Value for deprecated PluginConfig::Debug_StayLocal. $ newSettings [ 'logLevel' ] = PluginConfig :: Send_TestMode ; break ; } if ( ! empty ( $ newSettings ) ) { $ result = $ this -> save ( $ newSettings ) ; } return $ result ; }
4.5.0 upgrade.

- Log level: added level info and set log level to notice if it currently
is error or warning.
- Debug mode: the values of test mode and stay local are switched. Stay
local is no longer used, so both these 2 values become the new test
mode.

@return bool
4 . 5 . 0 upgrade .