<commit_before><?php

namespace DRI\SugarCRM\Console\Command\Config;

use DRI\SugarCRM\Console\Command\ApplicationCommand;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;

/**
 * @author <NAME>
 */
class IncreaseJsCustomVersionCommand extends ApplicationCommand
{
    /**
     *
     */
    protected function configure()
    {
        $this->setName('config:increase-js-custom-version')
            ->setDescription('Increases the js custom version by 1');
    }

    /**
     * @param InputInterface  $input
     * @param OutputInterface $output
     *
     * @return int|null|void
     */
    protected function execute(InputInterface $input, OutputInterface $output)
    {
        global $beanList;

        $sugar_version = \SugarConfig::getInstance()->get('sugar_version');

        $jsCustomVersion = \SugarConfig::getInstance()->get('js_custom_version', 1);
        $jsLangVersion = \SugarConfig::getInstance()->get('js_lang_version', 1);

        $jsCustomVersion++;
        $jsLangVersion++;

        $output->writeln("<info>Changing js_custom_version to: $jsCustomVersion</info>");
        $output->writeln("<info>Changing js_lang_version to: $jsLangVersion</info>");

        $sugar_config = loadCleanConfig();

        $sugar_config['js_custom_version'] = $jsCustomVersion;
        $sugar_config['js_lang_version'] = $jsLangVersion;

        rebuildConfigFile($sugar_config, $sugar_version);
    }
}<commit_msg>Made sure that the config.php is setup with proper permissions when increasing js custom version<commit_after><?php

namespace DRI\SugarCRM\Console\Command\Config;

use DRI\SugarCRM\Console\Command\ApplicationCommand;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;

/**
 * @author <NAME>
 */
class IncreaseJsCustomVersionCommand extends ApplicationCommand
{
    /**
     *
     */
    protected function configure()
    {
        $this->setName('config:increase-js-custom-version')
            ->setDescription('Increases the js custom version by 1');
    }

    /**
     * @param InputInterface  $input
     * @param OutputInterface $output
     *
     * @return int|null|void
     */
    protected function execute(InputInterface $input, OutputInterface $output)
    {
        global $beanList;

        $sugar_version = \SugarConfig::getInstance()->get('sugar_version');

        $jsCustomVersion = \SugarConfig::getInstance()->get('js_custom_version', 1);
        $jsLangVersion = \SugarConfig::getInstance()->get('js_lang_version', 1);

        $jsCustomVersion++;
        $jsLangVersion++;

        $output->writeln("<info>Changing js_custom_version to: $jsCustomVersion</info>");
        $output->writeln("<info>Changing js_lang_version to: $jsLangVersion</info>");

        $sugar_config = loadCleanConfig();

        $sugar_config['js_custom_version'] = $jsCustomVersion;
        $sugar_config['js_lang_version'] = $jsLangVersion;

        rebuildConfigFile($sugar_config, $sugar_version);

        sugar_chown('config.php');
        sugar_chgrp('config.php');
    }
}
{'fraction_non_alphanumeric': 0.13117382937780628, 'fraction_numerical': 0.001924310455420141, 'mean_word_length': 3.540029112081514, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 27, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2406862', 'n_tokens_mistral': 925, 'n_tokens_neox': 898, 'n_words': 152}