<commit_before>#!/usr/bin/env bash

PHP="$PREFIX/bin/php"

install_composer() {
    download_composer
    copy_composer_phar

    log Composer "Installing executable in $PREFIX/bin/composer"

    mv "$PREFIX/bin/composer.phar" "$PREFIX/bin/composer"

    chmod +x "$PREFIX/bin/composer"
}

download_composer() {
    local composer_url="$1"

    if [ -z "$composer_url" ]; then
        composer_url="https://getcomposer.org/download/2.2.9/composer.phar"
    fi

    if [ ! -f "$PHP_BUILD_TMPDIR/packages/composer.phar" ]; then
        log Composer "Downloading from $composer_url"
        wget -O "$PHP_BUILD_TMPDIR/packages/composer.phar" $composer_url
    else
        log Composer "self updating in $PHP_BUILD_TMPDIR/packages/composer.phar"
        $PHP $PHP_BUILD_TMPDIR/packages/composer.phar self-update
    fi
}<commit_msg>Upgrade to composer 2.2.12<commit_after>#!/usr/bin/env bash

PHP="$PREFIX/bin/php"

install_composer() {
    download_composer
    copy_composer_phar

    log Composer "Installing executable in $PREFIX/bin/composer"

    mv "$PREFIX/bin/composer.phar" "$PREFIX/bin/composer"

    chmod +x "$PREFIX/bin/composer"
}

download_composer() {
    local composer_url="$1"

    if [ -z "$composer_url" ]; then
        composer_url="https://getcomposer.org/download/2.2.12/composer.phar"
    fi

    if [ ! -f "$PHP_BUILD_TMPDIR/packages/composer.phar" ]; then
        log Composer "Downloading from $composer_url"
        wget -O "$PHP_BUILD_TMPDIR/packages/composer.phar" $composer_url
    else
        log Composer "self updating in $PHP_BUILD_TMPDIR/packages/composer.phar"
        $PHP $PHP_BUILD_TMPDIR/packages/composer.phar self-update
    fi
}
{'fraction_non_alphanumeric': 0.12320574162679426, 'fraction_numerical': 0.00777511961722488, 'mean_word_length': 3.3341968911917097, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 8, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2633147', 'n_tokens_mistral': 608, 'n_tokens_neox': 595, 'n_words': 105}