If you ever tried to create your own plugin and got an error message similar to the following; “Uncaught exception ‘InvalidArgumentException’ with message ‘The plugin “myPlugin” does not exist.’ it’s because you didn’t name your plugin folder correctly.

Consider the following:





When I was googling for the cause of the above exception there were no readily available answers, even via Symfony’s docs for plug-ins. All I could find via Symfony’s site about the plug-ins was a blurb about the difference between Private and Public plug-ins, but now how to manage private plug-ins.

So, not being able to find the issue via google, I checked the source code and found that in line #482 of /lib/config/sfProjectConfiguration.class.php there is the following code:

$finder = sfFinder::type('dir')->maxdepth(0)->ignore_version_control(false)->follow_link()->name('*Plugin');

This line is forcing you, when you create a private plug-in, to append the word Plugin to your actual plugin name (directory) as mentioned above in the “good” example. I am not sure why the Symfony devs are forcing us to append Plugin when the directory is clearly namespacing plugins for us.

Hopefully this helps anyone else who had to jump down this rabbit hole.