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] Can't run composer install when running PHP >= 7.2 #8533

Closed
mattmelling opened this issue Aug 4, 2018 · 2 comments · Fixed by #8534
Closed

[PHP] Can't run composer install when running PHP >= 7.2 #8533

mattmelling opened this issue Aug 4, 2018 · 2 comments · Fixed by #8534

Comments

@mattmelling
Copy link
Contributor

Description

I'm unable to install generated PHP clients on a system running PHP v7.2.8.

Swagger-codegen version

2.4.0-SNAPSHOT, built from latest sources (dbd0a4b).

Swagger declaration file content or url

Petstore example.

Command line used for generation
$ bin/php-perstore.sh
Steps to reproduce
$ php --version
PHP 7.2.8 (cli) (built: Jul 19 2018 15:54:51) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies
$ cd samples/client/petstore/php/SwaggerClient-php && composer install
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.                                           

  Problem 1
    - friendsofphp/php-cs-fixer v1.13.3 requires php ^5.3.6 || >=7.0 <7.2 -> your PHP version (7.2.8) does not satisfy that requirement.
    - friendsofphp/php-cs-fixer v1.13.2 requires php ^5.3.6 || >=7.0 <7.2 -> your PHP version (7.2.8) does not satisfy that requirement.
    - friendsofphp/php-cs-fixer v1.13.1 requires php ^5.3.6 || >=7.0 <7.2 -> your PHP version (7.2.8) does not satisfy that requirement.
    - friendsofphp/php-cs-fixer v1.13.0 requires php ^5.3.6 || >=7.0 <7.2 -> your PHP version (7.2.8) does not satisfy that requirement.
    - friendsofphp/php-cs-fixer v1.12.4 requires php ^5.3.6 || >=7.0 <7.2 -> your PHP version (7.2.8) does not satisfy that requirement.
    - friendsofphp/php-cs-fixer v1.12.3 requires php ^5.3.6 || >=7.0 <7.2 -> your PHP version (7.2.8) does not satisfy that requirement.
    - friendsofphp/php-cs-fixer v1.12.2 requires php ^5.3.6 || >=7.0 <7.2 -> your PHP version (7.2.8) does not satisfy that requirement.
    - friendsofphp/php-cs-fixer v1.12.1 requires php ^5.3.6 || >=7.0 <7.2 -> your PHP version (7.2.8) does not satisfy that requirement.
    - friendsofphp/php-cs-fixer v1.12.0 requires php ^5.3.6 || >=7.0 <7.2 -> your PHP version (7.2.8) does not satisfy that requirement.
    - Installation request for friendsofphp/php-cs-fixer ~1.12 -> satisfiable by friendsofphp/php-cs-fixer[v1.12.0, v1.12.1, v1.12.2, v1.12.3, v1.12.4, v1.13.0, v1.13.1, v1.13.2, v1.13.3].                                               
Related issues/PRs

The dependency on friendsofphp/php-cs-fixer was introduced in #3863.

Suggest a fix/enhancement

The PHP client uses a package called friendsofphp/php-cs-fixer version 1.12, which is incompatible with PHP 7.2 and above. To fix we could upgrade the friendsofphp/php-cs-fixer dependency to a newer version that supports PHP >= 7.2, e.g. v2.12.

@mattmelling mattmelling mentioned this issue Aug 4, 2018
4 tasks
@tstumm
Copy link

tstumm commented Dec 11, 2018

The same issue applies to 3.0.* - although the PR #8534 seems to be targeted to 3.0.0 and higher, it was merged to master but never merged into any of the 3.0 releases.

Are there any estimates when this will/could happen?

@softwareok1
Copy link

@HugoMario all php clients generated with cli jars of versions 3.0.x have the same issue. Please review this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants