Custom Plugins

If you'd like to include a plugin with your project which isn't published on Packagist you have a couple of options.

Include The Plugin In The Project Repo

If the plugin is only being used for a single project, it makes sense to keep it inside the project's git repo.

Servd won't copy arbitrary files and folders from your repo into your bundles to avoid including things like database dumps or unprocessed assets. Because of this you will need to make sure that all of your custom plugins are stored in a single directory called plugins which is located within the same directory as your composer.json file.

Once your plugin is in the right place you can update your composer.json to reference it using a relative path:

  "repositories": [
      "type": "path",
      "url": "./plugins/my-custom-plugin"

Now when you create a new bundle on Servd, ensure the path for the plugins folder is set in the project's directory mapping and composer should be able to install your plugin as expected.

Use a Separate Repo For Your Plugin

If the plugin might be used for multiple projects it makes sense to set up a private repo on GitHub or GitLab to store your plugin, and reference that from within composer.json.

You can read more about how to set that up from the official composer documentation.

If you have any trouble getting composer to authenticate with private repos, have a look over the Composer and Private Repositories troubleshooting docs.