fallcool
fallcool

Reputation: 53

symfony plugin install namespace error

I created a new symfony 2 project using 2.7. When I try to install a plugin using command line "symfony plugin:install sfFormExtraPlugin", I got an error:

 "[InvalidArgumentException] 
There are no commands defined in the "plugin" namespace.".

When I type "symfony list", I got "

Available commands:
 about         Symfony Installer Help.
 demo          Creates a demo Symfony project.
 help          Displays help for a command
 list          Lists commands
 new           Creates a new Symfony project.
 self-update   Update the installer to the latest version.
 selfupdate    Update the installer to the latest version.

". no plugin or other command like "cache" etc. What should I do? Thanks!

Upvotes: 0

Views: 268

Answers (1)

hanzi
hanzi

Reputation: 2987

sfFormExtraPlugin is a plugin for Symfony 1 and won’t work with Symfony 2.*

Also, the symfony command line tool in Symfony 2 is not meant for application commands anymore but for creating new projects/installing Symfony. The new command line tool for application commands is app/console (which you use like php app/console something:something.)

But even then, this command isn’t used for managing dependencies (like plugins) anymore. We use composer for that instead. That’s a powerful package manager for PHP that can install and update the packages you require and also make sure that they are compatible. And it is not limited to the Symfony world.

Upvotes: 2

Related Questions