php-cs-fixer 在 php 7.3 更新后停止工作

Wel*_*ers 5 homebrew php-7

我正在使用 Homebrew 来管理它们,并且它们都是最新的。

~ $ brew --version
Homebrew 1.8.4
Homebrew/homebrew-core (git revision a166; last commit 2018-12-08)

~ $ php --version
PHP 7.3.0 (cli) (built: Dec  7 2018 11:00:11) ( 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, Copyright (c) 1999-2018, by Zend Technologies

~ $ php-cs-fixer --version
PHP needs to be a minimum version of PHP 5.6.0 and maximum version of PHP 7.2.*.

~ $ brew upgrade php-cs-fixer
Error: php-cs-fixer 2.13.1 already installed
Run Code Online (Sandbox Code Playgroud)

当我尝试使用 php-cs-fixer 时会发生这种情况

~ $ php-cs-fixer fix file.php
PHP needs to be a minimum version of PHP 5.6.0 and maximum version of PHP 7.2.*.
Run Code Online (Sandbox Code Playgroud)

因此,我下载了 php@7.2 和 php-cs-fixer.phar 进行测试,它是这样工作的。

~ $ /usr/local/Cellar/php@7.2/7.2.13/bin/php /Users/aaronk/php-cs-fixer.phar fix file.php
Loaded config default from "/Users/aaronk/.php_cs".
Using cache file ".php_cs.cache".
Paths from configuration file have been overridden by paths provided as command arguments.
   1) file.php

Fixed all files in 0.014 seconds, 10.000 MB memory used
~ $
Run Code Online (Sandbox Code Playgroud)

所以我的问题是,如何让 homebrew 的 php-cs-fixer 工作?自制程序在这里做错了什么吗?

(ps有没有php7.3的标签)

Ort*_*kni 4

正如 godbout 所说,PHP-CS-Fixer 不支持 PHP 7.3。您可以追踪 GitHub 问题[Meta] PHP 7.3 support #3697,跟踪事态的演变。根据此问题,PHP 7.3 中仍需要解决以下更改: