Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Single set of framework files - HOW TO #10

Open
tedsecretsource opened this issue Oct 29, 2017 · 1 comment
Open

Single set of framework files - HOW TO #10

tedsecretsource opened this issue Oct 29, 2017 · 1 comment

Comments

@tedsecretsource
Copy link

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:

  1. Create a new folder for a new plugin
  2. Copy plugin.php, herbert.config.php, app, and composer.json
  3. Update herbert.config.php with the new values for the plugin (mostly update namespaces)
  4. Update composer.json with the new namespace
  5. 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
  6. Run composer dump-autoload from the directory of the new plugin

Your new plugin is now ready to be installed and used.

@tedmasterweb
Copy link

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…

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants