Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
tree: 4e3f62ab43
Fetching contributors…

Cannot retrieve contributors at this time

27 lines (24 sloc) 0.794 kb
<?php
require_once 'DB.php';
$dbh = DB::connect('mysqli://pear:pear@localhost/pear');
if (PEAR::isError($dbh)) {
die('Database connection failed');
}
$sql = '
SELECT r.id, r.version, p.name, files.packagexml
FROM packages p
LEFT JOIN (
SELECT MAX(id) as id, MAX(version) as version, package FROM releases GROUP BY package
) AS r ON p.id = r.package
JOIN files ON r.id = files.release
WHERE p.package_type = "pear"
GROUP BY p.name';
$data = $dbh->getAll($sql, DB_FETCHMODE_ASSOC);
$i = 0;
foreach ($data as $d) {
if (!preg_match('/<package[^>]+version\s*=\s*"2.0"/', $d['packagexml'])) {
echo $d['name'] . ' (' . $d['version'] . ")\n";
$i++;
}
}
echo "\n\nFound $i packages with only package xml v1 format in latest release\n";
Jump to Line
Something went wrong with that request. Please try again.