SYmfony plugin upload error: You must specify the min version for symfony

雨燕双飞 提交于 2019-12-24 09:29:48

问题


I have been trying to upload my SYmfony plugin for some time but I keep getting this error. Initially the dependency on the SYmfony Package was missing, but I added that. My package.xml looks like this:

<?xml version="1.0" encoding="UTF-8"?>
<package packagerversion="1.9.0" version="2.0" xmlns="http://pear.php.net/dtd/package-2.0" xmlns:tasks="http://pear.php.net/dtd/tasks-1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://pear.php.net/dtd/tasks-1.0     http://pear.php.net/dtd/tasks-1.0.xsd     http://pear.php.net/dtd/package-2.0     http://pear.php.net/dtd/package-2.0.xsd">
 <name>sfActivateablePlugin</name>
 <channel>pear.symfony-project.com</channel>
 <summary>sfActivateablePlugin allows auditing record activation/deactivation by setting up a flag, timestamp &amp; user detail fields.</summary>
 <description>The sfActivateablePlugin allows you to automatically:
    * create a `is_active` flag (or name of your choice)
    * create timestamp &amp; user detail fields (e.g. `activated_by`, `activated_at`, ...) 
    * populate timestamps &amp; user details when `is_active` flag is toggled on a record.</description>
 <lead>
  <name>Prasad Gupte</name>
  <user>prasadgupte</user>
  <email>gupteprasad@gmail.com</email>
  <active>yes</active>
 </lead>
 <date>2010-09-22</date>
 <time>19:33:09</time>
 <version>
  <release>1.0.0</release>
  <api>1.0.0</api>
 </version>
 <stability>
  <release>stable</release>
  <api>stable</api>
 </stability>
 <license uri="http://www.symfony-project.com/license">MIT license</license>
 <notes>
* First public release.
 </notes>
 <contents>
  <dir baseinstalldir="sfActivateablePlugin/" name="/">
   <file baseinstalldir="sfActivateablePlugin/" md5sum="89b09d4d48e5259a3c659dfc65b0fc52" name="config/plugin_settings.yml.sample" role="data" />
   <file baseinstalldir="sfActivateablePlugin/" md5sum="8b40522acb23552e6e31ba2416387515" name="lib/Activateable.class.php" role="php" />
   <file baseinstalldir="sfActivateablePlugin/" md5sum="926a9eb938eccc9083d2b116e50246b3" name="lib/Listener/Activateable.class.php" role="php" />
   <file baseinstalldir="sfActivateablePlugin/" md5sum="17346d33da2ea3b9d880afc71e7022fd" name="LICENSE" role="doc" />
   <file baseinstalldir="sfActivateablePlugin/" md5sum="b836dfd2f324ae4ea975842197dcf8e2" name="README" role="doc" />
  </dir>
 </contents>
 <dependencies>
  <required>
   <php>
    <min>5.2.6</min>
   </php>
   <pearinstaller>
    <min>1.4.1</min>
   </pearinstaller>
   <package>
    <name>Symfony</name>
    <channel>pear.symfony-project.org</channel>
    <min>1.4</min>
    <recommended>1.4</recommended>
   </package>
  </required>
 </dependencies>
 <phprelease />
 <changelog>
  <release>
   <version>
    <release>1.0.0</release>
    <api>1.0.0</api>
   </version>
   <stability>
    <release>stable</release>
    <api>stable</api>
   </stability>
   <date>2010-09-22</date>
   <license uri="http://www.symfony-project.com/license">MIT license</license>
   <notes>
* First public release.
   </notes>
  </release>
 </changelog>
</package>

Am I missing some tag? Or specified incorrect Symfony version? Pl help


回答1:


Figured out a couple of mistakes: 1. the package name is symfony and not Symfony 2. the max version is also required

If you use the Pear Package Manager API:

$packagexml->addPackageDepWithChannel('required', 'symfony', 'pear.symfony-project.com', '1.4', '1.4', '1.4');


来源:https://stackoverflow.com/questions/3770228/symfony-plugin-upload-error-you-must-specify-the-min-version-for-symfony

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!