Skip to content

Commit

Permalink
Documentation for override-download-url-method
Browse files Browse the repository at this point in the history
  • Loading branch information
asgrim committed Feb 4, 2025
1 parent 4769382 commit 98be69f
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
14 changes: 14 additions & 0 deletions docs/extension-maintainers.md
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,20 @@ The `build-path` may contain some templated values which are replaced:
with version 1.2.3 with a `build-path` of `myext-{version}` the actual build
path would become `myext-{version}`.

#### `override-download-url-method`

The `override-download-url-method` directive allows extension maintainers to
change the behaviour of downloading the source package.

* Setting this to `composer-default`, which is the default value if not
specified, will use the default behaviour implemented by Composer, which is
to use the standard ZIP archive from the GitHub API (or other source control
system).
* Using `pre-packaged-source` will locate a source code package in the release
assets list based matching one of the following naming conventions:
* `php_{ExtensionName}-{Version}-src.tgz` (e.g. `php_myext-1.20.1-src.tgz`)
* `php_{ExtensionName}-{Version}-src.zip` (e.g. `php_myext-1.20.1-src.zip`)

### Extension dependencies

Extension authors may define some dependencies in `require`, but practically,
Expand Down
2 changes: 1 addition & 1 deletion resources/composer-json-php-ext-schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
"override-download-url-method": {
"type": "string",
"description": "If specified, this technique will be used to override the URL that PIE uses to download the asset. The default, if not specified, is composer-default.",
"enum": ["composer-default", "override-download-url-method"],
"enum": ["composer-default", "pre-packaged-source"],
"example": "composer-default"
},
"os-families": {
Expand Down

0 comments on commit 98be69f

Please sign in to comment.