protected function updateRule($ruleName, $className)
    {
        echo "    > update rule $ruleName ...";
        $time = microtime(true);

        /** @var Rule $rule */
        $rule = \Yii::createObject([
            'class' => $className,
            'name'  => $ruleName,
        ]);

        $this->authManager->update($ruleName, $rule);
        echo ' done (time: ' . sprintf('%.3f', microtime(true) - $time) . "s)\n";
        
        return $rule;
    }