-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #208 from nicolas-grekas/composer-plugin
Add composer plugin to auto-install missing implementations
- Loading branch information
Showing
9 changed files
with
507 additions
and
6 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
name: Plugin | ||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
|
||
jobs: | ||
plugin: | ||
name: Plugin test with Composer ${{ matrix.composer }} | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
include: | ||
- composer: v1 | ||
- composer: v2 | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: 7.1 | ||
tools: composer:${{ matrix.composer }} | ||
|
||
- name: Check Plugin | ||
run: | | ||
mkdir /tmp/plugin | ||
# replace the relative path for the repository url with an absolute path for composer v1 compatibility | ||
jq '.repositories[0].url="'$(pwd)'"' tests/plugin/composer.json > /tmp/plugin/composer.json | ||
cd /tmp/plugin | ||
composer update | ||
composer show http-interop/http-factory-guzzle -q |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
{ | ||
"name": "php-http/discovery", | ||
"description": "Finds installed HTTPlug implementations and PSR-7 message factories", | ||
"description": "Finds and installs PSR-7, PSR-17, PSR-18 and HTTPlug implementations", | ||
"type": "composer-plugin", | ||
"license": "MIT", | ||
"keywords": ["http", "discovery", "client", "adapter", "message", "factory", "psr7", "psr17"], | ||
"homepage": "http://php-http.org", | ||
|
@@ -10,19 +11,25 @@ | |
"email": "[email protected]" | ||
} | ||
], | ||
"provide": { | ||
"php-http/async-client-implementation": "*", | ||
"php-http/client-implementation": "*", | ||
"psr/http-client-implementation": "*", | ||
"psr/http-factory-implementation": "*", | ||
"psr/http-message-implementation": "*" | ||
}, | ||
"require": { | ||
"php": "^7.1 || ^8.0" | ||
"php": "^7.1 || ^8.0", | ||
"composer-plugin-api": "^1.0|^2.0" | ||
}, | ||
"require-dev": { | ||
"composer/composer": "^1.0.2|^2.0", | ||
"graham-campbell/phpspec-skip-example-extension": "^5.0", | ||
"php-http/httplug": "^1.0 || ^2.0", | ||
"php-http/message-factory": "^1.0", | ||
"phpspec/phpspec": "^5.1 || ^6.1 || ^7.3", | ||
"symfony/phpunit-bridge": "^6.2" | ||
}, | ||
"suggest": { | ||
"php-http/message": "Allow to use Guzzle, Diactoros or Slim Framework factories" | ||
}, | ||
"autoload": { | ||
"psr-4": { | ||
"Http\\Discovery\\": "src/" | ||
|
@@ -40,6 +47,9 @@ | |
], | ||
"test-ci": "vendor/bin/phpspec run -c phpspec.ci.yml" | ||
}, | ||
"extra": { | ||
"class": "Http\\Discovery\\Composer\\Plugin" | ||
}, | ||
"conflict": { | ||
"nyholm/psr7": "<1.0" | ||
}, | ||
|
Oops, something went wrong.