{"id":46532440,"url":"https://github.com/saucebase-dev/module-installer","last_synced_at":"2026-04-25T21:06:54.161Z","repository":{"id":315481851,"uuid":"1059509483","full_name":"saucebase-dev/module-installer","owner":"saucebase-dev","description":null,"archived":false,"fork":false,"pushed_at":"2026-03-20T20:02:55.000Z","size":100,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-01T22:21:07.058Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/saucebase-dev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2025-09-18T14:38:56.000Z","updated_at":"2026-03-20T20:02:49.000Z","dependencies_parsed_at":"2026-04-01T19:04:22.795Z","dependency_job_id":null,"html_url":"https://github.com/saucebase-dev/module-installer","commit_stats":null,"previous_names":["sauce-base/module-installer","saucebase-dev/module-installer"],"tags_count":18,"template":false,"template_full_name":null,"purl":"pkg:github/saucebase-dev/module-installer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saucebase-dev%2Fmodule-installer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saucebase-dev%2Fmodule-installer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saucebase-dev%2Fmodule-installer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saucebase-dev%2Fmodule-installer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/saucebase-dev","download_url":"https://codeload.github.com/saucebase-dev/module-installer/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saucebase-dev%2Fmodule-installer/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32276669,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-25T18:29:39.964Z","status":"ssl_error","status_checked_at":"2026-04-25T18:29:32.149Z","response_time":59,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-03-06T22:17:27.574Z","updated_at":"2026-04-25T21:06:54.143Z","avatar_url":"https://github.com/saucebase-dev.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Saucebase Module Installer\n\n[![PHP Version](https://img.shields.io/badge/PHP-8.4%2B-777BB4?logo=php\u0026logoColor=white)](#requirements)\n[![Composer](https://img.shields.io/badge/Composer-2.x-885630?logo=composer\u0026logoColor=white)](#requirements)\n[![Tests](https://github.com/saucebase-dev/module-installer/actions/workflows/php.yml/badge.svg)](https://github.com/saucebase-dev/module-installer/actions/workflows/php.yml)\n[![License](https://img.shields.io/badge/License-MIT-0A7EA4)](#license)\n\nThis Composer plugin installs Sauce Base modules into the correct directory. It ships with `saucebase-dev/saucebase`, so every module that your project requires is placed where Sauce Base can find and load it. The installer stays compatible with [nWidart/laravel-modules](https://github.com/nWidart/laravel-modules) and offers a Sauce Base-focused alternative to [joshbrw/laravel-module-installer](https://github.com/joshbrw/laravel-module-installer).\n\n## How It Works\n\n- Registers a Composer installer for the module package type (defaults to `laravel-module`).\n- Installs each module inside the Sauce Base modules directory (`Modules/` by default).\n- Turns package names such as `saucebase/example-module` into StudlyCase directory names (`ExampleModule`).\n- Lets the root package override the install path with the `extra.module-dir` option.\n\n## Requirements\n\n- PHP 8.4 or newer\n- Composer 2.x\n- A project based on `saucebase-dev/saucebase` (the core already requires this plugin)\n\n## Installation\n\n`saucebase-dev/saucebase` already requires this package. When you install the core, Composer pulls in the plugin and activates it through the `Saucebase\\\\ModuleInstaller\\\\Plugin` class, so a typical Sauce Base project needs no extra configuration.\n\nNeed the installer for a different Composer project? Require it directly:\n\n```bash\ncomposer require saucebase/module-installer\n```\n\n## Configuring the Module Type\n\nThe installer registers the `laravel-module` package type by default. If your application needs a different type, declare it in the root package `extra` section:\n\n```json\n{\n    \"extra\": {\n        \"module-type\": \"saucebase-module\"\n    }\n}\n```\n\nAny modules you install must set their `composer.json` `type` to the same value.\n\n## Configuring the Install Location\n\nBy default, modules are installed under `Modules/` at the project root. You can change this by adding a `module-dir` key to your application `extra` section:\n\n```json\n{\n    \"extra\": {\n        \"module-dir\": \"MyModules\"\n    }\n}\n```\n\nWith the configuration above, a module published as `saucebase/example-module` installs to `MyModules/ExampleModule`.\n\n## Configuring Update Behaviour\n\nBy default, when you run `composer update`, the installer **merges** the new package version into\nyour existing module directory rather than replacing it. Your customised files are preserved; any\nnew files shipped in the update are added on top.\n\n| Strategy | What happens on `composer update` |\n|---|---|\n| `merge` *(default)* | Existing module files are kept. New files from the package are added. Your edits always win. |\n| `overwrite` | The module directory is replaced entirely with the new package contents. All local changes are lost. |\n\n### Keeping your customisations (default)\n\nNo configuration is needed. The `merge` strategy is active by default. Running `composer update`\nwill add any new files the package ships without touching files you have already edited.\n\n\u003e **Note:** Because your local files always take precedence, bug fixes or updates to files you have\n\u003e customised will **not** be applied automatically. To pick up an upstream change to a specific\n\u003e file, replace it manually or delete it and re-run `composer update`.\n\n### Full overwrite (CI / reproducible builds)\n\nIf you want every `composer update` to produce an exact copy of the package — discarding any\nlocal edits — set the strategy to `overwrite` in your root `composer.json`:\n\n```json\n{\n    \"extra\": {\n        \"module-update-strategy\": \"overwrite\"\n    }\n}\n```\n\nThis is recommended for CI pipelines and staging environments where reproducibility matters more\nthan preserving local changes.\n\n### Getting a completely fresh copy of a module\n\nWith the `merge` strategy (default), delete the module directory and run `composer update`:\n\n```bash\nrm -rf Modules/ExampleModule\ncomposer update vendor/example-module\n```\n\nThe installer will perform a clean install into the now-empty path.\n\n## Creating Sauce Base Modules\n\nTo ship a module that works with this installer:\n\n1. Set the package `type` in the module `composer.json` to whatever your application expects (defaults to `laravel-module`).\n2. Follow the Sauce Base module folder conventions; your module code should live inside the directory created by the installer.\n3. Ask consumers to install the module through Composer:\n\n   ```bash\n   composer require vendor/example-module\n   ```\n\n   During installation, the plugin converts the package slug into the final directory name. For example, `vendor/example-module` becomes `Modules/ExampleModule` unless `module-dir` overrides it.\n\n## Local Development\n\nClone the repository and install dependencies:\n\n```bash\ncomposer install\n```\n\nUseful scripts:\n\n- `composer test` – run the PHPUnit suite (`tests/`).\n- `./vendor/bin/pint` – apply Laravel Pint formatting (add `--test` for CI-style checks).\n- `composer validate` – verify Composer metadata.\n\n## License\n\nLicensed under the [MIT License](./LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsaucebase-dev%2Fmodule-installer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsaucebase-dev%2Fmodule-installer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsaucebase-dev%2Fmodule-installer/lists"}