Plugins FAQ

You are currently browsing
the website for symfony 1

Visit the Symfony2 website


« Back to the Plugins Home

Signin


Forgot your password?
Create an account

Tools

Stats

advanced search

Questions

Answers

How can I create a plugin for symfony?

All you need to know is in the "Extending symfony" chapter of the symfony book. You can read it for symfony 1.0, 1.1 or 1.2.

My plugin depends on other plugins. How can I tell symfony to install all dependencies during installation?

The dependency management is only available for symfony 1.1 and up.

Here is a package.xml snippet with some dependencies:

<!-- ... -->

  <dependencies>
    <required>
      <!-- ... -->

      <package>
        <name>sfWebBrowserPlugin</name>
        <channel>plugins.symfony-project.org</channel>
        <min>1.0.0</min>
        <max>1.1.0</max>
        <exclude>1.1.0</exclude>
      </package>
      <package>
        <name>sfFeed2Plugin</name>
        <channel>plugins.symfony-project.org</channel>
        <min>0.9.4</min>
        <max>1.0.0</max>
      </package>
    </required>
  </dependencies>

<!-- ... -->

What are the conventions for the PEAR package?

When you upload a new release for a plugin, symfony inspects your package archive to extract some useful information. Most of them are contained in the package.xml file but you can embed some more information by following some conventions:

Here is a package.xml snippet with a README file and a LICENSE file:

<!-- ... -->

<contents>
  <dir name="/">
    <file role="data" name="README" />
    <file role="data" name="LICENSE" />
  </dir>

  <!-- ... -->
</contents>

<!-- ... -->

Which license for my plugin?

The symfony plugin section only lists plugins that are released under a license similar to the symfony one. This does not mean you cannot release a plugin under another license (the GPL license for example), but then, you will have to host them in your own PEAR channel.

The following licenses are accepted: MIT, BSD, LGPL, and PHP.

I've made a mistake in my PEAR package but the system don't let me re-upload it even if I delete the version before. Why?

As soon as you upload a version of your plugin on the website, someone can install it. Now, if you change a file, this user must be able to upgrade. And to be able to upgrade, symfony will look for a newer version of your plugin. So, you must release a new version by incrementing the version of the plugin.

To sum up, if you have uploaded a version that you want to "replace", delete it and re-upload a new one with a greater version number.

I've just created a plugin but I can't commit to the SVN repository. Why?

The creation of new SVN repositories are done by a bot. But the bot is a bit lazy, as he only works on the hour mark. The great news is that he works days and nights. So, be patient as you won't have to wait very long.

My request to become a developper for plugin X has been accepted but I can't commit to the SVN repository. Why?

The changes of SVN credentials are done by a bot. But the bot is a bit lazy, as he only works on the hour mark. The great news is that he works days and nights. So, be patient as you won't have to wait very long.

How can I add a changelog to my plugin?

When you upload your plugin, symfony parses the package.xml file and try to find a <changelog> section like this one:

<!-- ... -->

<changelog>
  <release>
    <version>
      <release>1.1.16</release>
      <api>1.1.0</api>
    </version>
    <stability>
      <release>stable</release>
      <api>stable</api>
    </stability>
    <date>2008-08-14</date>
    <license uri="http://www.symfony-project.org/license">MIT license</license>
    <notes>
      * someone fix that (#1234)
      * me done this
    </notes>
  </release>

  <!-- ... -->
</changelog>

How can I deprecate a plugin?

As a plugin author, you can deprecate your plugins (in the metadata section of the admin tab). You should deprecate your plugin when:

You can also add a deprecation message that will be appended to the default deprecation message. For instance if you deprecate a plugin because another one is better, you can redirect people to the new plugin: "Use the FooPlugin instead."

A deprecated plugin is still listed on the symfony website, and people can still download and install it.