Skip to content

Commit

Permalink
[php] Set required PHP 7.1 in code comments and readme (#6188)
Browse files Browse the repository at this point in the history
* Bump PHP version to 7.1 in readme

* Bump PHP version to 7.1 in class templates

* Remove HHVM from Travis CI config

PHPUnit dropped support of hhvm, so build unlikely will pass tests.
sebastianbergmann/phpunit#3320 (comment)

* Remove sudo: false from Travis-CI config

Official doc recommendation:
https://docs.travis-ci.com/user/reference/trusty/#container-based-infrastructure

* Change tested versions to 7.1, 7.2 in Travis-CI

* Remove PHP_CodeSniffer from dev dependencies

There is another linter(PHP CS Fixer) which is fully configured while
CodeSniffer isn't configured at all.

* Use caret instead of tilde in dependencies

^2.12 equals (>= 2.12.0 && <3.0.0) while ~2.12 is (>=2.12.0 && <2.13.0)

* Refresh samples
  • Loading branch information
ybelenko authored May 8, 2020
1 parent 577ebb6 commit 8c6236b
Show file tree
Hide file tree
Showing 248 changed files with 254 additions and 269 deletions.
8 changes: 2 additions & 6 deletions modules/openapi-generator/src/main/resources/php/.travis.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
language: php
sudo: false
php:
- 5.4
- 5.5
- 5.6
- 7.0
- hhvm
- 7.1
- 7.2
before_install: "composer install"
script: "vendor/bin/phpunit"
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/**
* ApiException
* PHP version 5
* PHP version 7.1
*
* @category Class
* @package {{invokerPackage}}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/**
* Configuration
* PHP version 5
* PHP version 7.1
*
* @category Class
* @package {{invokerPackage}}
Expand All @@ -20,7 +20,7 @@ namespace {{invokerPackage}};

/**
* Configuration Class Doc Comment
* PHP version 5
* PHP version 7.1
*
* @category Class
* @package {{invokerPackage}}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/**
* ApiException
* PHP version 5
* PHP version 7.1
*
* @category Class
* @package {{invokerPackage}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/**
* ModelInterface
*
* PHP version 5
* PHP version 7.1
*
* @category Class
* @package {{modelPackage}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/**
* ObjectSerializer
*
* PHP version 5
* PHP version 7.1
*
* @category Class
* @package {{invokerPackage}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ For more information, please visit [{{{infoUrl}}}]({{{infoUrl}}})

## Requirements

PHP 5.5 and later
PHP 7.1 and later

## Installation & Usage

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/**
* {{classname}}
* PHP version 5
* PHP version 7.1
*
* @category Class
* @package {{invokerPackage}}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/**
* {{classname}}Test
* PHP version 5
* PHP version 7.1
*
* @category Class
* @package {{invokerPackage}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@
},
"require-dev": {
"phpunit/phpunit": "^7.4",
"squizlabs/php_codesniffer": "~2.6",
"friendsofphp/php-cs-fixer": "~2.12"
"friendsofphp/php-cs-fixer": "^2.12"
},
"autoload": {
"psr-4": { "{{escapedInvokerPackage}}\\" : "{{srcBasePath}}/" }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
/**
* {{classname}}
*
* PHP version 5
* PHP version 7.1
*
* @category Class
* @package {{invokerPackage}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
/**
* {{classname}}Test
*
* PHP version 5
* PHP version 7.1
*
* @category Class
* @package {{invokerPackage}}
Expand Down
8 changes: 2 additions & 6 deletions samples/client/petstore/php/OpenAPIClient-php/.travis.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
language: php
sudo: false
php:
- 5.4
- 5.5
- 5.6
- 7.0
- hhvm
- 7.1
- 7.2
before_install: "composer install"
script: "vendor/bin/phpunit"
2 changes: 1 addition & 1 deletion samples/client/petstore/php/OpenAPIClient-php/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ This PHP package is automatically generated by the [OpenAPI Generator](https://o

## Requirements

PHP 5.5 and later
PHP 7.1 and later

## Installation & Usage

Expand Down
3 changes: 1 addition & 2 deletions samples/client/petstore/php/OpenAPIClient-php/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@
},
"require-dev": {
"phpunit/phpunit": "^7.4",
"squizlabs/php_codesniffer": "~2.6",
"friendsofphp/php-cs-fixer": "~2.12"
"friendsofphp/php-cs-fixer": "^2.12"
},
"autoload": {
"psr-4": { "OpenAPI\\Client\\" : "lib/" }
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/**
* AnotherFakeApi
* PHP version 5
* PHP version 7.1
*
* @category Class
* @package OpenAPI\Client
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/**
* FakeApi
* PHP version 5
* PHP version 7.1
*
* @category Class
* @package OpenAPI\Client
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/**
* FakeClassnameTags123Api
* PHP version 5
* PHP version 7.1
*
* @category Class
* @package OpenAPI\Client
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/**
* PetApi
* PHP version 5
* PHP version 7.1
*
* @category Class
* @package OpenAPI\Client
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/**
* StoreApi
* PHP version 5
* PHP version 7.1
*
* @category Class
* @package OpenAPI\Client
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/**
* UserApi
* PHP version 5
* PHP version 7.1
*
* @category Class
* @package OpenAPI\Client
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/**
* ApiException
* PHP version 5
* PHP version 7.1
*
* @category Class
* @package OpenAPI\Client
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/**
* Configuration
* PHP version 5
* PHP version 7.1
*
* @category Class
* @package OpenAPI\Client
Expand Down Expand Up @@ -30,7 +30,7 @@

/**
* Configuration Class Doc Comment
* PHP version 5
* PHP version 7.1
*
* @category Class
* @package OpenAPI\Client
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/**
* ApiException
* PHP version 5
* PHP version 7.1
*
* @category Class
* @package OpenAPI\Client
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/**
* AdditionalPropertiesAnyType
*
* PHP version 5
* PHP version 7.1
*
* @category Class
* @package OpenAPI\Client
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/**
* AdditionalPropertiesArray
*
* PHP version 5
* PHP version 7.1
*
* @category Class
* @package OpenAPI\Client
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/**
* AdditionalPropertiesBoolean
*
* PHP version 5
* PHP version 7.1
*
* @category Class
* @package OpenAPI\Client
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/**
* AdditionalPropertiesClass
*
* PHP version 5
* PHP version 7.1
*
* @category Class
* @package OpenAPI\Client
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/**
* AdditionalPropertiesInteger
*
* PHP version 5
* PHP version 7.1
*
* @category Class
* @package OpenAPI\Client
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/**
* AdditionalPropertiesNumber
*
* PHP version 5
* PHP version 7.1
*
* @category Class
* @package OpenAPI\Client
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/**
* AdditionalPropertiesObject
*
* PHP version 5
* PHP version 7.1
*
* @category Class
* @package OpenAPI\Client
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/**
* AdditionalPropertiesString
*
* PHP version 5
* PHP version 7.1
*
* @category Class
* @package OpenAPI\Client
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/**
* Animal
*
* PHP version 5
* PHP version 7.1
*
* @category Class
* @package OpenAPI\Client
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/**
* ApiResponse
*
* PHP version 5
* PHP version 7.1
*
* @category Class
* @package OpenAPI\Client
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/**
* ArrayOfArrayOfNumberOnly
*
* PHP version 5
* PHP version 7.1
*
* @category Class
* @package OpenAPI\Client
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/**
* ArrayOfNumberOnly
*
* PHP version 5
* PHP version 7.1
*
* @category Class
* @package OpenAPI\Client
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/**
* ArrayTest
*
* PHP version 5
* PHP version 7.1
*
* @category Class
* @package OpenAPI\Client
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/**
* BigCat
*
* PHP version 5
* PHP version 7.1
*
* @category Class
* @package OpenAPI\Client
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/**
* BigCatAllOf
*
* PHP version 5
* PHP version 7.1
*
* @category Class
* @package OpenAPI\Client
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/**
* Capitalization
*
* PHP version 5
* PHP version 7.1
*
* @category Class
* @package OpenAPI\Client
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/**
* Cat
*
* PHP version 5
* PHP version 7.1
*
* @category Class
* @package OpenAPI\Client
Expand Down
Loading

0 comments on commit 8c6236b

Please sign in to comment.