Hi All,

I'm having some issues with 6.x.
Let me start but saying that I intend on helping as much as I can with this module as its very important to my organisation that this works well.

I've used many versions of the module over the years so I'm pretty familiar with it all.

Today I tried to get my head into 6-beta2.

I installed the PHP-API-Wrapper correctly with composer, no probs there.

Then, I got the same error that others are complaining about; Fatal error class not found. Interestingly when I read through the API code I can find no class in the namespace 'Brightcove\API' named 'Client' - I find a class named BrightcoveClient.

If I bypass the auto loader and whack a require_once('sites/all/libraries/PHP-API-Wrapper/brightcove.php'); in the top of the brightcove.client.php file AND change the class name to 'BrightcoveClient' then it works.

Note that I did use version 0.1 as required.

For testing purposes I'll leave it like this. I'd love some input on what is supposed to be correct here and I'll update and provide a patch. Also, maybe we could bypass libraries_load? I'm not sure if we need to load more classes, but the API looks pretty simple to me and maybe we could just require the files when needed.

Thanks for your work on this!

Christian

Comments

cbiggins created an issue. See original summary.

tamasd’s picture

Title: Issues with composer / autoload and API Wrapper » Improve API Wrapper version detection in the Brightcove module
Version: 7.x-6.0-beta2 » 7.x-6.x-dev
Assigned: Unassigned » tamasd
Priority: Normal » Major

Hi

If you update the wrapper to 0.3 the module will work. Since the newer versions of the wrapper use PSR-4, don't forget to run composer to generate the autoload.php file. The 0.1 version indicated in the libraries' info hook is a placeholder that I left there accidentally. Sorry for the confusion.

CB’s picture

Great, thanks very much, I'll give that a try.

Would you like me to provide a patch to libs for new version?

tamasd’s picture

Status: Active » Fixed
jan.mashat’s picture

Status: Fixed » Closed (fixed)
jan.mashat’s picture

Assigned: tamasd » Unassigned