(已解决)Laravel新安装-在没有Brew的情况下从Mac上删除PHP 7.1.23

(已解决)Laravel新安装-在没有Brew的情况下从Mac上删除PHP 7.1.23,php,laravel,macos,composer-php,Php,Laravel,Macos,Composer Php,解决方案:我已经将我的操作系统更新到支持最新PHP的最新版本 我有一个新的拉威尔项目 当我运行php artisan serve 它表明: MacBook-Pro% php artisan serve Warning: require(/Users/username/Desktop/code/argon/vendor/autoload.php): failed to open stream: No such file or directory in /Users/username/Deskto

解决方案:我已经将我的操作系统更新到支持最新PHP的最新版本

我有一个新的拉威尔项目 当我运行
php artisan serve
它表明:

MacBook-Pro% php artisan serve

Warning: require(/Users/username/Desktop/code/argon/vendor/autoload.php): failed to open stream: No such file or directory in /Users/username/Desktop/code/argon/artisan on line 18

Fatal error: require(): Failed opening required '/Users/username/Desktop/code/argon/vendor/autoload.php' (include_path='.:') in /Users/username/Desktop/code/argon/artisan on line 18
编写器更新
显示

MacBook-Pro% 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
    - This package requires php ^7.2.5 but your PHP version (7.1.23) does not satisfy that requirement.
  Problem 2
    - laravel/tinker v2.2.0 requires php ^7.2 -> your PHP version (7.1.23) does not satisfy that requirement.
    - laravel/tinker v2.1.0 requires php ^7.2 -> your PHP version (7.1.23) does not satisfy that requirement.
    - laravel/tinker v2.0.0 requires php ^7.2 -> your PHP version (7.1.23) does not satisfy that requirement.
    - laravel/tinker 2.x-dev requires php ^7.2 -> your PHP version (7.1.23) does not satisfy that requirement.
    - Installation request for laravel/tinker ^2.0 -> satisfiable by laravel/tinker[2.x-dev, v2.0.0, v2.1.0, v2.2.0].



MacBook-Pro% php -v
PHP 7.1.23 (cli) (built: Nov  7 2018 18:20:35) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.1.0, Copyright (c) 1998-2018 Zend Technologies

有没有关于如何删除PHP7.1.23的想法?

找到了解决方案

brew install php72
brew switch php@7.2 7.2.25

php-v给出了以下响应:

WARNING: PHP is not recommended  
PHP is included in macOS for compatibility with legacy software.  
Future versions of macOS will not include PHP.
The release notes for Catalina contain the following remark:

脚本语言运行时不推荐使用脚本语言运行时 例如Python、Ruby和Perl都包含在macOS中以实现兼容性 使用遗留软件。macOS的未来版本将不包括脚本 默认情况下为语言运行时,可能需要您安装 附加包。如果您的软件依赖于脚本语言, 建议您在应用程序中捆绑运行时


简言之:macOS继续包含Python、Ruby、Perl以及PHP等“遗留”版本,这样现有代码就不会中断,但苹果将其留给用户安装他们想要使用的版本。

您必须拥有非常旧的macOS版本。无法删除PHP的系统版本。安装一个更新的。它是MacOS Mojave v10.14.3
brew install php72
brew switch php@7.2 7.2.25
WARNING: PHP is not recommended  
PHP is included in macOS for compatibility with legacy software.  
Future versions of macOS will not include PHP.
The release notes for Catalina contain the following remark: