Php-cs-fixer: incompatible dep with php 7.3/dev

Created on 7 Aug 2018  路  1Comment  路  Source: FriendsOfPHP/PHP-CS-Fixer

upgrading to latest php 7.3 dev (beta3)

    php -v
        PHP 7.3.0-dev (cli) (built: Aug  7 2018 07:23:47) ( NTS )
        Copyright (c) 1997-2018 The PHP Group
        Zend Engine v3.3.0-dev, Copyright (c) 1998-2018 Zend Technologies
            with Zend OPcache v7.3.0-dev, Copyright (c) 1999-2018, by Zend Technologies

now,

    ./vendor/bin/php-cs-fixer -V
        PHP needs to be a minimum version of PHP 5.6.0 and maximum version of PHP 7.2.*.

    composer show  | grep php/php-cs-fixer
        friendsofphp/php-cs-fixer                v2.12.2            A tool to automatically fi...

checking,

    composer update
        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 v2.12.2 requires php ^5.6 || >=7.0 <7.3 -> your PHP version (7.3.0-dev) does not satisfy that requirement.
            - friendsofphp/php-cs-fixer v2.12.1 requires php ^5.6 || >=7.0 <7.3 -> your PHP version (7.3.0-dev) does not satisfy that requirement.
            - friendsofphp/php-cs-fixer v2.12.0 requires php ^5.6 || >=7.0 <7.3 -> your PHP version (7.3.0-dev) does not satisfy that requirement.
            - friendsofphp/php-cs-fixer v2.11.2 requires php ^5.6 || >=7.0 <7.3 -> your PHP version (7.3.0-dev) does not satisfy that requirement.
            - friendsofphp/php-cs-fixer v2.11.1 requires php ^5.6 || >=7.0 <7.3 -> your PHP version (7.3.0-dev) does not satisfy that requirement.
            - friendsofphp/php-cs-fixer v2.11.0 requires php ^5.6 || >=7.0 <7.3 -> your PHP version (7.3.0-dev) does not satisfy that requirement.
            - friendsofphp/php-cs-fixer v2.10.5 requires php ^5.6 || >=7.0 <7.3 -> your PHP version (7.3.0-dev) does not satisfy that requirement.
            - friendsofphp/php-cs-fixer v2.10.4 requires php ^5.6 || >=7.0 <7.3 -> your PHP version (7.3.0-dev) does not satisfy that requirement.
            - friendsofphp/php-cs-fixer v2.10.3 requires php ^5.6 || >=7.0 <7.3 -> your PHP version (7.3.0-dev) does not satisfy that requirement.
            - friendsofphp/php-cs-fixer v2.10.2 requires php ^5.6 || >=7.0 <7.3 -> your PHP version (7.3.0-dev) does not satisfy that requirement.
            - friendsofphp/php-cs-fixer v2.10.1 requires php ^5.6 || >=7.0 <7.3 -> your PHP version (7.3.0-dev) does not satisfy that requirement.
            - friendsofphp/php-cs-fixer v2.10.0 requires php ^5.6 || >=7.0 <7.3 -> your PHP version (7.3.0-dev) does not satisfy that requirement.
            - friendsofphp/php-cs-fixer v2.12.2 requires php ^5.6 || >=7.0 <7.3 -> your PHP version (7.3.0-dev) does not satisfy that requirement.
            - Installation request for friendsofphp/php-cs-fixer ^2.10 -> satisfiable by friendsofphp/php-cs-fixer[v2.10.0, v2.10.1, v2.10.2, v2.10.3, v2.10.4, v2.10.5, v2.11.0, v2.11.1, v2.11.2, v2.12.0, v2.12.1, v2.12.2].

currently, all of the available branches,

2.12
3.0
master

have

    "require": {
      "php": "^5.6 || >=7.0 <7.3",
statuduplicate

Most helpful comment

Indeed, PHP CS Fixer is not yet compatible with PHP 7.3,
as each minor release of PHP introduces changes in syntax, for regular users it's a new feature, yet for us, who operates on low-level of tokenization, this is BC breaker, and without adjusting the project it will crash on trying to fix 7.3 code.

If you want to help, please visit https://github.com/FriendsOfPHP/PHP-CS-Fixer/issues/3697
I'm also closing this one as duplicate of it.


You can still enforce composer to install PHP CS Fixer on PHP 7.3 anyway with --ignore-platform-reqs.
Then, you can set up PHP_CS_FIXER_IGNORE_ENV env var to enforce PHP CS Fixer to run under PHP 7.3, but you may experience unexpected issues.

>All comments

Indeed, PHP CS Fixer is not yet compatible with PHP 7.3,
as each minor release of PHP introduces changes in syntax, for regular users it's a new feature, yet for us, who operates on low-level of tokenization, this is BC breaker, and without adjusting the project it will crash on trying to fix 7.3 code.

If you want to help, please visit https://github.com/FriendsOfPHP/PHP-CS-Fixer/issues/3697
I'm also closing this one as duplicate of it.


You can still enforce composer to install PHP CS Fixer on PHP 7.3 anyway with --ignore-platform-reqs.
Then, you can set up PHP_CS_FIXER_IGNORE_ENV env var to enforce PHP CS Fixer to run under PHP 7.3, but you may experience unexpected issues.

Was this page helpful?
0 / 5 - 0 ratings