schivei / azure-artifacts
Composer plugin for Azure Artifacts Universal Packages
Package info
github.com/schivei/azure-artifacts
Type:composer-plugin
pkg:composer/schivei/azure-artifacts
Requires
- php: >=7.2
- composer-plugin-api: ^2.0
Requires (Dev)
- composer/composer: ^2.0
- phpunit/phpunit: ^8.5 || ^11.5 || ^13.4
Suggests
None
Provides
None
Conflicts
None
Replaces
None
README
Composer 2 plugin for installing Azure Artifacts Universal Packages (UPack) with Azure CLI.
Installation
Install the plugin globally for Composer projects on the same machine:
composer global require schivei/azure-artifacts
Alternatively, install it in one Composer consumer project:
cd /path/to/consumer-project
composer require schivei/azure-artifacts
The plugin requires Composer 2 and Azure CLI. Authenticate with az login for interactive use, or set AZURE_DEVOPS_EXT_PAT to a valid Azure DevOps PAT in CI/CD. Never commit PAT credentials.
Composer configuration
{
"extra": {
"azure-upack": {
"organization": "https://dev.azure.com/your-organization",
"feed": "your-feed",
"vendor": "your-vendor",
"project": "your-project"
}
},
"require": {
"schivei/azure-artifacts": "^0.0",
"your-vendor/your-package": "^1.0"
}
}
The project key is optional. Organization-level feeds omit it.
Multiple feeds are supported with a list:
{
"extra": {
"azure-upack": [
{
"organization": "https://dev.azure.com/your-organization",
"feed": "organization-feed",
"vendor": "organization-vendor"
},
{
"organization": "https://dev.azure.com/your-organization",
"feed": "project-feed",
"project": "your-project",
"vendor": "project-vendor"
}
]
}
}
Composer validates extra.azure-upack instead of rejecting an unknown custom repositories[].type. The plugin registers each configured feed during activation. Package discovery is performed by Azure CLI and packages are restored into vendor/<vendor>/<package>.
Authentication
Authenticate interactively with az login, or set AZURE_DEVOPS_EXT_PAT in CI/CD. Never commit organization-specific values or PAT secrets to source control.
Development
PHPUnit is resolved by PHP compatibility: PHPUnit 8.5 for PHP 7.2, PHPUnit 11 for PHP 8.2+, and PHPUnit 13 for PHP 8.4+. The same PHPUnit test suite runs in all supported CI matrix variants.
composer install composer validate --strict php vendor/bin/phpunit
The GitHub Actions test workflow runs the suite through Docker for PHP 7.2 and PHP 8.4+, and natively on Windows for both versions. Publish workflows create GitHub Releases from semantic tags; Packagist updates can be handled by a GitHub webhook.