diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..9d78a78 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,23 @@ +name: Test +on: [push] +jobs: + run: + runs-on: macos-latest + strategy: + fail-fast: false + matrix: + php-versions: ['5.3', '5.4', '5.5'] + name: PHP ${{ matrix.php-versions }} + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Setup PHP + run: bash install.sh ${{ matrix.php-versions }} + - name: Testing PHP version + run: | + php -v + php -r "if(strpos(phpversion(), '${{ matrix.php-versions }}') === false) {throw new Exception('Wrong PHP version Installed');}" + - name: Testing + run: | + php -m \ No newline at end of file diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..64ad435 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/builds diff --git a/.idea/workspace.xml b/.idea/workspace.xml new file mode 100644 index 0000000..372bf33 --- /dev/null +++ b/.idea/workspace.xml @@ -0,0 +1,68 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1582916347319 + + + + + + + + + \ No newline at end of file diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..bebbb89 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2020 Shivam Mathur + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/LIIP_LICENSE b/LIIP_LICENSE new file mode 100644 index 0000000..9281b2a --- /dev/null +++ b/LIIP_LICENSE @@ -0,0 +1,13 @@ +Copyright 2011 liip ag + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..916fc7d --- /dev/null +++ b/README.md @@ -0,0 +1,32 @@ +# PHP5 for darwin + +Build status +LICENSE +PHP Versions Supported + +> Scripts to install end of life PHP versions. + +PHP versions in this project have reached end of life and should not be used except for testing backward-compatibility. + +## Usage + +### PHP 5.3 +```bash +curl -sSL https://github.com/shivammathur/php5-darwin/releases/latest/download/install.sh | bash -s 5.3 +``` + +### PHP 5.4 +```bash +curl -sSL https://github.com/shivammathur/php5-darwin/releases/latest/download/install.sh | bash -s 5.4 +``` + +### PHP 5.5 +```bash +curl -sSL https://github.com/shivammathur/php5-darwin/releases/latest/download/install.sh | bash -s 5.5 +``` + +## License + +This project is licensed under the [MIT license](http://choosealicense.com/licenses/mit/). +Please see the [license file](LICENSE) for more information. +This project uses builds from [liip/php-osx](https://github.com/liip/php-osx "liip/php-osx") and their LICENSE can be found [here](LIIP_LICENSE). \ No newline at end of file diff --git a/install.sh b/install.sh new file mode 100644 index 0000000..5ccc008 --- /dev/null +++ b/install.sh @@ -0,0 +1,7 @@ +curl -o /tmp/php.tar.xz -sSL https://github.com/shivammathur/php5-darwin/releases/latest/download/php"$1".tar.xz +sudo tar -C /usr/local -xf /tmp/php.tar.xz +sudo chmod 777 /usr/local/php5/post-install +sudo /usr/local/php5/post-install +for tool in pear peardev pecl php php-config phpize; do + sudo ln -sf /usr/local/php5/bin/"$tool" /usr/local/bin/"$tool" +done \ No newline at end of file