Automic VaultAutomic Vault

brew

使用 Homebrew 安装 brew-php-switcher

查看 brew-php-switcher 的安装路径、可执行文件、元数据以及面向 AI 代理工作流的安全说明。

安装

其他安装命令

macOS

Homebrew已验证 · 100%
brew install brew-php-switcher

local Homebrew formula metadata

概览

软件包摘要

Switch Apache / Valet / CLI configs between PHP versions

命令和别名

  • brew-php-switcher
  • phpswitch.sh

历史

项目历史与用法

Brew PHP Switcher is a macOS shell utility for switching Homebrew-installed PHP versions across command-line, Apache, and Valet-oriented development setups.

项目历史

The project was created in March 2014 and published v1.0 in April 2014. Its README frames the tool as a one-command answer for developers supporting multiple PHP projects that require different PHP major versions.

The script tracks Homebrew PHP layout changes over time. The README documents support for older PHP 5.6 and 7.x versions through modern 8.x versions, and recent commits mention Apple Silicon Homebrew Apache path handling.

采用历史

The package gained a durable niche among macOS PHP developers because it automated edits that were otherwise easy to get wrong: Apache module lines, CLI symlinks, and optional Valet configuration. GitHub metadata shows over a thousand stars, and Homebrew analytics reported thousands of installs over the prior year at lookup time.

使用方式

Users install it with Homebrew and run commands such as `brew-php-switcher 8.3` or `brew-php-switcher 5.6`. Options allow skipping Apache or Valet changes, or targeting only a specific config area.

为什么软件包爱好者会关心

The package is a classic Homebrew-era local development helper: small shell code wrapped as a formula, solving the impedance mismatch between language runtime versions and macOS web-server configuration. It is historically tied to the long tail of PHP projects that require multiple runtime versions on one laptop.

时间线

  • 2014: Repository created and v1.0 released.
  • 2019: v2.2 released during the PHP 7.x Homebrew era.
  • 2021: v2.4 released with continued PHP version updates.
  • 2024: v2.6 released.
  • 2026: Homebrew stable version reported as 2.6.

Related projects

  • Homebrew PHP formulae are the runtime packages switched by the tool.
  • Apache configuration is one of the script's central targets.
  • Valet configuration is supported through skip and target options documented in the README.

安全态势

风险级别:绿色

narrow executable package without higher-risk signals.

风险分类器

绿色 风险 · 低 置信度 · appliance

原因

  • narrow executable package without higher-risk signals

信号

  • metadata:no-higher-risk-signals

安装行为

  • formula 元数据中未记录 Homebrew post-install 钩子。
  • Homebrew bottle 元数据适用于 1 个平台目标。

建议审查

在无人值守的代理使用前,请检查该工具是否读取明文凭据、写入远程状态、发布制品或调用插件。

可执行文件

已安装的可执行文件

命令类型暴露范围备注
brew-php-switchercli全局可执行文件
phpswitch.shcli全局可执行文件

新鲜度

版本和新鲜度

这些信号区分页生成时间、软件包管理器活动和上游发布比较。只有存在证据 URL 和可比较版本时,才会提示版本落后。

页面生成时间2026-07-08
管理器版本2.6
管理器更新时间
本地数据OK
上游当前
检测到的最新版本v2.6

https://github.com/philcook/brew-php-switcher

  • 信息No package-manager update timestamp was available.低 置信度

安装元数据

软件包元数据

软件包键brew:brew-php-switcher
版本2.6
软件包管理器Homebrew
软件包管理器页面https://formulae.brew.sh/formula/brew-php-switcher
主页https://github.com/philcook/brew-php-switcher
仓库https://github.com/philcook/brew-php-switcher
上游文档https://github.com/philcook/brew-php-switcher#readme
许可证MIT
源码归档https://github.com/philcook/brew-php-switcher/archive/refs/tags/v2.6.tar.gz
Bottle可用 (于 all)
Homebrew post-install未定义
服务未声明

注册表事实

源数据库详情

Source DatabaseHomebrew formula API
Taphomebrew/core
Full Namebrew-php-switcher
Version Scheme0
Revision0
Head VersionHEAD
Bottle Stable Root URLhttps://ghcr.io/v2/homebrew/core
Deprecatedno
Disabledno
Keg Onlyno
URL Keys
  • head
  • stable

来源线索

由仓库数据生成

此页面由 av-webscripts/generate-pkg-sqlite.py 生成的私有软件包 SQLite 工件提供。

使用的来源

  • Geiger risk classifier
  • Nucleus package database
  • av.db category and tag curation
  • cross-ecosystem install command graph
  • curated package history
  • package relationship graph
  • package version freshness
  • package-page enrichment