{"id":13624235,"url":"https://github.com/philcook/brew-php-switcher","last_synced_at":"2025-05-15T12:03:33.729Z","repository":{"id":14951300,"uuid":"17675957","full_name":"philcook/brew-php-switcher","owner":"philcook","description":"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.","archived":false,"fork":false,"pushed_at":"2024-11-30T00:13:50.000Z","size":72,"stargazers_count":985,"open_issues_count":15,"forks_count":90,"subscribers_count":20,"default_branch":"master","last_synced_at":"2025-04-14T19:59:03.896Z","etag":null,"topics":["homebrew","php","shell"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"notpeter/crunchbase-data","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/philcook.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2014-03-12T17:24:42.000Z","updated_at":"2025-04-01T07:51:16.000Z","dependencies_parsed_at":"2024-06-19T02:59:27.772Z","dependency_job_id":"3335e3f5-0c63-4116-90a0-bc3ee8c78aeb","html_url":"https://github.com/philcook/brew-php-switcher","commit_stats":{"total_commits":79,"total_committers":22,"mean_commits":3.590909090909091,"dds":0.7341772151898734,"last_synced_commit":"28b90f91fb92e9df10fb8f3bf26700dcd82dd90a"},"previous_names":[],"tags_count":17,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/philcook%2Fbrew-php-switcher","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/philcook%2Fbrew-php-switcher/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/philcook%2Fbrew-php-switcher/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/philcook%2Fbrew-php-switcher/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/philcook","download_url":"https://codeload.github.com/philcook/brew-php-switcher/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254337612,"owners_count":22054253,"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":["homebrew","php","shell"],"created_at":"2024-08-01T21:01:40.335Z","updated_at":"2025-05-15T12:03:33.693Z","avatar_url":"https://github.com/philcook.png","language":"Shell","funding_links":[],"categories":["Configuration","配置 Configuration","Table of Contents","Ecosystem"],"sub_categories":["PHP Installation","PHP安装 PHP Installation"],"readme":"Brew PHP Switcher [![CI](https://github.com/philcook/brew-php-switcher/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/philcook/brew-php-switcher/actions/workflows/ci.yml)\n=========\n\nBrew PHP switcher is a simple script to switch your Apache and CLI configs quickly between major versions of PHP.\n\nIf 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.\n\nCaveats\n-------\n\nFor 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.\n\nYour Apache config must have native osx PHP module commented out.\n```sh\n#LoadModule php5_module libexec/apache2/libphp5.so\n```\n\nBrew PHP Switcher will automatically add the [Homebrew]'s PHP module location in the Apache config in the following format.\n```sh\n#LoadModule php5_module /usr/local/opt/php@5.6/lib/httpd/modules/libphp5.so\n#LoadModule php7_module /usr/local/opt/php@7.0/lib/httpd/modules/libphp7.so\n#LoadModule php7_module /usr/local/opt/php@7.1/lib/httpd/modules/libphp7.so\n#LoadModule php7_module /usr/local/opt/php@7.2/lib/httpd/modules/libphp7.so\n#LoadModule php7_module /usr/local/opt/php@7.3/lib/httpd/modules/libphp7.so\n#LoadModule php7_module /usr/local/opt/php@7.4/lib/httpd/modules/libphp7.so\n#LoadModule php7_module /usr/local/opt/php@8.0/lib/httpd/modules/libphp8.so\n```\n\nVersion\n----\n\n2.3\n\nInstallation\n--------------\n```sh\nbrew install brew-php-switcher\n```\n\nWhere **5.6** exists, please replace with syntax of **5.6**, **7.0**, **7.1**, **7.2**, **7.3**, **7.4**, **8.0**, **8.1**, **8.2**, **8.3** or **8.4** depending on which version is required.\n```sh\nbrew-php-switcher 5.6\n```\n\n\u003e by default will switch apache config\n\nOptions\n--------------\n\n- `-s|-s=*` Skips apache \u0026 valet config switch for i.e\n\n```sh\n# skip apache only\nbrew-php-switcher 5.6 -s\n\n# skip valet only\nbrew-php-switcher 5.6 -s=valet\n\n# skip valet \u0026 apache\nbrew-php-switcher 5.6 -s=valet,apache\n```\n- `-c=*` switch a specific config for i.e\n\n```sh\n# switch valet config only\nbrew-php-switcher 5.6 -c=valet\n\n# switch valet \u0026 apache config only\nbrew-php-switcher 5.6 -c=valet,apache\n\n# switch apache config only\nbrew-php-switcher 5.6 -c=apache\n```\n\nLicense\n----\n\nMIT\n\n[Homebrew]:http://brew.sh/\n[@p_cook]:http://twitter.com/p_cook\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphilcook%2Fbrew-php-switcher","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fphilcook%2Fbrew-php-switcher","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphilcook%2Fbrew-php-switcher/lists"}