All Projects → philcook → Brew Php Switcher

philcook / Brew Php Switcher

Licence: mit
Brew PHP switcher is a simple shell script to switch your apache and CLI quickly between major versions of PHP. If you support multiple products/projects that are built using either brand new or old legacy PHP functionality. For users of Homebrew (or brew for short) currently only.

Programming Languages

shell
77523 projects

Labels

Projects that are alternatives of or similar to Brew Php Switcher

Dotfiles
paul's shell, git, etc config files. also homebrew, migration setup. good stuff.
Stars: ✭ 3,910 (+429.09%)
Mutual labels:  homebrew
Sysdvr
Stream switch games to your PC via USB or network
Stars: ✭ 523 (-29.23%)
Mutual labels:  homebrew
Nx Shell
A multi-purpose file manager for the Nintendo Switch.
Stars: ✭ 639 (-13.53%)
Mutual labels:  homebrew
Octo
A Chip8 IDE
Stars: ✭ 419 (-43.3%)
Mutual labels:  homebrew
Git Peek
git repo to local editor instantly
Stars: ✭ 485 (-34.37%)
Mutual labels:  homebrew
Formulae.brew.sh
🏎 An online formulae browser for Homebrew
Stars: ✭ 543 (-26.52%)
Mutual labels:  homebrew
Dotfiles
Setup and install scripts for a new machine + dotfiles for various apps. Linux, Mac, and Mac (Amazon specific) branches are included.
Stars: ✭ 382 (-48.31%)
Mutual labels:  homebrew
Asimov
Automatically exclude development dependencies from Apple Time Machine backups
Stars: ✭ 705 (-4.6%)
Mutual labels:  homebrew
Dark Mode
Control the macOS dark mode from the command-line
Stars: ✭ 518 (-29.91%)
Mutual labels:  homebrew
Jarvis
Dotfiles for a powerful, web development-focused environment powered by Neovim, iTerm2, tmux, and zsh
Stars: ✭ 617 (-16.51%)
Mutual labels:  homebrew
Switchthemeinjector
Create custom themes for the nintendo switch !
Stars: ✭ 436 (-41%)
Mutual labels:  homebrew
Hb Appstore
Homebrew App Store - GUI for downloading/managing homebrew apps for video game consoles
Stars: ✭ 463 (-37.35%)
Mutual labels:  homebrew
Homebrew Nginx
🚒 Community NGINX tap for custom modules
Stars: ✭ 557 (-24.63%)
Mutual labels:  homebrew
Dl Engineer Guidebook
深度学习工程师生存指南
Stars: ✭ 399 (-46.01%)
Mutual labels:  homebrew
Dotfiles
Dotfiles for macOS
Stars: ✭ 678 (-8.25%)
Mutual labels:  homebrew
Jksv
Data Tool For Switch
Stars: ✭ 388 (-47.5%)
Mutual labels:  homebrew
Libctru
Homebrew development library for Nintendo 3DS/Horizon OS user mode (Arm11)
Stars: ✭ 530 (-28.28%)
Mutual labels:  homebrew
Edizon
💡 A homebrew save management, editing tool and memory trainer for Horizon (Nintendo Switch)
Stars: ✭ 706 (-4.47%)
Mutual labels:  homebrew
Brew
🍺 The missing package manager for macOS (or Linux)
Stars: ✭ 30,318 (+4002.57%)
Mutual labels:  homebrew
Brewformulas.org
A website to search and discover formulas from Homebrew for Mac
Stars: ✭ 567 (-23.27%)
Mutual labels:  homebrew

Brew PHP Switcher Build Status

Brew PHP switcher is a simple script to switch your Apache and CLI configs quickly between major versions of PHP.

If you support multiple products/projects that are built using either brand new or old legacy PHP functionality and you find it a pain to change config files continually this will make the whole process just one command.

Caveats

For users of OSX only who have installed PHP via Homebrew and for PHP version 5.6, 7.0, 7.1, 7.2, 7.3, 7.4 and 8.0 only.

Your Apache config must have native osx PHP module commented out.

#LoadModule php5_module libexec/apache2/libphp5.so

Brew PHP Switcher will automatically add the Homebrew's PHP module location in the Apache config in the following format.

#LoadModule php5_module /usr/local/opt/[email protected]/lib/httpd/modules/libphp5.so
#LoadModule php7_module /usr/local/opt/[email protected]/lib/httpd/modules/libphp7.so
#LoadModule php7_module /usr/local/opt/[email protected]/lib/httpd/modules/libphp7.so
#LoadModule php7_module /usr/local/opt/[email protected]/lib/httpd/modules/libphp7.so
#LoadModule php7_module /usr/local/opt/[email protected]/lib/httpd/modules/libphp7.so
#LoadModule php7_module /usr/local/opt/[email protected]/lib/httpd/modules/libphp7.so
#LoadModule php7_module /usr/local/opt/[email protected]/lib/httpd/modules/libphp8.so

Version

2.3

Installation

brew install brew-php-switcher

Where 5.6 exists, please replace with syntax of 5.6, 7.0, 7.1, 7.2, 7.3, 7.4 or 8.0 depending on which version is required.

brew-php-switcher 5.6

by default will switch apache config

Options

  • -s|-s=* Skips apache & valet config switch for i.e
# skip apache only
brew-php-switcher 5.6 -s

# skip valet only
brew-php-switcher 5.6 -s=valet

# skip valet & apache
brew-php-switcher 5.6 -s=valet,apache
  • -c=* switch a specific config for i.e
# switch valet config only
brew-php-switcher 5.6 -c=valet

# switch valet & apache config only
brew-php-switcher 5.6 -c=valet,apache

# switch apache config only
brew-php-switcher 5.6 -c=apache

License

MIT

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].