Skip to content
Advertisement

Use composer’s autoload to load OpenTBS plugin for tinybutstrong

I am using tinybutstrong and it’s opentbs plugin. Until now I did use an explicit require of the two source files for that but I want to switch to composer with autoloading. So I want to go from this

JavaScript

to this (or something similar)

JavaScript

but that fails with the error TinyButStrong Error with plug-in 'OPENTBS_PLUGIN': no class named 'OPENTBS_PLUGIN' is found, and no function named 'tbspi_OPENTBS_PLUGIN_OnInstall' is found. So it seems composer can not load the relevant file just based on the constant’s name.

How can I get composer’s autoload to pick up the plugin file?

Advertisement

Answer

JavaScript
User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement