I’ve just run into a problem when trying to use a Composer package within my Sage theme (8.5.0). I’ve spent a few hours trying to work it out with no luck.
I’m just trying to use a basic Instagram PHP API package (https://packagist.org/packages/vinkla/instagram) and I keep getting the “Fatal error: Uncaught Error: Class ‘Vinkla\Instagram\Instagram’ not found” error when trying to use it.
I’ve spent a couple of hours trying to work it out. I can see the package is in my vendor directory (within the theme). I can see that the package has been added to the autoload_psr4 file. I’ve required in the autoloader. But still no luck.
Do I have to be including the autoloader in a specific theme file or something? I’m just not sure what else to try. At this stage I won’t be using Bedrock either, if that effects anything.
Any help would much appreciated