PyroCMS ReflectionException Error When Installing Add-on

July 25, 2017

The Error

If you're trying to install an addon in PyroCMS 3 and are receiving an ReflectionException in your Laravel logs, you are likely installing your module under an incorrect file path. I was recently trying to install the (PyroCMS 3 Streams Module)[https://store.pyrocms.com/streams-module.html] and got a ReflectionException error when I coped the files to my 'addons' folder. Here's what the error looked like.

[ReflectionException] Class StreamsModule\Igrations\Igrations does not exist

The Fix

The first thing that tipped me off was the misspellings in the error's description text. "Igrations" is clearly meant to me "Migrations," but something was changing the path. So, I looked back through the documentation. Here's what you need:

Make sure you add your downloaded add-on to this path:

/addons/[APPLICATION_REF]/[VENDOR]/[ADDON_FOLDER]

For example, the Streams Module would need to reside at this location:

/addons/default/anomaly/sites-module

If you are wanting to share this module with multiple sites, the Streams Module would need to reside at this location:

/addons/shared/anomaly/sites-module

That's It

Just a little more knowledge about where to put those add-ons in your PyroCMS 3 installation.