Example #1
0
 /**
  * Use to set up a param tag for use in creating a paramgroup
  * @static
  */
 function getParam($name, $prompt, $type = 'string', $default = null)
 {
     if ($default !== null) {
         return array($this->_pkg->getTasksNs() . ':name' => $name, $this->_pkg->getTasksNs() . ':prompt' => $prompt, $this->_pkg->getTasksNs() . ':type' => $type, $this->_pkg->getTasksNs() . ':default' => $default);
     }
     return array($this->_pkg->getTasksNs() . ':name' => $name, $this->_pkg->getTasksNs() . ':prompt' => $prompt, $this->_pkg->getTasksNs() . ':type' => $type);
 }
 /**
  * Registers the symfony package for the current version.
  */
 protected function registerSymfonyPackage()
 {
     $symfony = new PEAR_PackageFile_v2_rw();
     $symfony->setPackage('symfony');
     $symfony->setChannel('pear.symfony-project.com');
     $symfony->setConfig($this->environment->getConfig());
     $symfony->setPackageType('php');
     $symfony->setAPIVersion(preg_replace('/\\d+(\\-\\w+)?$/', '0', SYMFONY_VERSION));
     $symfony->setAPIStability(false === strpos(SYMFONY_VERSION, 'DEV') ? 'stable' : 'beta');
     $symfony->setReleaseVersion(preg_replace('/\\-\\w+$/', '', SYMFONY_VERSION));
     $symfony->setReleaseStability(false === strpos(SYMFONY_VERSION, 'DEV') ? 'stable' : 'beta');
     $symfony->setDate(date('Y-m-d'));
     $symfony->setDescription('symfony');
     $symfony->setSummary('symfony');
     $symfony->setLicense('MIT License');
     $symfony->clearContents();
     $symfony->resetFilelist();
     $symfony->addMaintainer('lead', 'fabpot', 'Fabien Potencier', '*****@*****.**');
     $symfony->setNotes('-');
     $symfony->setPearinstallerDep('1.4.3');
     $symfony->setPhpDep('5.2.4');
     $this->environment->getRegistry()->deletePackage('symfony', 'pear.symfony-project.com');
     if (!$this->environment->getRegistry()->addPackage2($symfony)) {
         throw new sfPluginException('Unable to register the symfony package');
     }
 }
Example #3
0
 public function configure()
 {
     $this->environment->registerChannel('pear.example.com', true);
     $mainPackage = new PEAR_PackageFile_v2_rw();
     $mainPackage->setPackage('sfMainPackage');
     $mainPackage->setChannel('pear.example.com');
     $mainPackage->setConfig($this->environment->getConfig());
     $mainPackage->setPackageType('php');
     $mainPackage->setAPIVersion('1.0.0');
     $mainPackage->setAPIStability('stable');
     $mainPackage->setReleaseVersion($this->mainPackageVersion);
     $mainPackage->setReleaseStability('stable');
     $mainPackage->setDate(date('Y-m-d'));
     $mainPackage->setDescription('sfMainPackage');
     $mainPackage->setSummary('sfMainPackage');
     $mainPackage->setLicense('MIT License');
     $mainPackage->clearContents();
     $mainPackage->resetFilelist();
     $mainPackage->addMaintainer('lead', 'fabpot', 'Fabien Potencier', '*****@*****.**');
     $mainPackage->setNotes('-');
     $mainPackage->setPearinstallerDep('1.4.3');
     $mainPackage->setPhpDep('5.1.0');
     $this->environment->getRegistry()->deletePackage('sfMainPackage', 'pear.example.com');
     if (!$this->environment->getRegistry()->addPackage2($mainPackage)) {
         throw new sfException('Unable to register our sfMainPackage');
     }
 }
 /**
  * Add an <ignore> tag to a <phprelease> tag
  *
  * @param string $path full path to filename to ignore
  *
  * @return void
  * @access public
  * @see    PEAR_PackageFile_v2_rw::addIgnore()
  * @since  1.6.0a3
  */
 function addIgnoreToRelease($path)
 {
     return parent::addIgnore($path);
 }
 protected function registerOpenPNEPackage()
 {
     $openpne = new PEAR_PackageFile_v2_rw();
     $openpne->setPackage('openpne');
     $openpne->setChannel('plugins.openpne.jp');
     $openpne->setConfig($this->environment->getConfig());
     $openpne->setPackageType('php');
     $openpne->setAPIVersion(preg_replace('/\\d+(\\-\\w+)?$/', '0', OPENPNE_VERSION));
     $openpne->setAPIStability(false === strpos(OPENPNE_VERSION, 'dev') ? 'stable' : 'beta');
     $openpne->setReleaseVersion(str_replace('-', '', OPENPNE_VERSION));
     $openpne->setReleaseStability(false === strpos(OPENPNE_VERSION, 'dev') ? 'stable' : 'beta');
     $openpne->setDate(date('Y-m-d'));
     $openpne->setDescription('openpne');
     $openpne->setSummary('openpne');
     $openpne->setLicense('Apache License');
     $openpne->clearContents();
     $openpne->resetFilelist();
     $openpne->addMaintainer('lead', 'ebihara', 'Kousuke Ebihara', '*****@*****.**');
     $openpne->setNotes('-');
     $openpne->setPearinstallerDep('1.4.3');
     $openpne->setPhpDep('5.2.3');
     // This is a stupid hack. This makes a validator skip validation because that validator
     // doesn't support 3.X.X-betaX-dev formatted version number. Validation of dummy OpenPNE
     // package doesn't make a sense...
     $openpne->_isValid = PEAR_VALIDATE_NORMAL;
     $this->environment->getRegistry()->deletePackage('openpne', 'plugins.openpne.jp');
     if (!$this->environment->getRegistry()->addPackage2($openpne)) {
         throw new sfPluginException('Unable to register the OpenPNE package');
     }
 }
 protected function registerOpenPNEPackage()
 {
     $symfony = new PEAR_PackageFile_v2_rw();
     $symfony->setPackage('openpne');
     $symfony->setChannel('plugins.openpne.jp');
     $symfony->setConfig($this->environment->getConfig());
     $symfony->setPackageType('php');
     $symfony->setAPIVersion(preg_replace('/\\d+(\\-\\w+)?$/', '0', OPENPNE_VERSION));
     $symfony->setAPIStability(false === strpos(OPENPNE_VERSION, 'dev') ? 'stable' : 'beta');
     $symfony->setReleaseVersion(str_replace('-', '', OPENPNE_VERSION));
     $symfony->setReleaseStability(false === strpos(OPENPNE_VERSION, 'dev') ? 'stable' : 'beta');
     $symfony->setDate(date('Y-m-d'));
     $symfony->setDescription('openpne');
     $symfony->setSummary('openpne');
     $symfony->setLicense('Apache License');
     $symfony->clearContents();
     $symfony->resetFilelist();
     $symfony->addMaintainer('lead', 'ebihara', 'Kousuke Ebihara', '*****@*****.**');
     $symfony->setNotes('-');
     $symfony->setPearinstallerDep('1.4.3');
     $symfony->setPhpDep('5.2.3');
     $this->environment->getRegistry()->deletePackage('openpne', 'plugins.openpne.jp');
     if (!$this->environment->getRegistry()->addPackage2($symfony)) {
         throw new sfPluginException('Unable to register the OpenPNE package');
     }
 }
Example #7
0
 /**
  * Retrieve a package file based on a previous release
  *
  * @param string $pfcontents contents of the previous release's package.xml
  * @return PEAR_PackageFile_v2
  */
 function getPackageXmlV2($pfcontents)
 {
     require_once 'PEAR/PackageFile.php';
     require_once 'PEAR/Config.php';
     $config = PEAR_Config::singleton();
     $pkg = new PEAR_PackageFile($config, false, PEAR_TMPDIR);
     PEAR::pushErrorHandling(PEAR_ERROR_RETURN);
     $pf = $pkg->fromXmlString($pfcontents, PEAR_VALIDATE_DOWNLOADING, 'package.xml');
     PEAR::popErrorHandling();
     if (PEAR::isError($pf)) {
         return $pf;
     }
     if ($pf->getPackagexmlVersion() != '1.0') {
         $pf2 = new PEAR_PackageFile_v2_rw();
         $pf2->fromArray($pf->getArray());
     } else {
         require_once 'PEAR/PackageFile/Generator/v1.php';
         $gen = new PEAR_PackageFile_Generator_v1($pf);
         $pf2 = $gen->toV2('PEAR_PackageFile_v2_rw');
     }
     require_once 'pear-database-package.php';
     $info = package::info($pf2->getPackage());
     $pf2->setPackage($this->_package);
     $pf2->setChannel('pear.php.net');
     $pf2->setSummary($info['summary']);
     $pf2->setDescription($info['description']);
     $m = $pf2->getMaintainers();
     foreach ($m as $maintainer) {
         $pf2->deleteMaintainer($maintainer['handle']);
     }
     $maintainers = package::info($this->_package, 'authors');
     foreach ($maintainers as $maintainer) {
         $pf2->addMaintainer($maintainer['role'], $maintainer['handle'], $maintainer['name'], $maintainer['email'], $maintainer['active'] ? 'yes' : 'no');
     }
     return $pf2;
 }
 /**
  * registerSymfonyPackage
  *
  * Copied from sfSymfonyPluginManager::registerSymfonyPackage() and changed symfony version
  * that is reported to PEAR installer to 1.9.9 because plugin installer tries downloading the
  * newest stable version of symfony every-time even if the project has the own symfony.
  * OpenPNE is distributed with the own symfony so this behavior is just cumber.
  * For bypassing from downloading symfony, OpenPNE cheats about its symfony version.
  * The last symfony 1.x is 1.4.x. Probably 1.9.9 will be never released.
  */
 protected function registerSymfonyPackage()
 {
     $symfony = new PEAR_PackageFile_v2_rw();
     $symfony->setPackage('symfony');
     $symfony->setChannel('pear.symfony-project.com');
     $symfony->setConfig($this->environment->getConfig());
     $symfony->setPackageType('php');
     $symfony->setAPIVersion('1.1.0');
     $symfony->setAPIStability('stable');
     $symfony->setReleaseVersion('1.9.9');
     $symfony->setReleaseStability('stable');
     $symfony->setDate(date('Y-m-d'));
     $symfony->setDescription('symfony');
     $symfony->setSummary('symfony');
     $symfony->setLicense('MIT License');
     $symfony->clearContents();
     $symfony->resetFilelist();
     $symfony->addMaintainer('lead', 'fabpot', 'Fabien Potencier', '*****@*****.**');
     $symfony->setNotes('-');
     $symfony->setPearinstallerDep('1.4.3');
     $symfony->setPhpDep('5.1.0');
     $this->environment->getRegistry()->deletePackage('symfony', 'pear.symfony-project.com');
     if (!$this->environment->getRegistry()->addPackage2($symfony)) {
         throw new sfPluginException('Unable to register the symfony package');
     }
 }