Example #1
0
$p2_4 = clone $save;
$p2_4->name = 'P2';
$p2_4->version['release'] = '1.3.1';
$p2_4->stability['release'] = 'stable';
$p2_4->files['glooby5'] = array('role' => 'php');
$p3 = clone $save;
$p3->name = 'P3';
$p3->files['glooby6'] = array('role' => 'php');
$p3->dependencies['required']->package['pear2.php.net/P2']->max('1.3.0')->exclude('1.2.3')->min('1.0.0');
file_put_contents(__DIR__ . '/package.xml', $pf);
$package1 = new \Pyrus\Package(false);
$xmlcontainer = new \Pyrus\PackageFile($pf);
$xml = new \Pyrus\Package\Xml(__DIR__ . '/package.xml', $package1, $xmlcontainer);
$package1->setInternalPackage($xml);
$package1->archivefile = __DIR__ . '/package.xml';
$scs->saveRelease($package1, 'cellog');
$package2 = new \Pyrus\Package(false);
$xmlcontainer = new \Pyrus\PackageFile($p2_1);
$xml = new \Pyrus\Package\Xml(__DIR__ . '/package.xml', $package2, $xmlcontainer);
$package2->setInternalPackage($xml);
file_put_contents(__DIR__ . '/package.xml', $p2_1);
$package2->archivefile = __DIR__ . '/package.xml';
$scs->saveRelease($package2, 'cellog');
$package2 = new \Pyrus\Package(false);
$xmlcontainer = new \Pyrus\PackageFile($p2_2);
$xml = new \Pyrus\Package\Xml(__DIR__ . '/package.xml', $package2, $xmlcontainer);
$package2->setInternalPackage($xml);
file_put_contents(__DIR__ . '/package.xml', $p2_2);
$package2->archivefile = __DIR__ . '/package.xml';
$scs->saveRelease($package2, 'cellog');
$package2 = new \Pyrus\Package(false);
Example #2
0
$pf->channel = 'pear2.php.net';
$pf->summary = 'testing';
$pf->version['release'] = '1.0.0';
$pf->stability['release'] = 'stable';
$pf->description = 'hi description';
$pf->notes = 'my notes';
$pf->maintainer['cellog']->role('lead')->email('*****@*****.**')->active('yes')->name('Greg Beaver');
$pf->files['glooby1'] = array('role' => 'php');

$pf->setPackagefile(__DIR__ . '/package.xml');

file_put_contents(__DIR__ . '/package.xml', $pf);

$package1 = new \PEAR2\Pyrus\Package(false);
$xmlcontainer = new \PEAR2\Pyrus\PackageFile($pf);
$xml = new \PEAR2\Pyrus\Package\Xml(__DIR__ . '/package.xml', $package1, $xmlcontainer);
$package1->setInternalPackage($xml);
$package1->archivefile = __DIR__ . '/package.xml';
$scs->saveRelease($package1, 'cellog', $cert[0], $cert[1]);

// clean up
unlink(dirname(__DIR__) . '/pearconfig.xml');
unlink(dirname(__DIR__) . '/.config');
for ($i = 1; $i <= 1; $i++) {
    unlink(__DIR__ . "/glooby$i");
}
unlink(__DIR__ . '/package.xml');
$dir = dirname(__DIR__) . '/.configsnapshots';
include __DIR__ . '/../../../clean.php.inc';
rmdir(dirname(__DIR__) . '/PEAR2/temp');