{"id":13527928,"url":"https://github.com/shivammathur/homebrew-php","last_synced_at":"2025-05-14T03:09:55.041Z","repository":{"id":36985876,"uuid":"229187949","full_name":"shivammathur/homebrew-php","owner":"shivammathur","description":":beer: Homebrew tap for PHP 5.6 to 8.5. PHP 8.5 is built nightly.","archived":false,"fork":false,"pushed_at":"2025-05-13T01:32:48.000Z","size":5763,"stargazers_count":2670,"open_issues_count":0,"forks_count":180,"subscribers_count":17,"default_branch":"master","last_synced_at":"2025-05-13T02:31:02.007Z","etag":null,"topics":["arm64","homebrew","homebrew-php","homebrew-tap","macos","php","php8"],"latest_commit_sha":null,"homepage":"https://github.com/shivammathur/homebrew-php/packages","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/shivammathur.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":".github/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":".github/SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":"shivammathur"}},"created_at":"2019-12-20T04:09:29.000Z","updated_at":"2025-05-13T01:32:52.000Z","dependencies_parsed_at":"2023-09-28T11:29:03.304Z","dependency_job_id":"d14fc588-aae0-4185-8455-eccd27edb9a0","html_url":"https://github.com/shivammathur/homebrew-php","commit_stats":{"total_commits":8122,"total_committers":10,"mean_commits":812.2,"dds":0.2155872937700074,"last_synced_commit":"02517efb39d885806d4c05d7809ac99f0ef0738d"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shivammathur%2Fhomebrew-php","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shivammathur%2Fhomebrew-php/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shivammathur%2Fhomebrew-php/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shivammathur%2Fhomebrew-php/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shivammathur","download_url":"https://codeload.github.com/shivammathur/homebrew-php/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254059510,"owners_count":22007769,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["arm64","homebrew","homebrew-php","homebrew-tap","macos","php","php8"],"created_at":"2024-08-01T06:02:06.915Z","updated_at":"2025-05-14T03:09:50.025Z","avatar_url":"https://github.com/shivammathur.png","language":"Ruby","funding_links":["https://github.com/sponsors/shivammathur"],"categories":["Ruby"],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/shivammathur/homebrew-php\" target=\"_blank\"\u003e\n    \u003cimg src=\"https://repository-images.githubusercontent.com/229187949/f140f880-4c25-11eb-8105-aefec9dc7c66\" alt=\"Homebrew Tap for PHP\" width=\"560\"\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n\u003ch1 align=\"center\"\u003ebrew tap shivammathur/php\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/shivammathur/homebrew-php\" title=\"Homebrew tap to install PHP: Builds\"\u003e\n    \u003cimg alt=\"Build status\" src=\"https://github.com/shivammathur/homebrew-php/workflows/Update%20and%20Build%20Formulae/badge.svg\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://github.com/shivammathur/homebrew-php\" title=\"Homebrew tap to install PHP: Tests\"\u003e\n    \u003cimg alt=\"Test status\" src=\"https://github.com/shivammathur/homebrew-php/actions/workflows/test.yml/badge.svg\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://github.com/shivammathur/homebrew-php/blob/master/LICENSE\" title=\"license\"\u003e\n    \u003cimg alt=\"LICENSE\" src=\"https://img.shields.io/badge/license-MIT-428f7e.svg?logo=open%20source%20initiative\u0026logoColor=white\u0026labelColor=555555\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://github.com/shivammathur/homebrew-php/tree/master/Formula\" title=\"Formulae for PHP versions\"\u003e\n    \u003cimg alt=\"PHP Versions Supported\" src=\"https://img.shields.io/badge/php-5.6%20to%208.5-777bb3.svg?logo=php\u0026logoColor=white\u0026labelColor=555555\"\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/shivammathur/homebrew-php#os-support\" title=\"Linux x86_64 supported\"\u003e\n    \u003cimg alt=\"Linux architectures supported\" src=\"https://img.shields.io/badge/Linux-x86__64%20-f6ab01?logo=linux\u0026logoColor=555555\u0026labelColor=ffffff\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://github.com/shivammathur/homebrew-php#os-support\" title=\"Apple Intel x86_64 supported\"\u003e\n    \u003cimg alt=\"macOS architectures supported\" src=\"https://img.shields.io/badge/macOS-Intel%20x86__64%20-007DC3?logo=apple\u0026logoColor=555555\u0026labelColor=ffffff\"\u003e\n  \u003c/a\u003e  \n  \u003ca href=\"https://github.com/shivammathur/homebrew-php#os-support\" title=\"Apple M1 arm64 supported\"\u003e\n    \u003cimg alt=\"macOS architectures supported\" src=\"https://img.shields.io/badge/macOS-Apple%20arm64%20-c0476d?logo=apple\u0026logoColor=555555\u0026labelColor=ffffff\"\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n## PHP Support\n\n| PHP Version   | NTS Formula        | Debug Formula                  | ZTS Formula                | Debug ZTS Formula                      |\n|---------------|--------------------|--------------------------------|----------------------------|----------------------------------------|\n| PHP 5.6       | `php@5.6`          | `php@5.6-debug`                | `php@5.6-zts`              | `php@5.6-debug-zts`                    |\n| PHP 7.0       | `php@7.0`          | `php@7.0-debug`                | `php@7.0-zts`              | `php@7.0-debug-zts`                    |\n| PHP 7.1       | `php@7.1`          | `php@7.1-debug`                | `php@7.1-zts`              | `php@7.1-debug-zts`                    |\n| PHP 7.2       | `php@7.2`          | `php@7.2-debug`                | `php@7.2-zts`              | `php@7.2-debug-zts`                    |\n| PHP 7.3       | `php@7.3`          | `php@7.3-debug`                | `php@7.3-zts`              | `php@7.3-debug-zts`                    |\n| PHP 7.4       | `php@7.4`          | `php@7.4-debug`                | `php@7.4-zts`              | `php@7.4-debug-zts`                    |\n| PHP 8.0       | `php@8.0`          | `php@8.0-debug`                | `php@8.0-zts`              | `php@8.0-debug-zts`                    |\n| PHP 8.1       | `php@8.1`          | `php@8.1-debug`                | `php@8.1-zts`              | `php@8.1-debug-zts`                    |\n| PHP 8.2       | `php@8.2`          | `php@8.2-debug`                | `php@8.2-zts`              | `php@8.2-debug-zts`                    |\n| PHP 8.3       | `php@8.3`          | `php@8.3-debug`                | `php@8.3-zts`              | `php@8.3-debug-zts`                    |\n| PHP 8.4       | `php` or `php@8.4` | `php-debug` or `php@8.4-debug` | `php-zts` or `php@8.4-zts` | `php-debug-zts` or `php@8.4-debug-zts` |\n| PHP 8.5.0-dev | `php@8.5`          | `php@8.5-debug`                | `php@8.5-zts`              | `php@8.5-debug-zts`                    |\n\nFor each PHP version, we have formulae with thread-safety support `(zts)` and debug symbols support `(debug)` and both `(debug-zts)` as well.\nThe formulae with debug symbols can be used when building or debugging PHP extensions and are not recommended for production usage. \nThe formulae with thread-safety support can be used with applications that require multi-threading support.\n\n## OS Support\n\n|Operating System|Architecture|\n|--- |--- |\n|Linux|`x86_64`|\n|macOS Ventura|`x86_64`, `arm64`|\n|macOS Sonoma|`x86_64`, `arm64`|\n|macOS Sequoia|`x86_64`, `arm64`|\n\n## Usage\n\n### Prerequisites\n\n- On macOS, install Xcode Command Line Utilities:\n\n```zsh\nxcode-select --install\n```\n\n- On Linux, install cURL and Git:\n\n```bash\n# Using APT\nsudo apt-get install -y curl git\n\n# Using Yum\nsudo yum install -y curl git\n```\n\n- Install Homebrew:\n\n```zsh\n/bin/bash -c \"$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)\"\n```\n\n- If previously installed, update homebrew and the formulae:\n\n```zsh\nbrew update\n```\n\n- If you have packages from old `homebrew/php` tap, refer to [this guide](https://github.com/shivammathur/homebrew-php/wiki/Cleanup) for removing them.\n\n### Add this tap\n\nFetch the formulae in this tap:\n\n```zsh\nbrew tap shivammathur/php\n```\n\n### Install PHP\n\n\u003e See [PHP Support](#php-support) for available formulae.\n\n- For example, to install `PHP 8.4`:\n\n```zsh \nbrew install shivammathur/php/php@8.4\n```\n\n- After installing you have to link it:\n\n```zsh\nbrew link --overwrite --force shivammathur/php/php@8.4\n```\n\n- Restart the terminal and test your PHP version:\n\n```zsh\nphp -v\n```\n\n### Upgrade your PHP version\n\nYou can upgrade your PHP version to the latest patch release.\n\nFor example, to upgrade `PHP 8.4`:\n\n```zsh\nbrew upgrade shivammathur/php/php@8.4\n```\n\n### Switch between PHP versions\n\n- If you have multiple PHP versions installed, you can switch between them easily.\n\nFor example, to switch to `PHP 8.4`:\n\n```zsh\nbrew link --overwrite --force shivammathur/php/php@8.4\n```\n\n- If you get a warning like below, then do as recommended:\n\n```zsh\nWarning: Already linked: \u003cCellar Path\u003e\nTo relink:\n  brew unlink \u003cformula\u003e \u0026\u0026 brew link \u003cformula\u003e\n```\n\n```zsh\nbrew unlink php@8.4\nbrew link --overwrite --force shivammathur/php/php@8.4\n```\n\n### Restart your webserver\n\nIf you are using `Apache` or `Nginx` with `php-fpm`, restart your webserver after any change in your PHP.\n\n- For Apache (`httpd`):\n\n```zsh\nbrew services restart httpd\n```\n- For Nginx:\n\n```zsh\nbrew services restart nginx\n```\n\n## Debugging\n\n- Make sure you ran `brew update` before installing PHP.\n\n- Run `brew doctor` and fix the warnings it reports.\n\n- Make sure homebrew has correct permissions.\n\n```zsh\nsudo chown -R \"$(id -un)\":\"$(id -gn)\" $(brew --prefix)\n```\n\n- If PHP is not working after a macOS update. Reinstall PHP along with its dependencies.\n\nFor example to reinstall `PHP 8.4` and its dependencies:\n\n```zsh\nbrew reinstall $(brew deps shivammathur/php/php@8.4) shivammathur/php/php@8.4\n```\n\n- Check if your issue is a Homebrew's [common issue](https://docs.brew.sh/Common-Issues).\n\n- If you are still facing an issue, please create a discussion thread [here](https://github.com/shivammathur/homebrew-php/discussions).\n\n## License\n\nThe code in this project is licensed under the [MIT license](http://choosealicense.com/licenses/mit/).\nPlease see the [license file](LICENSE) for more information.\n\nThis project has some [dependencies](#dependencies), and their license can be found [here](LICENSE_HOMEBREW).\n\n\n## Contributions\n\nContributions are welcome!\nPlease see [Contributor's Guide](.github/CONTRIBUTING.md \"shivammathur/homebrew-php contribution guide\") before you start.\nIf you face any issues while using this tap or want to suggest a feature/improvement, create an discussion thread [here](https://github.com/shivammathur/homebrew-php/discussions \"shivammathur/php discussions\").\n\n## Sponsors\n\nIn addition to GitHub Actions, we use [MacStadium](https://www.macstadium.com/opensource/members) for our CI infrastructure.\n\n\u003ca href=\"https://www.macstadium.com/opensource/members#gh-light-mode-only\"\u003e\n    \u003cimg src=\"https://setup-php.com/sponsors/macstadium.png\" alt=\"Mac Stadium\" width=\"200px\"\u003e\n\u003c/a\u003e\n\u003ca href=\"https://www.macstadium.com/opensource/members#gh-dark-mode-only\"\u003e\n    \u003cimg src=\"https://setup-php.com/sponsors/macstadium-white.png\" alt=\"Mac Stadium\" width=\"200px\"\u003e\n\u003c/a\u003e\n\nThis project is generously supported by many other users and organisations via [GitHub Sponsors](https://github.com/sponsors/shivammathur).\n\n\u003ca href=\"https://github.com/sponsors/shivammathur\"\u003e\u003cimg src=\"https://setup-php.com/sponsors.svg?\" alt=\"Sponsor shivammathur\"\u003e\u003c/a\u003e\n\n## Related Projects\n\n- [shivammathur/homebrew-extensions](https://github.com/shivammathur/homebrew-extensions \"Tap for PHP extensions\")\n- [shivammathur/setup-php](https://github.com/shivammathur/setup-php \"Setup PHP in GitHub Actions\")\n\n## Dependencies\n\n- [Homebrew/brew](https://github.com/Homebrew/brew \"Homebrew GitHub Repo\")\n- [Homebrew/homebrew-core](https://github.com/Homebrew/homebrew-core \"Homebrew core tap\")\n- [Homebrew/actions](https://github.com/Homebrew/actions \"Homebrew GitHub Actions\")\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshivammathur%2Fhomebrew-php","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshivammathur%2Fhomebrew-php","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshivammathur%2Fhomebrew-php/lists"}