Skip to content

Commit

Permalink
Merge pull request #99 from dariobmf/feature/support-php81
Browse files Browse the repository at this point in the history
Support PHP 8 in composer.json
  • Loading branch information
vsouz4 authored Oct 17, 2023
2 parents a78e5ea + ca93a0c commit 1d058ba
Show file tree
Hide file tree
Showing 12 changed files with 315 additions and 199 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## [10.2.0] - 2023.10.17
### Added
- Added support for PHP 8

## [10.1.5] - 2023.09.15
### Fixed
- Added missing null check for optional nullable object mapping
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"ext-json": "*",
"ext-xml": "*",
"cebe/php-openapi": "^1.4",
"docler-labs/api-client-exception": "^1.0.1",
"docler-labs/api-client-exception": "^1.0.1 || ^2.0",
"friendsofphp/php-cs-fixer": "^2.16",
"guzzlehttp/psr7": "^1.6",
"icecave/parity": "^3.0",
Expand All @@ -38,7 +38,7 @@
"mikey179/vfsstream": "^1.6",
"php-coveralls/php-coveralls": "^2.2",
"phpstan/phpstan": "^0.12.32",
"phpunit/phpunit": "^9.2",
"phpunit/phpunit": "^9.5",
"roave/security-advisories": "dev-latest",
"symfony/filesystem": "^5.1"
},
Expand Down
448 changes: 280 additions & 168 deletions composer.lock

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions example/PetStoreClient/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@
"sort-packages": true
},
"require": {
"php": ">=7.4",
"docler-labs/api-client-exception": "^1.0|^2.0",
"php": "^7.4 || ^8.0",
"docler-labs/api-client-exception": "^1.0 || ^2.0",
"ext-dom": "*",
"ext-json": "*",
"guzzlehttp/psr7": "^1.6|^2.0",
"pimple/pimple": "^3.3",
"psr/container": "^1.0",
"guzzlehttp/psr7": "^1.6 || ^2.6",
"pimple/pimple": "^3.5",
"psr/container": "^1.0 || ^2.0",
"psr/http-client": "^1.0"
},
"autoload": {
Expand Down
2 changes: 1 addition & 1 deletion src/Generator/Implementation/Container/PimpleContainer.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public function getContainerRegisterImports(): array
public function getPackages(): array
{
return [
'pimple/pimple' => '^3.3',
'pimple/pimple' => '^3.5',
];
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public function getRequestMapperClassName(): string
public function getPackages(): array
{
return [
'guzzlehttp/psr7' => '^1.6|^2.0',
'guzzlehttp/psr7' => '^1.6 || ^2.6',
];
}

Expand Down
4 changes: 2 additions & 2 deletions src/Meta/ComposerJsonTemplate.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ public function render(Specification $specification, MetaFileCollection $fileReg
private function getCommonPackages(): array
{
return [
'docler-labs/api-client-exception' => '^1.0|^2.0',
'psr/container' => '^1.0',
'docler-labs/api-client-exception' => '^1.0 || ^2.0',
'psr/container' => '^1.0 || ^2.0',
'psr/http-client' => '^1.0',
];
}
Expand Down
2 changes: 1 addition & 1 deletion template/composer.json.twig
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"sort-packages": true
},
"require": {
"php": ">={{ phpVersion }}",
"php": "^{{ phpVersion }} || ^8.0",
{% for package, version in packages -%}
"{{ package }}": "{{ version }}"{%- if not loop.last -%},{% endif %}

Expand Down
10 changes: 5 additions & 5 deletions test/suite/functional/Meta/ComposerJson/composer_default.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@
"sort-packages": true
},
"require": {
"php": ">=7.4",
"docler-labs/api-client-exception": "^1.0|^2.0",
"php": "^7.4 || ^8.0",
"docler-labs/api-client-exception": "^1.0 || ^2.0",
"ext-json": "*",
"guzzlehttp/psr7": "^1.6|^2.0",
"pimple/pimple": "^3.3",
"psr/container": "^1.0",
"guzzlehttp/psr7": "^1.6 || ^2.6",
"pimple/pimple": "^3.5",
"psr/container": "^1.0 || ^2.0",
"psr/http-client": "^1.0"
},
"autoload": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@
"sort-packages": true
},
"require": {
"php": ">=7.4",
"docler-labs/api-client-exception": "^1.0|^2.0",
"php": "^7.4 || ^8.0",
"docler-labs/api-client-exception": "^1.0 || ^2.0",
"ext-json": "*",
"guzzlehttp/psr7": "^1.6|^2.0",
"pimple/pimple": "^3.3",
"psr/container": "^1.0",
"guzzlehttp/psr7": "^1.6 || ^2.6",
"pimple/pimple": "^3.5",
"psr/container": "^1.0 || ^2.0",
"psr/http-client": "^1.0"
},
"autoload": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@
"sort-packages": true
},
"require": {
"php": ">=7.4",
"docler-labs/api-client-exception": "^1.0|^2.0",
"php": "^7.4 || ^8.0",
"docler-labs/api-client-exception": "^1.0 || ^2.0",
"ext-json": "*",
"nyholm/psr7": "^1.3",
"pimple/pimple": "^3.3",
"psr/container": "^1.0",
"pimple/pimple": "^3.5",
"psr/container": "^1.0 || ^2.0",
"psr/http-client": "^1.0"
},
"autoload": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@
"sort-packages": true
},
"require": {
"php": ">=7.4",
"docler-labs/api-client-exception": "^1.0|^2.0",
"php": "^7.4 || ^8.0",
"docler-labs/api-client-exception": "^1.0 || ^2.0",
"ext-intl": "*",
"ext-json": "*",
"guzzlehttp/psr7": "^1.6|^2.0",
"pimple/pimple": "^3.3",
"psr/container": "^1.0",
"guzzlehttp/psr7": "^1.6 || ^2.6",
"pimple/pimple": "^3.5",
"psr/container": "^1.0 || ^2.0",
"psr/http-client": "^1.0"
},
"autoload": {
Expand Down

0 comments on commit 1d058ba

Please sign in to comment.