コード例 #1
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');
     }
 }
コード例 #2
0
 /**
  * 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');
     }
 }
コード例 #3
0
 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');
     }
 }
コード例 #4
0
 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');
     }
 }
コード例 #5
0
 /**
  * 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');
     }
 }