Skip to content

Commit 1c6de73

Browse files
authored
Merge pull request #56 from DoclerLabs/fix-virtual-package-dependency
replace virtual pkg with suggest
2 parents 9f33533 + 86f2fc4 commit 1c6de73

File tree

9 files changed

+82
-62
lines changed

9 files changed

+82
-62
lines changed

CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
55
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
66

7+
## [7.2.0] - 2021-09-24
8+
### Removed
9+
- Remove virtual package dependency (psr/http-client-implementation)
10+
711
## [7.1.1] - 2021-09-09
812
### Fixed
913
- Changed default php-cs-fixer configuration to add blank line after opening tag, according to PSR12

README.md

+1-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ API client generator is a console application capable of auto-generating a [PSR1
99
## Requirements
1010
- OpenAPI >= 3.0
1111
- PHP >= 7.0
12-
- [PSR-18 base client](https://packagist.org/providers/psr/http-client-implementation)
1312

1413
## Why using it?
1514
- With generated client you are always sure that your OpenAPI specification is up-to-date.
@@ -29,7 +28,7 @@ API client generator is a console application capable of auto-generating a [PSR1
2928
* application/x-www-form-urlencoded
3029
* application/xml
3130
- Supports new PHP versions synthax features.
32-
- It is base client independent, you are free to choose any [existing PSR-18 compliant client](https://packagist.org/providers/psr/http-client-implementation). Just choose the one which you already use, so generated client would not cause conflicts in your dependencies.
31+
- It is base client independent, you are free to choose any [existing PSR-18 compliant client](https://packagist.org/providers/psr/http-client-implementation). Just choose the one which you already use, so generated client would not cause any conflicts with your dependencies. Although not recommended, you can also use or build your own PSR-18 implementation, as the generated client depends on PSR interfaces only.
3332
- Applies code style rules to generated code, you can specify your own.
3433
- Generates README and composer.json files with possibility to use your own template.
3534
- Supports `allOf` OpenAPI parameter.

example/composer.lock

+48-46
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

example/gen/composer.json

+6-3
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,15 @@
1515
"guzzlehttp/psr7": "^1.6",
1616
"pimple/pimple": "^3.3",
1717
"psr/container": "^1.0",
18-
"psr/http-client": "^1.0",
19-
"psr/http-client-implementation": "^1.0"
18+
"psr/http-client": "^1.0"
2019
},
2120
"autoload": {
2221
"psr-4": {
2322
"OpenApi\\PetStoreClient\\": "src/"
2423
}
24+
},
25+
"suggest": {
26+
"guzzlehttp/guzzle": "PSR-18 provided by Guzzle 7",
27+
"php-http/guzzle6-adapter": "PSR-18 wrapper for Guzzle 6"
2528
}
26-
}
29+
}

src/Meta/ComposerJsonTemplate.php

-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,6 @@ private function getCommonPackages(): array
6666
'ext-intl' => '*',
6767
'psr/container' => '^1.0',
6868
'psr/http-client' => '^1.0',
69-
'psr/http-client-implementation' => '^1.0',
7069
];
7170
}
7271
}

template/composer.json.twig

+5-1
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,9 @@
2121
"psr-4": {
2222
"{{ addslashes(namespace) }}\\": "src/"
2323
}
24+
},
25+
"suggest": {
26+
"guzzlehttp/guzzle": "PSR-18 provided by Guzzle 7",
27+
"php-http/guzzle6-adapter": "PSR-18 wrapper for Guzzle 6"
2428
}
25-
}
29+
}

test/suite/functional/Meta/ComposerJson/composer_default.json

+6-3
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,15 @@
1414
"guzzlehttp/psr7": "^1.6",
1515
"pimple/pimple": "^3.3",
1616
"psr/container": "^1.0",
17-
"psr/http-client": "^1.0",
18-
"psr/http-client-implementation": "^1.0"
17+
"psr/http-client": "^1.0"
1918
},
2019
"autoload": {
2120
"psr-4": {
2221
"Test\\": "src/"
2322
}
23+
},
24+
"suggest": {
25+
"guzzlehttp/guzzle": "PSR-18 provided by Guzzle 7",
26+
"php-http/guzzle6-adapter": "PSR-18 wrapper for Guzzle 6"
2427
}
25-
}
28+
}

test/suite/functional/Meta/ComposerJson/composer_guzzle_message.json

+6-3
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,15 @@
1414
"guzzlehttp/psr7": "^1.6",
1515
"pimple/pimple": "^3.3",
1616
"psr/container": "^1.0",
17-
"psr/http-client": "^1.0",
18-
"psr/http-client-implementation": "^1.0"
17+
"psr/http-client": "^1.0"
1918
},
2019
"autoload": {
2120
"psr-4": {
2221
"Test\\": "src/"
2322
}
23+
},
24+
"suggest": {
25+
"guzzlehttp/guzzle": "PSR-18 provided by Guzzle 7",
26+
"php-http/guzzle6-adapter": "PSR-18 wrapper for Guzzle 6"
2427
}
25-
}
28+
}

test/suite/functional/Meta/ComposerJson/composer_nyholm_message.json

+6-3
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,15 @@
1414
"nyholm/psr7": "^1.3",
1515
"pimple/pimple": "^3.3",
1616
"psr/container": "^1.0",
17-
"psr/http-client": "^1.0",
18-
"psr/http-client-implementation": "^1.0"
17+
"psr/http-client": "^1.0"
1918
},
2019
"autoload": {
2120
"psr-4": {
2221
"Test\\": "src/"
2322
}
23+
},
24+
"suggest": {
25+
"guzzlehttp/guzzle": "PSR-18 provided by Guzzle 7",
26+
"php-http/guzzle6-adapter": "PSR-18 wrapper for Guzzle 6"
2427
}
25-
}
28+
}

0 commit comments

Comments
 (0)