Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • O openapi-generator
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 3,476
    • Issues 3,476
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 402
    • Merge requests 402
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • OpenAPI Tools
  • openapi-generator
  • Merge requests
  • !6603

[php] Set required PHP version to 7.2

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Administrator requested to merge github/fork/ybelenko/6522_php_client into master Jun 09, 2020
  • Overview 0
  • Commits 15
  • Pipelines 0
  • Changes 286

Created by: ybelenko

Update PHP client package and PHPUnit to meet PHP 7.2 version. Related issue #6522 (closed)

Test results from samples/client/petstore/php/OpenAPIClient-php:

PHPUnit 8.5.5 by Sebastian Bergmann and contributors.

RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR  63 / 239 ( 26%)
RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR 126 / 239 ( 52%)
RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR 189 / 239 ( 79%)
RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR              239 / 239 (100%)

Time: 411 ms, Memory: 10.00 MB
(...)
OK, but incomplete, skipped, or risky tests!
Tests: 239, Assertions: 0, Risky: 239.
$  vendor/bin/phpunit tests
PHPUnit 8.5.5 by Sebastian Bergmann and contributors.

................................................................. 65 / 69 ( 94%)
....                                                              69 / 69 (100%)

Time: 10.88 seconds, Memory: 14.00 MB

OK (69 tests, 1110 assertions)
$  vendor/bin/php-cs-fixer fix --allow-risky=yes
Loaded config default from "/Users/ybelenko/Sites/openapi-generator/samples/client/petstore/php/OpenAPIClient-php/.php_cs".

Fixed all files in 1.370 seconds, 22.000 MB memory used

With PHPUnit 9:

$  vendor/bin/phpunit
PHPUnit 9.2.2 by Sebastian Bergmann and contributors.

RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR  63 / 239 ( 26%)
RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR 126 / 239 ( 52%)
RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR 189 / 239 ( 79%)
RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR              239 / 239 (100%)

Time: 00:00.156, Memory: 12.00 MB
(...)

OK, but incomplete, skipped, or risky tests!
Tests: 239, Assertions: 0, Risky: 239.
$  vendor/bin/phpunit tests
PHPUnit 9.2.2 by Sebastian Bergmann and contributors.

................................................................. 65 / 69 ( 94%)
....                                                              69 / 69 (100%)

Time: 00:09.746, Memory: 14.00 MB

OK (69 tests, 1111 assertions)

Tests results from samples/openapi3/client/petstore/php/OpenAPIClient-php:

$  vendor/bin/phpunit
PHPUnit 8.5.5 by Sebastian Bergmann and contributors.

RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR  63 / 227 ( 27%)
RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR 126 / 227 ( 55%)
RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR 189 / 227 ( 83%)
RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR                          227 / 227 (100%)

Time: 323 ms, Memory: 10.00 MB
(...)
OK, but incomplete, skipped, or risky tests!
Tests: 227, Assertions: 0, Risky: 227.
$  vendor/bin/phpunit tests
PHPUnit 8.5.5 by Sebastian Bergmann and contributors.

................................................................. 65 / 70 ( 92%)
.....                                                             70 / 70 (100%)

Time: 10.3 seconds, Memory: 14.00 MB

OK (70 tests, 1116 assertions)
$  vendor/bin/php-cs-fixer fix --allow-risky=yes
Loaded config default from "/Users/ybelenko/Sites/openapi-generator/samples/openapi3/client/petstore/php/OpenAPIClient-php/.php_cs".

Fixed all files in 1.438 seconds, 22.000 MB memory used

Files that were not fixed due to errors reported during linting before fixing:
   1) /Users/ybelenko/Sites/openapi-generator/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/OuterEnumIntegerDefaultValue.php
   2) /Users/ybelenko/Sites/openapi-generator/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/OuterEnumInteger.php

Fixer detects broken PHP syntax in enum models, but it's obviously not a job for this PR. Should be fixed in future.

With PHPUnit 9:

$  vendor/bin/phpunit
PHPUnit 9.2.2 by Sebastian Bergmann and contributors.

RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR  63 / 227 ( 27%)
RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR 126 / 227 ( 55%)
RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR 189 / 227 ( 83%)
RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR                          227 / 227 (100%)

Time: 00:00.154, Memory: 12.00 MB
(...)
OK, but incomplete, skipped, or risky tests!
Tests: 227, Assertions: 0, Risky: 227.
$  vendor/bin/phpunit tests
PHPUnit 9.2.2 by Sebastian Bergmann and contributors.

................................................................. 65 / 70 ( 92%)
.....                                                             70 / 70 (100%)

Time: 00:13.903, Memory: 14.00 MB

OK (70 tests, 1121 assertions)

PR checklist

  • Read the contribution guidelines.
  • If contributing template-only or documentation-only changes which will change sample output, build the project beforehand.
  • Run the shell script ./bin/generate-samples.shto update all Petstore samples related to your fix. This is important, as CI jobs will verify all generator outputs of your HEAD commit as it would merge with master. These must match the expectations made by your contribution. You may regenerate an individual generator by passing the relevant config(s) as an argument to the script, for example ./bin/generate-samples.sh bin/config/java*.
  • File the PR against the correct branch: master, 4.3.x, 5.0.x. Default: master.
  • Copy the technical committee to review the pull request if your PR is targeting a particular programming language.

cc @jebentier @dkarlovi @mandrean @jfastnacht @ackintosh @renepardon

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: github/fork/ybelenko/6522_php_client