Repository navigation
Let modules ship the third-party packages the host lacks - #13
Merged
Merged
Conversation
A new dependency_policy, bundled, lets a schema-2 module on module API 1.4 declare third-party packages in composer.json. invoiceshelf-module bundle resolves them against a host release's production composer.lock, with every host package as a root replace at its locked version, so Composer reuses what the host ships, installs only what it lacks and refuses a version the host does not have. The command writes bundle/ itself (package files, a relative classmap the host reads as data, and bundle.json recording versions, licenses, host constraints per requirer, files entries and the functions they declare) and pins the result in a committed bundle.lock. The same lock writes the same bytes on every machine. Package validation checks bundle/ without running any of it and refuses incompatible licenses, Composer plugins, reserved namespaces, undeclared extensions, symlinks and stale metadata. host-provided-only modules validate exactly as before; Tasks and Projects 0.2.1 is kept as a regression fixture. The release workflow takes a host-version input for bundled modules, builds from the committed lock against that release, pins Composer and ships bundle/ next to dist/. The SDK gains its own CI.
gdarko
marked this pull request as ready for review
October 24, 2026 00:38
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a second dependency policy,
bundled(schema 2, module API 1.4), so a module can ship the third-party packages the host lacks.invoiceshelf-module bundleresolves the module's packages against a host release's productioncomposer.lock(host packages become rootreplaceentries, so Composer reuses them and refuses a version the host does not ship), writesbundle/with a relative classmap andbundle.json, and pins the result in a committedbundle.lock. Rebuilds are byte-identical.bundle/without running it: licenses, Composer plugins, reserved namespaces, declared extensions, symlinks, size, and thatbundle.jsonmatches the files.host-provided-onlyvalidates exactly as before; Tasks and Projects 0.2.1 is kept as a regression fixture.host-versioninput for bundled modules and shipsbundle/next todist/. The SDK gets its own CI.Tried against real packages: Stripe, Mollie, Braintree, Razorpay, PhpSpreadsheet, Twilio, Sentry, QuickBooks and the AWS SDK bundle; the PayPal server SDK is refused (OSL-3.0); the Google API client is over the archive limit.
Host side: InvoiceShelf
feat/bundled-dependencies. Reference module: module-helloworldfeat/bundled-dependencies.integration/3.5merges this withfeat/invoice-extension-slotsfor testing both and can go once 3.5.0 is tagged.