Skip to content

Single set of framework files - HOW TO #10

@tedsecretsource

Description

@tedsecretsource

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions