Skip to content

Commit

Permalink
Add support for PHP 7.4 (#66)
Browse files Browse the repository at this point in the history
* Add support for PHP 7.4

* Update README.md

* Remove php 5.6 and 7.1 from tests

* Remove php 5.6 and 7.1 from clean script

* Remove php 5.6 and 7.1 from travis setup
  • Loading branch information
pgrimaud authored and ikari7789 committed Dec 4, 2019
1 parent c11da3b commit 963f245
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
3 changes: 1 addition & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,9 @@ osx_image: xcode9.4
addons:
homebrew:
packages:
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]
update: true

script:
Expand Down
2 changes: 1 addition & 1 deletion .travis/clean.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash

for version in '5.6' '7.1' '7.2' '7.3'; do
for version in '7.2' '7.3' '7.4'; do
brew unlink php@$version
done
2 changes: 1 addition & 1 deletion .travis/test.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash

error=0
for version in '5.6' '7.1' '7.2' '7.3'; do
for version in '7.2' '7.3' '7.4'; do
. `echo $(dirname $0)"/../phpswitch.sh"` $version -s > /dev/null
switched=$(php -v | grep -e '^PHP' | cut -d' ' -f2 | cut -d. -f1,2)
if [ "$version" != "$switched" ]; then
Expand Down
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ If you support multiple products/projects that are built using either brand new
Caveats
-------

For users of OSX only who have installed PHP via [Homebrew] and for PHP version 5.6, 7.0, 7.1, 7.2 and 7.3 only.
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 and 7.4 only.

Your Apache config must have native osx PHP module commented out.
```sh
Expand All @@ -22,6 +22,7 @@ Brew PHP Switcher will automatically add the [Homebrew]'s PHP module location in
#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
```

Version
Expand All @@ -35,7 +36,7 @@ Installation
brew install brew-php-switcher
```

Where **5.6** exists, please replace with syntax of **5.6**, **7.0**, **7.1**, **7.2**, or **7.3** depending on which version is required.
Where **5.6** exists, please replace with syntax of **5.6**, **7.0**, **7.1**, **7.2**, **7.3**, or **7.4** depending on which version is required.
```sh
brew-php-switcher 5.6
```
Expand Down
6 changes: 3 additions & 3 deletions phpswitch.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ osx_version=$((${osx_major_version} * 10000 + ${osx_minor_version} * 100 + ${osx

brew_prefix=$(brew --prefix | sed 's#/#\\\/#g')

brew_array=("5.6","7.0","7.1","7.2","7.3")
php_array=("[email protected]" "[email protected]" "[email protected]" "[email protected]" "[email protected]")
valet_support_php_version_array=("[email protected]" "[email protected]" "[email protected]" "[email protected]" "[email protected]")
brew_array=("5.6","7.0","7.1","7.2","7.3","7.4")
php_array=("[email protected]" "[email protected]" "[email protected]" "[email protected]" "[email protected]" "[email protected]")
valet_support_php_version_array=("[email protected]" "[email protected]" "[email protected]" "[email protected]" "[email protected]" "[email protected]")
php_installed_array=()
php_version="php@$1"
php_opt_path="$brew_prefix\/opt\/"
Expand Down

0 comments on commit 963f245

Please sign in to comment.