You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The documentation is missing an explicit example for when you want to use a single set of Framework files for multiple plugins.
The steps required to make this work are:
Create a new folder for a new plugin
Copy plugin.php, herbert.config.php, app, and composer.json
Update herbert.config.php with the new values for the plugin (mostly update namespaces)
Update composer.json with the new namespace
Modify plugin.php. Update the path for vendor/getherbert/framework/bootstrap/autoload.php so that it points to the path where the framework files are installed. In my case, the framework is in another plugin so I'm using /../my-master-plugin/vendor/getherbert/framework/bootstrap/autoload.php
Run composer dump-autoload from the directory of the new plugin
Your new plugin is now ready to be installed and used.
The text was updated successfully, but these errors were encountered:
Also, I found that I needed to remove the second require_once statement in plugin.php. Oddly, if I had 3 or more plugins relying on the same framework files, if I left the require_once statement in place, I would get a 500 error. Would love to know why…
Summary
The documentation is missing an explicit example for when you want to use a single set of Framework files for multiple plugins.
The steps required to make this work are:
vendor/getherbert/framework/bootstrap/autoload.php
so that it points to the path where the framework files are installed. In my case, the framework is in another plugin so I'm using/../my-master-plugin/vendor/getherbert/framework/bootstrap/autoload.php
composer dump-autoload
from the directory of the new pluginYour new plugin is now ready to be installed and used.
The text was updated successfully, but these errors were encountered: