Tech Notes

Install Symfony Plugins Manually

When PEAR won't cooperate, you can install a Symfony 1.x plugin by hand. Here are the steps, using sfPhpExcelPlugin as an example.

A problem with the PEAR installation on my laptop meant I couldn’t install Symfony plugins. In the end, I solved it by installing the plugin manually. Here are the steps, using the Symfony Excel reader plugin (sfPhpExcelPlugin) as an example.

  1. Download the plugin from the Symfony plugins site.

  2. Unzip the files and copy the folder into your project’s plugins/ folder, naming it sfPhpExcelPlugin.

  3. Enable the plugin in config/ProjectConfiguration.class.php, for example:

    $this->enablePlugins(array('sfDoctrinePlugin', 'sfPhpExcelPlugin'));
  4. Finally, run the following command to publish the plugin’s assets:

    php symfony plugin:publish-assets