{"id":13821938,"url":"https://github.com/nicoverbruggen/phpmon","last_synced_at":"2026-03-07T23:10:20.209Z","repository":{"id":37234694,"uuid":"191712234","full_name":"nicoverbruggen/phpmon","owner":"nicoverbruggen","description":"Lightweight, native Mac menu bar app that helps you manage multiple PHP installations, locate config files and more. Also interacts with Laravel Valet.","archived":false,"fork":false,"pushed_at":"2026-03-07T21:37:50.000Z","size":28108,"stargazers_count":3211,"open_issues_count":3,"forks_count":62,"subscribers_count":26,"default_branch":"main","last_synced_at":"2026-03-07T22:36:56.579Z","etag":null,"topics":["brew","homebrew","laravel","macos","native","php","php-monitor","phpmon","swift","symfony","valet"],"latest_commit_sha":null,"homepage":"https://phpmon.app","language":"Swift","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/nicoverbruggen.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/contributing.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":"nicoverbruggen","custom":["https://nicoverbruggen.be/sponsor"]}},"created_at":"2019-06-13T07:22:41.000Z","updated_at":"2026-03-07T21:37:54.000Z","dependencies_parsed_at":"2023-12-10T12:28:43.968Z","dependency_job_id":"9f963d46-cabe-45fb-be26-dd2be942bcf8","html_url":"https://github.com/nicoverbruggen/phpmon","commit_stats":{"total_commits":1369,"total_committers":6,"mean_commits":"228.16666666666666","dds":0.1022644265887509,"last_synced_commit":"3e319cd50fc0f4ba0ec722f67d4e37012e920bfe"},"previous_names":[],"tags_count":103,"template":false,"template_full_name":null,"purl":"pkg:github/nicoverbruggen/phpmon","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nicoverbruggen%2Fphpmon","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nicoverbruggen%2Fphpmon/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nicoverbruggen%2Fphpmon/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nicoverbruggen%2Fphpmon/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nicoverbruggen","download_url":"https://codeload.github.com/nicoverbruggen/phpmon/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nicoverbruggen%2Fphpmon/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30236205,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-07T23:09:55.450Z","status":"ssl_error","status_checked_at":"2026-03-07T23:00:57.737Z","response_time":53,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["brew","homebrew","laravel","macos","native","php","php-monitor","phpmon","swift","symfony","valet"],"created_at":"2024-08-04T08:01:34.938Z","updated_at":"2026-03-07T23:10:20.189Z","avatar_url":"https://github.com/nicoverbruggen.png","language":"Swift","readme":"\u003e **Note**\n\u003e If this software has been useful to you, I ask that you **please star the repository**, that way I know that the software is being used. Also, please consider [sponsoring](https://nicoverbruggen.be/sponsor) to support the project, as this is something I make in my free time. **Thank you!** ⭐️\n\n\u003cp align=\"center\"\u003e\u003cimg src=\"./docs/logo.png\" alt=\"PHP Monitor Logo\" width=\"500px\" /\u003e\u003c/p\u003e\n\n**PHP Monitor** (or *phpmon*) is a lightweight macOS utility app that runs on your Mac and displays the active PHP version in your status bar. It's tightly integrated with [Laravel Valet](https://github.com/laravel/valet), so \u003cu\u003eyou need to have it set up if you want to use all of the functionality of the app\u003c/u\u003e (consult the FAQ below with info about how to set up your environment).\n\n\u003cimg src=\"./docs/screenshot.jpg\" width=\"1280px\" alt=\"phpmon screenshot (menu bar app)\"/\u003e\n\n\u003csmall\u003e\u003ci\u003eScreenshot: Showing the key functionality of PHP Monitor.\u003c/i\u003e\u003c/small\u003e\n\nIt's super convenient to switch between different versions of PHP. You'll even get notifications (only if you choose to opt-in, of course)!\n\n\u003cimg src=\"./docs/notification.png\" width=\"370px\" alt=\"phpmon screenshot (notification)\"/\u003e\n\nPHP Monitor also gives you quick access to various useful functionality (like accessing configuration files, restarting services, and more).\n\nYou can also add new domains as links, isolate sites, manage various services, and perform First Aid to fix all kinds of common PHP link issues.\n\n## 🖥 System requirements\n\nPHP Monitor is a universal application that runs natively on Apple Silicon **and** Intel-based Macs.\n\n* Your user account can administer your computer (required for some functionality, e.g. certificate generation)\n* macOS 12.4 or later\n* Homebrew is installed in the default location (`/usr/local/homebrew` or `/opt/homebrew`)\n* Homebrew `php` formula is installed\n* Optional but recommended: Laravel Valet\n\n_Starting with PHP Monitor 6.0, you do not need to have Laravel Valet installed for PHP Monitor to work. To get access to all features of PHP Monitor however, installing Valet is **recommended**._\n\nFor more information, please see [SECURITY.md](./SECURITY.md) to find out which version of the app is currently supported.\n\n## 🚀 How to install\n\nAgain, if you want to have access to *all features* of PHP Monitor, I recommend installing **[Laravel Valet](https://laravel.com/docs/master/valet)** first:\n\n```sh\ncomposer global require laravel/valet\nvalet install\nvalet trust\n```\n\nCurrently, PHP Monitor is compatible with Laravel Valet v2, v3 and v4. Each of these versions of Valet support slightly different PHP versions, which is why legacy versions remain supported. Please note that some features are not available in older versions of Valet, like site isolation.\n\n#### Manual installation (recommended, first time only)\n\nOnce that's done, you can [download the latest release](https://github.com/nicoverbruggen/phpmon/releases/latest), unzip it and place it in `/Applications`.\n\n#### Installation via Homebrew\n\n*Prior to version 5.8, this was the recommended way of installing PHP Monitor.*\n\nIf you prefer to install the app via Homebrew, you can also run the following:\n\n```sh\nbrew tap nicoverbruggen/homebrew-cask\nbrew install --cask phpmon\n```\n\n## ⬆️ How to update\n\nThe recommended method of updating the app to the latest version is to use **the built-in updater**.\n\nIf you have a very slow internet connection, the updater may report that the download has timed out. In that case, you may wish to manually update by [downloading the latest release](https://github.com/nicoverbruggen/phpmon/releases/latest) and placing the app in `/Applications`.\n\n(You may also use Homebrew to update PHP Monitor, but this will require you to approve the app every time an update is installed. If you use the built-in updater, this won't be necessary.)\n\n## ⚡️ Launchers (Alfred, Raycast)\n\nIf you would like to integrate with your launcher of choice, you can also download an [Alfred workflow](https://github.com/nicoverbruggen/phpmon/raw/main/integrations/phpmon.alfredworkflow) or [Raycast extension](https://www.raycast.com/nicoverbruggen/php-monitor) that works with PHP Monitor.\n\nThe app must be running in the background for these to work, and the _Allow third-party integrations_ checkbox must be enabled in Preferences (it is by default).\n\n## 🔑 Is the app signed \u0026 notarized?\n\nYes, the app is signed and notarized, meaning all you have to do is approve its first launch (or whenever it updates).\n\n## 👨‍💻 Why build this?\n\nI wanted to be able to **see at a glance** which version of PHP was linked, and handle dealing with Laravel Valet in a simple app without having to deal with the terminal every time. \n\nInitially, I had an Alfred workflow for this — but it has now been replaced with this utility, which also does a good job at displaying additional information at a glance, like the current PHP version, memory limits, and more.\n\n## 🐘 Why not use Laravel Herd?\n\n_**Disclaimer**: The author is not affiliated with Laravel or the Laravel team, nor Beyond Code, who maintain Laravel Herd. PHP Monitor is an independent project._\n\nIf you don't need to customize your local PHP setup and just want an easy and ready-to-go environment to start coding, [Laravel Herd](https://herd.laravel.com) is probably more than sufficient for many use cases. They also offer paid features that may be useful to you or your team. \n\nAt this point, many people enjoy using Herd. However, Herd may not be for everyone, which is why other solutions to run PHP locally exist. If you need more customization and flexibility I encourage you to consider PHP Monitor in combination with Laravel Valet. \n\nIf you want to get as close as you can to a real server environment your best bet is probably to use a Docker container. I _highly_ recommend that you try different setups, and use what you like best.\n\n## 🤬 The app won't start?!\n\nPHP Monitor performs some integrity checks to ensure a good experience when using the app. You'll get a message telling you that PHP Monitor won't work correctly in a variety of scenarios.\n\n**Follow instructions as specified in the alert in order to resolve any issues.**\n\n(If the app crashes at launch without showing you any of these messages, you might have a non-standard Homebrew and Valet setup. Those are not supported.)\n\n## 🙋‍♂️ FAQ \u0026 Troubleshooting\n\n\u003e If you are having issues, the first thing you should be doing is installing the latest version of PHP Monitor _and_ Laravel Valet. This can resolve a variety of issues. To upgrade Valet, run `composer global update`. Don't forget to run `valet install` after upgrading.\n\nIf you're still having issues, here's a few common questions \u0026 answers, as well as issues and solutions:\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eWhich versions of PHP are supported?\u003c/strong\u003e\u003c/summary\u003e\n\nAll stable and supported PHP versions are also supported by PHP Monitor. However, depending on which version of Valet you have installed, which versions of PHP that are made available for switching purposes may differ.\n\n\u003e **Note**\n\u003e If you have versions of PHP installed that can be detected by PHP Monitor but is *not* supported by the currently active version of Valet, you will be alerted by an item in the menu with an exclamation mark emoji. (⚠️)\n\nBackports that are installable via PHP Monitor's **PHP Version Manager** functionality are subject to availability via [this tap](https://github.com/shivammathur/homebrew-php).\n\nPHP extensions that are installable via PHP Monitor's **PHP Extension Manager** functionality are subject to availability via [this tap](https://github.com/shivammathur/homebrew-extensions).\n\nFor maximum compatibility with older PHP versions, you may wish to keep using Valet 2 or 3. For more information, please see [SECURITY.md](./SECURITY.md) to find out which versions of PHP are supported with different versions of Valet.\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eHow do I install additional versions of PHP, including legacy versions?\u003c/strong\u003e\u003c/summary\u003e\n\nAssuming you have installed the `php` formula, the latest stable version of PHP is installed. At the time of writing, this is PHP 8.3.\n\nYou can install other supported versions of PHP via PHP Monitor's **PHP Version Manager**. (You can manually install or upgrade PHP versions too, but this is not recommended.)\n\nPlease keep in mind that installing or updating PHP versions, even when done via PHP Monitor's **PHP Version Manager**, may cause other required formula dependencies (required software needed to keep those PHP versions functional) to be upgraded. It might not be very transparent when this happens, but this is likely the cause if installing a PHP version takes longer than expected: usually other dependencies are also being installed.\n\nAdditionally, upgrading one specific version of PHP may also cause other installed versions of PHP to *also* be updated in one go, if the dependencies for that one version also apply to the other (newer) version(s) of PHP. It's a bit tricky to manage PHP versions via Homebrew, and even PHP Monitor may encounter some difficulties. \n\nIf you encounter a strange scenario or a malfunction, please open an issue on the issue tracker and get in touch. I'd like to keep enhancing this process to make it as foolproof as possible.\n\n\u003e *Note*: Using PHP Monitor when managing PHP versions may cause [temporary alias conflicts](https://github.com/nicoverbruggen/phpmon/issues/54#issuecomment-979789724) while the core tap alias and the tap's alias refer to a different version of PHP, but this is generally speaking a minor inconvenience, since this normally only applies when a new PHP version releases.\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eI want PHP Monitor to start up when I boot my Mac!\u003c/strong\u003e\u003c/summary\u003e\n\nIf you are running macOS Ventura or newer, there's an option in the Settings menu that you can select: \"Start PHP Monitor at login\".\n\nIf you are on an older version of macOS, you can do this by dragging *PHP Monitor.app* into the **Login Items** section in **System Preferences \u003e Users \u0026 Groups** for your account.\n\nSuper convenient!\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eWhat features are unavailable in Standalone Mode?\u003c/strong\u003e\u003c/summary\u003e\n\nThe services manager is disabled, and all other obvious Laravel Valet integrations (configuration finder, domains list, Fix My Valet) are also disabled.\n\n(Most other features remain available.)\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eI want to set up PHP Monitor from scratch! I don't have Homebrew installed either, where do I begin?\u003c/strong\u003e\u003c/summary\u003e\n\nIf you want to set up your computer for the very first time with PHP Monitor, here's how I do it.\n\n**I have also created [a video tutorial](https://www.youtube.com/watch?v=fO3hVhkvm3w) which may be easier to follow. If you just want the terminal commands, keep reading.**\n\nInstall [Homebrew](https://brew.sh) first. Follow the instructions there first!\n\nThen, you'll need to set up your PATH. \n\n    nano .zshrc\n\nMake sure the following line is not in the comments:\n\n    # on an Intel Mac\n    export PATH=$HOME/bin:/usr/local/bin:$PATH\n\nIf you're on an Apple Silicon-based Mac, you'll need to add: \n\n    # on an M1 Mac\n    export PATH=$HOME/bin:/opt/homebrew/bin:$PATH\n\nand add the following to your `.zshrc` file, but add this BEFORE the homebrew PATH additions:\n\n    export PATH=$HOME/bin:~/.composer/vendor/bin:$PATH\n\nIf you're adding `composer` and Homebrew binaries, ensure that Homebrew binaries are preferred by adding these to the path last. On my system, that looks like this:\n\n    export PATH=$HOME/bin:/usr/local/bin:$PATH\n    export PATH=$HOME/bin:~/.composer/vendor/bin:$PATH\n    export PATH=$HOME/bin:/opt/homebrew/bin:$PATH\n\nIf you are *not* on Apple Silicon, you should remove the third line.\n\nInstall the `php` and `composer` formulae:\n\n    brew install php composer\n\nMake sure PHP is linked correctly:\n\n    which php\n\nshould return: `/usr/local/bin/php` (or `/opt/homebrew/bin/php` if you are on Apple Silicon)\n\n**If you don't need Laravel Valet, you can stop here. PHP Monitor will work like this in Standalone Mode.**\n\nIf you'd like to have Valet as well, continue and install Valet with Composer, like this.\n\n    composer global require laravel/valet\n\nFor optimal results, you should lock your PHP platform for global dependencies to the oldest version of PHP you intend to run. If that version is PHP 7.0, your `~/.composer/composer.json` file could look like this (please adjust the version accordingly!):\n\n```\n{\n    \"require\": {\n        \"laravel/valet\": \"^3.0\",\n    },\n    \"config\": {\n        \"platform\": {\n            \"php\": \"7.0\"\n        }\n    }\n}\n```\n\nRun `composer global update` again. This ensures that when you switch to a different global PHP version, [Valet won't break](https://github.com/nicoverbruggen/phpmon/issues/178). If it does, PHP Monitor will let you know what you can do about this.\n\nThen, install Valet:\n\n    valet install\n\nThis should install `dnsmasq` and set up Valet. Great, almost there!\n\n    valet trust\n\nFinally, run PHP Monitor. Since the app is notarized and signed with a developer ID, it should work. You will need to approve the initial launch of the app, but you should be ready to go now.\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eHow frequently does PHP Monitor check for updates?\u003c/strong\u003e\u003c/summary\u003e\n\nPHP Monitor will check if an update is available every time you start the app.\n\nYou can disable this behaviour by going to Preferences (via the PHP Monitor icon in the menu bar) and unchecking \"Automatically check for updates\". (You can always check for updates manually.)\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eI have PHP Monitor installed, and it works. I want to upgrade my PHP installations to the latest version, what's the best way to do this?\u003c/strong\u003e\u003c/summary\u003e\n\nThe easiest way is to simply use the built-in **PHP Version Manager**, which will allow you to upgrade your PHP versions with one click.\n\nIf you want to do this manually, you can follow the instructions below.\n\nIt's easy to make a mistake here, and end up with an unlinked version of PHP or have versions missing from PHP Monitor.\n\nHere's what I usually do:\n\n* Open PHP Monitor and select **First Aid \u0026 Services** \u003e **Restore Homebrew Permissions**.\n* Close PHP Monitor after the pop-up tells you the permissions were restored.\n* Run `brew update-reset`\n* Run `brew upgrade`\n\nIf after this, any PHP versions are missing in PHP Monitor, please run the following for the versions that are missing:\n\n* Run `brew uninstall php@x.x` (where `x.x` is the version)\n* Run `brew cleanup` (if you get any permission issues you may need to manually clean up the folder)\n* Run `brew install php@x.x` (where `x.x` is the version)\n\nYou may still need to run `brew link php` after upgrading, too.\n\nThat's it. Now start up PHP Monitor again and you should be golden!\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003ePHP Monitor tells me `php` is not installed...\u003c/strong\u003e\u003c/summary\u003e\n\nTry installing again using `brew install php`. \n\nThis should resolve the issue! If that does not fix the issue, run `brew link php --force`. (Afterwards, you may need to restart your terminal to make sure the new linked version is detected.)\n\n\tbrew install php\n\tbrew link php --force\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eValet sites won't load. I'm getting a 502 Bad Gateway error!\u003c/strong\u003e\u003c/summary\u003e\n\nIf you're visiting your `.test` domain, and you're getting a 502 (Bad Gateway) after switching to a different PHP version, you're dealing with a common issue.\n\nThis problem is usually resolved by upgrading Valet and running `valet install` again.\n\n\tcomposer global update\n\tvalet install\n \nIf you are seeing a 502 (Bad Gateway) error after about 30 seconds or so, your request is likely timing out. You may need to solve a performance issue with your own code.\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003ePHP Monitor tells me my installation is broken, but I don't see why!\u003c/strong\u003e\u003c/summary\u003e\n\nPHP Monitor tells you that a PHP installation is broken, if the configuration is causing warnings or errors when determining the version number.\n\nSince PHP Monitor changes the linked version via Homebrew, both Valet *and* your terminal (CLI) should use the new PHP version.\n\nHowever, this might not be the case on your system. You _might_ have a specific version of PHP linked if that is not the case. In that case, you may need to change your `.bashrc` or `.zshrc` file where the PATH is set (depending on the terminal you use).\n\nYou can find out which version of PHP is being used by running `which php`.\n\nYou can find out what exactly is causing the issue by running a command. On Intel, you can run (replace `7.4` with the version that is broken):\n\n```\n/usr/local/opt/php@7.4/bin/php -r \"print phpversion();\"\n```\n\nOn Apple Silicon, you can run (replace `7.4` with the version that is broken):\n\n```\n/opt/homebrew/opt/php@7.4/bin/php -r \"print phpversion();\"\n```\n\nYou should see an error or a warning here in the output. \n\nUsually this is a duplicate extension declaration causing issues, or an extension that couldn't be loaded. You'll have to solve that issue yourself (usually by removing the offending extension or reinstalling).\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eThe option to isolate a site is disabled! What's going on?\u003c/strong\u003e\u003c/summary\u003e\n\nMake sure you have at least **Valet 3.0** installed, since support for isolation was added in this version of Valet. (Please note that this version of Valet drops support for PHP 5.6.)\n\u003c/details\u003e\n\t\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eOne of the limits (memory limit, max POST size, max upload size) shows an exclamation mark!\u003c/strong\u003e\u003c/summary\u003e\n\nThe value you provided in your `.ini` file is invalid. If that is the case, PHP will attempt to parse your value as bytes, which is usually unintended. (`1GB` will resolve to merely a few bytes, and all of your applications will run out of memory!)\n\nYou must a provide a value like so: `1024K`, `256M`, `1G`. Alternatively, `-1` is also allowed, or just an integer (which will result in N amount of bytes being the limit).\n\n**Example**: Trying to use `1GB` as the memory limit, for example, will result in this exclamation mark. The correct way to set a 1GB limit is by using `1G` as the value. (Note: The displayed value will append `B` for clarity, so if you set `1G`, the value reported by PHP Monitor will be 1 GB.)\n\n(If you are using Valet, you can adjust these limits in the `.conf.d/php-memory-limits.ini` file. Otherwise, you may need to adjust `php.ini`.)\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eOne of my commented out extensions is not being detected...\u003c/strong\u003e\u003c/summary\u003e\n\nThe app searches in the relevant `.ini` files for a specific pattern. For regular extensions:\n\n* `extension=\"*.so\"`\n* `; extension=\"*.so\"`\n\nFor Zend extensions:\n\n* `zend_extension=\"*.so\"`\n* `; zend_extension=\"*.so\"`\n\nThe `*` is a wildcard and the name of the extension. If you've commented out the extension, make sure you've commented it out with a semicolon (;) and a single space after the semicolon for PHP Monitor to detect it.\n\nSince v3.4 all of the loaded .ini files are sourced to determine which extensions are enabled.\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eI've got two Homebrew installations on my Apple Silicon Mac, can I choose which installation to use with PHP Monitor?\u003c/strong\u003e\u003c/summary\u003e\n\nIf you are using PHP Monitor on an Intel machine or on an Apple Silicon machine with Rosetta enabled, PHP Monitor expects the main Homebrew binary in `/usr/local/bin/brew`.\n\nIf you are using PHP Monitor on Apple Silicon without Rosetta, PHP Monitor expects the main Homebrew binary in `/opt/homebrew/bin/brew`.\n\nIf there's an issue here, you'll get an alert at launch.\n\nMake sure that the version of Homebrew that you are running normally is the same as the one that PHP Monitor expects. If you are on M1 hardware for example, but still using Rosetta for Homebrew, you'll need to run PHP Monitor under Rosetta as well. \n\nPHP Monitor is a universal app and supports both architectures, so [find out here](https://support.apple.com/en-us/HT211861) how to enable Rosetta with PHP Monitor.\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eWhy is the app doing network requests?\u003c/strong\u003e\u003c/summary\u003e\n\nThe app will automatically check for updates, which is the most likely culprit. \n\nThis happens at launch (unless disabled), and the app directly checks the Caskfile hosted on GitHub. This data is not, and will not be used for analytics (and, as far as I can tell, cannot).\n\nI also can't prevent `brew` from doing things via the network when PHP Monitor uses the binary.\n\nThe app includes an Internet Access Policy file, so if you're using something like Little Snitch there should be a description why these calls occur.\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eHow do I various presets to show up?\u003c/strong\u003e\u003c/summary\u003e\n\nYou must set these presets up in a JSON file, located in `~/.config/phpmon/config.json`. \n\nYou must have set up at least one valid preset for this presets to work in PHP Monitor.\n\nHere's an example of a working preset:\n\n\u003cpre\u003e\n{\n    \"scan_apps\": [],\n    \"services\": [],\n    \"presets\": [\n        {\n            \"name\": \"Legacy Project\",\n            \"php\": \"8.0\",\n            \"extensions\": {\n                \"xdebug\": false\n            },\n            \"configuration\": {\n                \"memory_limit\": \"128M\",\n                \"upload_max_filesize\": \"128M\",\n                \"post_max_size\": \"128M\"\n            }\n        }\n    ],\n    \"export\": {}\n}\n\u003c/pre\u003e\n\nYou can omit the `php` key in the preset if you do not wish for the preset to switch to a given PHP version.\n\n\u003e **Warning**\n\u003e You must restart PHP Monitor for these changes to be detected.\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eHow do I ensure additional Homebrew services are shown in the app?\u003c/strong\u003e\u003c/summary\u003e\n\n\u003e **Info**\n\u003e Homebrew services aren't displayed if you are using Valet in Standalone Mode.\n\nYou must set these services up in a JSON file, located in `~/.config/phpmon/config.json`. \n\nYou can specify custom services in the configuration file for Homebrew services that run as your own user (not root). \n\n\u003e **Info**\n\u003e If your service must run as root, it cannot currently be added to PHP Monitor.\n\nYou can find out which services are available by running `brew services list`. \n\nHere's an example where we add the `mailhog` and `mysql` services to PHP Monitor:\n\n\u003cpre\u003e\n{\n    \"scan_apps\": [],\n    \"services\": [\"mailhog\", \"mysql\"],\n    \"presets\": [],\n    \"export\": {}\n}\n\u003c/pre\u003e\n\n\u003e **Warning**\n\u003e You must restart PHP Monitor for these changes to be detected.\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eHow do I set custom environment variables?\u003c/strong\u003e\u003c/summary\u003e\n\nYou must configure these custom environment variables up in a JSON file, located in `~/.config/phpmon/config.json`. \n\nPHP Monitor uses a default Shell environment, with no custom environment variables. You need to set custom environment variables manually. These are then used for e.g. Composer.\n\nHere's an example of a working `COMPOSER_HOME` environment variable which is respected:\n\n\u003cpre\u003e\n{\n    \"scan_apps\": [],\n    \"services\": [],\n    \"presets\": [],\n    \"export\": {\n        \"COMPOSER_HOME\": \"/absolute/path/to/composer/folder\"\n    }\n}\n\u003c/pre\u003e\n\n\u003e **Warning**\n\u003e You must restart PHP Monitor for these changes to be detected.\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eHow do I get various applications to show up in the domain list's right-click menu?\u003c/strong\u003e\u003c/summary\u003e\n\nWhen you select and right-click on a domain, you can open these directories with various applications. This can help speed up your workflow. However, for these apps to show up, they must be detected first.\n\nThe supported apps are: \u003ci\u003ePhpStorm, Visual Studio Code, Sublime Text, Sublime Merge, iTerm\u003c/i\u003e.\n\nAll of these apps should just be detected correctly, no matter their location on your system. If you can open it using `open -a \"appname\"`, the app should be detected and work. If you have renamed the app, there might be an issue getting it detected.\n\nTo see which files are checked to determine availability, see [this file](./phpmon/Domain/Helpers/Application.swift).\n\nYou can add your own apps by creating and editing a `~/.config/phpmon/config.json` file, and make sure the `scan_apps` key is set:\n\n\u003cpre\u003e\n{\n    \"scan_apps\": [\"Xcode\", \"Kraken\"]\n}\n\u003c/pre\u003e\n\nYou can put as many apps as you'd like in the `scan_apps` array, and PHP Monitor will check for the existence of these apps. You do not need to set the full path, just the name of the app should work. Not all apps support opening a folder, though, so your success might vary.\n\n\u003e **Warning**\n\u003e You must restart PHP Monitor for these changes to be detected.\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eHow can the app integrate with third party tools, like Alfred or Raycast?\u003c/strong\u003e\u003c/summary\u003e\n\nPHP Monitor supports third party app integrations by default, and this feature is enabled in Preferences unless you disable it.\n\nYou can grab the official [Alfred workflow](https://github.com/nicoverbruggen/phpmon/raw/main/integrations/phpmon.alfredworkflow) or [Raycast extension](https://www.raycast.com/nicoverbruggen/php-monitor).\n\nIf you'd like to integrate something yourself, all you need to to is use the `phpmon://` protocol and ensure that third party app integrations are enabled in Preferences (in PHP Monitor).\n\nUsing app callbacks, macOS and PHP Monitor allow for the following to be called:\n\n* phpmon://list\n* phpmon://services/stop\n* phpmon://services/restart/all\n* phpmon://services/restart/nginx\n* phpmon://services/restart/php\n* phpmon://services/restart/dnsmasq\n* phpmon://locate/config\n* phpmon://locate/composer\n* phpmon://locate/valet\n* phpmon://phpinfo\n* phpmon://switch/php/{version}\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eHow does the app know what PHP version is required for my app?\u003c/strong\u003e\u003c/summary\u003e\n\nThe `composer.json` file in the root of the folder (if it exists) is scanned and interpreted.\n\nIf the version is set in `platform`, it takes precendence.\nIf the version is not set in `platform` but it is in `require` (most common) then that version is used.\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eWhat do the checkmarks next to the PHP version mean in the site list?\u003c/strong\u003e\u003c/summary\u003e\n\nYou'll see a checkmark next to the version number if the currently enabled PHP version is compatible with the version required to run the site. \n\nThis is determined by evaluating the PHP requirement constraint (e.g. `^8.0`, `~8.0` or a specific version: `8.0`).\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eWhy can't I see the driver type any more? It says \"Project Type\" now.\u003c/strong\u003e\u003c/summary\u003e\n\nPHP Monitor currently checks your `composer.json` file to try to figure out what project you are running. \n\nThis approach is a lot faster than asking for a driver when you have many sites linked, but is slightly less reliable since the framework or type of project inferred via `composer.json` might not be 100% accurate.\n\nYou can always still ask Valet using the command line, should it be necessary. In my experience fetching the drivers slowed down the app unnecessarily.\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eAfter running PHP Monitor, Homebrew sometimes has issues with `brew upgrade` or `brew cleanup`!\u003c/strong\u003e\u003c/summary\u003e\n\nYou can now use **First Aid \u0026 Services \u003e Restore Homebrew Permissions** to (temporarily) resolve this issue and allow for a clean and painless `brew upgrade` or `brew cleanup` process.\n\nIf you would like to know more, consult [this issue](https://github.com/nicoverbruggen/phpmon/issues/85) for more information about why this is needed.\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eThe app has crashed!\u003c/strong\u003e\u003c/summary\u003e\n\nPlease get in touch and open an issue. PHP Monitor shouldn't crash... (unless you are actually removing PHP *while* the app is running, that’s considered normal behaviour!)\n\nIf you would like to report a crash, please include the associated **log files** so I can find out what exactly went wrong.\n\nTo find the logs, take a look in `~/Library/Logs/DiagnosticReports` (in Finder) and see if there's any (log) files that start with \"PHP Monitor\".\n\nAdditionally, you can help me figure out even more information by sending me your verbose log for your latest session of PHP Monitor. Logging is disabled by default. \n\nYou can start extra verbose logging by running: `touch ~/.config/phpmon/verbose` and restarting PHP Monitor. You can find the latest log in: `~/.config/phpmon/last_session.log`. Please attach it to the relevant bug report.\n\n\u003c/details\u003e\n\n## 📝 Having another issue?\n\nI did not include any tracking or analytics software, so if you encounter issues, let me know [via an issue](https://github.com/nicoverbruggen/phpmon/issues/new).\n\n## 💵 Support me?\n\nPHP Monitor is available entirely **free of charge**, but if you can afford it a donation helps keep the project alive and the app maintained.\n\nYou can find a [sponsor](https://nicoverbruggen.be/sponsor) link at the top of this repo or you could click the link here to be taken to my sponsorship page.\n\nDonations really help with the Apple Developer Program cost, and keep me motivated to keep working on PHP Monitor outside of work hours (I do have a day job!).\n\n## 😎 Acknowledgements\n\nSpecial thanks go out to:\n\n* Everyone supporting me via [GitHub Sponsors](https://github.com/sponsors/nicoverbruggen)\n* Everyone who has donated via [my sponsor page](https://nicoverbruggen.be/sponsor)\n* The [Homebrew](https://brew.sh/) team \u0026 [Valet maintainers](https://github.com/laravel/valet/graphs/contributors)\n* Various folks who [reached](https://twitter.com/stauffermatt) [out](https://twitter.com/marcelpociot) when PHP Monitor was still very much a small app with a handful of stars or so\n* Everyone who has left feedback and reported bugs\n* Everyone in the Laravel community who shared the app, especially on Twitter\n\nThank you very much for your contributions, kind words and support.\n\n## 🚜 How it works\n\n### Loading info about PHP in the background\n\nThis app runs `php-config --version` in the background periodically, usually whenever your Homebrew configuration is modified. A filesystem watcher is used to determine if anything changes in your Homebrew's `bin` directory. \n\nPHP Monitor also checks your `.ini` files for extensions and loads more information about your limits (memory limit, POST limit, upload limit). See also the section on *Config change detection* below.\n\n### Switching PHP versions\n\nThis utility will detect which PHP versions you have installed via Homebrew, and then allows you to switch between them.\n\nThe switcher will disable all PHP-FPM services not belonging to the version you wish to use, and link the desired version of PHP. Then, it'll restart your desired PHP version's FPM process. This all happens in parallel, so this should be a bit faster than Valet’s switcher.\n\nIf you're using Valet 3 or newer, versions of PHP-FPM required to keep isolated sites up and running will also be started or stopped as needed.\n\n### Config change detection\n\nPHP Monitor watches your filesystem in the relevant `conf.d` directory for the currently linked PHP version. \n\nWhenever an .ini file is modified, PHP Monitor will attempt to reload the current information about the active PHP installation. \n\nIf an extension or other process writes to a single file a bunch of times in a short span of time (\u0026lt; 1 sec), PHP Monitor will only reload the active configuration information after a while (with a slight delay).\n\n### Site detection\n\n1. **Location of your sites**: PHP Monitor uses the Valet configuration file to determine which folders to look into. Each folder is scanned and then PHP Monitor will validate if a composer.json file exists to determine the desired PHP version.\n1. **Sites secured or not secured**: Whether the directory has been secured is determined by checking if a matching certificate exists under Valet's `Certificates` directory for that site name.\n1. **Project type**: PHP Monitor checks your `composer.json` file for \"notable dependencies\". If you have `laravel/framework` in your `require`, there's a good chance the project type is `Laravel`, after all.\n\n\u003e **Note**\n\u003e If you have linked a folder in Documents, Desktop or Downloads you might need to grant PHP Monitor access to those directories for PHP Monitor to work correctly.\n\n### Want to know more?\n\nIf you want to know more about how this works, I recommend you check out the source code.\n\nI have done my best to annotate as much as humanly possible, and have avoided using an overly complicated architecture to keep the code as easy to maintain as possible. The code isn't perfect by a long shot (lots of cleanup can still happen!) but the application works well.\n\nI also have a few tests for key parts of the application that I found needed to be tested. In the future, I would like to add even more tests for some of the UI stuff, but for now the tests are more unit tests than feature tests.\n\nFor more detailed information for developers, please see [the documentation file for developers](./DEVELOPER.md).\n","funding_links":["https://github.com/sponsors/nicoverbruggen","https://nicoverbruggen.be/sponsor"],"categories":["Table of Contents","Swift"],"sub_categories":["Dev Tools"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnicoverbruggen%2Fphpmon","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnicoverbruggen%2Fphpmon","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnicoverbruggen%2Fphpmon/lists"}