<commit_before><?php

// Set the page title
$parent->context->page_title = $context->name . ' | Categories | ' . PEAR2\SimpleChannelFrontend\Main::$channel->name;

?>

        <div id="categories" class="pearbox">
            <div class="pearbox-header">
                <h2>
                    <a href="<?php echo PEAR2\SimpleChannelFrontend\Main::getURL(); ?>categories/">Packages</a>
                    ›
                    <?php echo $context->name; ?> <span><?php echo count($context); ?></span>
                </h2>
            </div>
            <div class="pearbox-content clearfix">

<?php

foreach ($context as $key => $package) {
    $packageTitle = str_replace('PEAR2_', '', $package->name);
    $packageHref  = PEAR2\SimpleChannelFrontend\Main::getURL()
        . $package->name;

    echo '<div class="package">';

    echo '<div class="package-info">';

    echo '<div class="package-title">';
    echo '<a href="' . $packageHref . '">' . $packageTitle . '</a>';
    echo '</div>';
    echo '<div class="package-description">';
    echo '<p>' . $package->summary . '</p>';
    echo '</div>';

    echo '</div>';
    echo '<div class="package-more-info">';

    echo $savant->render($package, 'PackageDetails.tpl.php');

    echo '</div>';

    echo '</div>';
}

?>

            </div>
        </div>

<?php echo $savant->render(null, 'OtherChannelsNote.tpl.php'); ?>
<commit_msg>Use newest release for package details on category page.<commit_after><?php

// Set the page title
$parent->context->page_title = $context->name . ' | Categories | ' . PEAR2\SimpleChannelFrontend\Main::$channel->name;

?>

        <div id="categories" class="pearbox">
            <div class="pearbox-header">
                <h2>
                    <a href="<?php echo PEAR2\SimpleChannelFrontend\Main::getURL(); ?>categories/">Packages</a>
                    ›
                    <?php echo $context->name; ?> <span><?php echo count($context); ?></span>
                </h2>
            </div>
            <div class="pearbox-content clearfix">

<?php

foreach ($context as $key => $package) {

    $package->figureOutBestVersion(
        new \PEAR2\Pyrus\PackageFile\v2\Dependencies\Package(
            'required',
            'package',
            null,
            array(
                'name'              => $package->name,
                'channel'           => 'pear2.php.net',
                'uri'               => null,
                'min'               => null,
                'max'               => null,
                'recommended'       => null,
                'exclude'           => null,
                'providesextension' => null,
                'conflicts'         => null
            ),
            0
        )
    );

    $packageTitle = str_replace('PEAR2_', '', $package->name);
    $packageHref  = PEAR2\SimpleChannelFrontend\Main::getURL()
        . $package->name;

    echo '<div class="package">';

    echo '<div class="package-info">';

    echo '<div class="package-title">';
    echo '<a href="' . $packageHref . '">' . $packageTitle . '</a>';
    echo '</div>';
    echo '<div class="package-description">';
    echo '<p>' . $package->summary . '</p>';
    echo '</div>';

    echo '</div>';
    echo '<div class="package-more-info">';

    echo $savant->render($package, 'PackageDetails.tpl.php');

    echo '</div>';

    echo '</div>';
}

?>

            </div>
        </div>

<?php echo $savant->render(null, 'OtherChannelsNote.tpl.php'); ?>

{'fraction_non_alphanumeric': 0.18546078992558673, 'fraction_numerical': 0.0045792787635947334, 'mean_word_length': 1.9052369077306732, 'pattern_counts': {'":': 0, '<': 67, '<?xml version=': 0, '>': 100, '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': '515436', 'n_tokens_mistral': 1065, 'n_tokens_neox': 1027, 'n_words': 212}