Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PHP] Bump minimum required version to PHP7.1 #1491

Merged
merged 14 commits into from
Nov 26, 2018

Conversation

ackintosh
Copy link
Contributor

@ackintosh ackintosh commented Nov 19, 2018

PR checklist

  • Read the contribution guidelines.
  • Ran the shell script under ./bin/ to update Petstore sample so that CIs can verify the change. (For instance, only need to run ./bin/{LANG}-petstore.sh and ./bin/security/{LANG}-petstore.sh if updating the {LANG} (e.g. php, ruby, python, etc) code generator or {LANG} client's mustache templates). Windows batch files can be found in .\bin\windows\.
  • Filed the PR against the correct branch: master, 3.4.x, 4.0.x. Default: master.
  • Copied the technical committee to review the pull request if your PR is targeting a particular programming language.

Description of the PR

Related issue: PHP 5.x reaches the end of life by the end of 2018 · Issue #1246 · OpenAPITools/openapi-generator

What I do in this PR :
  • Bump minimum required version to PHP7.1 from 5.6
  • Update phpunit version
    • Update tests accordingly

@ackintosh ackintosh changed the base branch from master to 4.0.x November 19, 2018 06:12
@ackintosh ackintosh added this to the 4.0.0 milestone Nov 19, 2018
@ackintosh
Copy link
Contributor Author

The tests in "samples/openapi3" has passed

The result of tests phpunit "test" folder (auto-generated tests)

Note: All tests are regarded as risky tests as the generated tests have no assertiions.

vendor/bin/phpunit test/
PHPUnit 7.4.4 by Sebastian Bergmann and contributors.

RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR  63 / 201 ( 31%)
RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR 126 / 201 ( 62%)
RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR 189 / 201 ( 94%)
RRRRRRRRRRRR                                                    201 / 201 (100%)

Time: 118 ms, Memory: 8.00MB

There were 201 risky tests:

...
...
OK, but incomplete, skipped, or risky tests!
Tests: 201, Assertions: 0, Risky: 201.

The result of phpunit under "tests" folder

All green 💚

$ cd samples/openapi3/client/petstore/php/OpenAPIClient-php
$ vendor/bin/phpunit tests/

PHPUnit 7.4.4 by Sebastian Bergmann and contributors.

................................................................. 65 / 66 ( 98%)
.                                                                 66 / 66 (100%)

Time: 13.51 seconds, Memory: 28.00MB

OK (66 tests, 4705 assertions)

@ackintosh ackintosh force-pushed the bump-to-php71 branch 2 times, most recently from f141dbb to 2724fc5 Compare November 19, 2018 14:33
@ackintosh
Copy link
Contributor Author

@jebentier (2017/07) @dkarlovi (2017/07) @mandrean (2017/08) @jfastnacht (2017/09) @ackintosh (2017/09) @ybelenko (2018/07)

@ackintosh ackintosh removed the WIP Work in Progress label Nov 24, 2018
Copy link
Member

@wing328 wing328 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM (but I've not tested it locally in my machine)

@ackintosh ackintosh merged commit 34abede into OpenAPITools:4.0.x Nov 26, 2018
@ackintosh ackintosh deleted the bump-to-php71 branch November 26, 2018 01:59
A-Joshi pushed a commit to ihsmarkitoss/openapi-generator that referenced this pull request Feb 27, 2019
* Bump minimum required version to PHP7.1

ref: http://php.net/supported-versions.php

* Bump phpunit

* Update [api|model]_test.mustache

* Update samples

bin/openapi3/php-petstore.sh

* Update namespace of PHPUnit ("tests" folder)

* `setExpectedException` is deleted in PHPUnit 7.4

* Update namespace of "Assert" class

* The attribute 'name' is required

* Add anotation to exclude the test from risky testcheck

* Update samples (samples/client/petstore/php)

* Apply updates to "test" in openapi2 folder (samples/client/petstore/php)

OpenAPITools@b3495ec
OpenAPITools@15e00ae
OpenAPITools@2fc6917
OpenAPITools@0d016c0

* Install php7.1

* Switch to php7

* Update samples (security)

bin/security/php-petstore.sh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants