phpmon

Lightweight, native Mac menu bar app that helps you manage multiple PHP installations, locate config files and more. Also interacts with Laravel Valet.

MIT License

Stars
3.1K
Committers
4

Bot releases are visible (Hide)

phpmon - v5.0

Published by nicoverbruggen over 2 years ago

If you're installing PHP Monitor for the first time, please check out the README at here on GitHub before asking questions. There's also an excellent FAQ in the README in case you're having issues.

Upgrade

The recommended way of upgrading is running brew upgrade phpmon after you've installed PHP Monitor using Homebrew. This always gets you the latest and greatest stable version of PHP Monitor. If you did not use Homebrew to install the app, you can download a zip below (by expanding Assets and choosing phpmon.zip).

What's New

I have made a demonstration video showcasing the new features in PHP Monitor 5.0, check it out!
If you'd like to see a more general breakdown of what's new with screenshots, see this blogpost on my site.

  • Link a Folder. Wait, you couldn't do this before? No. But you can now! You can now press the + button in the site list to add a folder as a link to Valet. You'll be able to customize the name of the link and automatically secure the site without any extra steps. Convenient!

  • Wow, the site list is a lot faster now! Loading the sites in the "Linked & Parked Domains" section is now faster than ever. I have also fixed the scrolling, which was rather laggy. Optimization, baby. If you have more than 50 sites listed, this will be like night & day.

  • Instant & Smarter Search. Yes, faster than ever, but also more powerful than ever. You can now search for multiple queries: searching for "term1 term2" will find entries that contain both words in the name of the site, but this does not need to be a full match. Want to find "my-nice-website-with-valet"? You can search for "nice valet" and find it now!

  • "Driver Type" has changed, and is now "Project Type". In order to make "Linked & Parked Domains" a lot faster, PHP Monitor no longer asks Valet what driver is being used. Instead, it scans your composer.json file to find out what kind of framework you're using.

  • Services indicator in the menu. Every time you open the menu, the status of the Homebrew services is now retrieved in the background and also updated periodically. In case Valet isn't working, you'll be able to tell if it's the services that are disabled.

  • Identify PHP versions in the site list, at a glance. Not only can you now see what the PHP requirement is that you set up in composer.json on a per-project basis in the site list, but you can also see what version of Laravel you have in the require section of your composer.json file.

  • Easy compatibility check for sites: If the currently linked version of PHP is compatible with the constraint detected in composer.json, you'll see a green checkmark.

  • Get suggestions for which version of PHP to switch to. If you click on the version number next to the site (if composer.json was valid and detected), PHP Monitor will automatically determine which versions of PHP that you have installed are compatible with the constraint and suggest a version to switch to. If you have PHP 7.4 and 8.0 installed, but the site requires ^8.0, PHP Monitor will propose switching to 8.0.

  • Changes in .ini files are detected in real-time. PHP Monitor now uses a very performant system API to watch various .ini files for the currently linked PHP version. If you make a change, PHP Monitor will update its information immediately.

  • Automatically update global composer dependencies when changing PHP versions. This is a new preference that you can enable, it's off by default. You can also manually update these global dependencies by using the menu item "Update Global Composer Dependencies...". Makes sense!

  • Fix My Valet. The "Force Link PHP" functionality has been renamed, and is now a bit more informative. If switching between PHP versions has failed, PHP Monitor will now also suggest to run Fix My Valet.

  • Link additional apps for the site list. By having a valid .phpmon.conf.json file in your home folder (~) you can now add additional apps that should be available in the site list's right-click menu. More information here. Make sure to have a valid JSON file here, or the apps will not be detected.

  • Alfred integration. You'll need to download the workflow file to get started. Please note that you need to have PHP Monitor up and running before any of these work, so you may want to start PHP Monitor when you boot up your Mac. You can then type "pm" in Alfred and use common interactions! (I will be looking into getting a Raycast extension in order soon.)

  • A one-time donation encouragement message. If you've launched the app more than a couple of times (or have switched between PHP versions like... 40 times), you'll get a one-time message to encourage you to donate a bit to keep the project going. Sending a tip really helps: thanks to the support of those who have donated before, I was able to bring you this entire list of changes. Thank you.

Improvements

  • The size of the main site list and its position is now remembered. No more manually resizing and repositioning the site list!
  • A new preference was added to hide the "PHP" next to the version number in the menu bar. For minimalists.
  • The services section is now available under the "First Aid & Services" menu item at the bottom. If all you use is PHP Monitor, you will never need this.
  • The app now looks better in the dark than ever with a color palette that supports both light and dark macOS appearance, and is different for both rendering modes. I previously used unflattering colors that were used in both modes. No more!
phpmon - v4.2.0

Published by nicoverbruggen over 2 years ago

Ever since PHP Monitor 4.1, the app now requires at least macOS 11 (Big Sur). If you're using an older version of macOS, please install v4.0, as it is the last version that will support older macOS releases.

The recommended way of upgrading is running brew upgrade phpmon after you've installed PHP Monitor using Homebrew. It is recommended to run composer global update && valet install after upgrading, as this updates both Valet and your other dependencies.

What’s New In v4.2.0

This is a bugfix release for those folks having issues with v4.1.x, and mostly addresses #99 and fixes a performance issue in the site list.

  • Fixes an issue with starting the app if you have a recent version of Fig installed (#99).
  • Fixes a performance issue due to not caching the username of the user who is running the PHP Monitor process. This is a hotfix which is expanded upon in v5.0b2 by making a bunch of other things also a lot faster. In v4.2, this fix should help with scrolling speeds for users with many sites and should also help with search speed (regardless of the number of sites).

For changes in previous versions of 4.x, please see the older release notes.

phpmon - v4.1.2

Published by nicoverbruggen almost 3 years ago

PHP Monitor 4.1 now requires at least macOS 11 (Big Sur). If you're using an older version of macOS, please install v4.0.

The recommended way of upgrading is running brew upgrade phpmon after you've installed PHP Monitor using Homebrew. It is recommended to run composer global update && valet install after upgrading, as this updates both Valet and your other dependencies.

It is also recommended that you run valet trust again before running the app if you're upgrading from v4.1.1 or older. For more information on why, read on.

What’s New In v4.1.2

This is a bugfix release for those folks having issues with v4.1 and v4.1.1, and mostly addresses #77.

Previously, Valet was invoked via the ~/.composer/bin path, but it is possible that running valet secure has created an entry in sudoers that references the symlink in the Homebrew bin directory instead. This will cause all superuser-enabled interactions with Valet (secure & unsecure, for example) to always fail. (Oops. That's no good!)

Since valet trust will always create the symlink, and since running valet trust is a requirement for the app to work correctly, PHP Monitor now uses the symlinked binary instead. Said binary should be able to run with superuser permissions without issues.

PHP Monitor might ask for you to run valet trust again at launch. If you're not sure your Valet installation is supported by PHP Monitor, you can run:

valet trust --off
valet trust

For changes in 4.1 and 4.1.1, please see the older release notes.

phpmon - v4.1.1

Published by nicoverbruggen almost 3 years ago

PHP Monitor 4.1 now requires at least macOS 11 (Big Sur). If you're using an older version of macOS, please install v4.0.

The recommended way of upgrading is running brew upgrade phpmon after you've installed PHP Monitor using Homebrew. It is recommended to run composer global update && valet install after upgrading, as this updates both Valet and your other dependencies.

What’s New In v4.1.1

  • Fixed an issue with folders that include spaces. (#74)
  • In the list of linked and parked folders, there is now an indicator that displays if a site will be unreachable due to the folder name being incompatible with the browser (for now only spaces are checked).
  • Fixed an issue with the preloading of sites (linked and parked) which happened regardless of the amount of sites, leading to slowdown. To increase the speed of PHP Monitor, if you have more than 10 linked and parked sites, this load is deferred until you open the list for the first time.

What’s New In v4.1

  • Valet version detection. PHP Monitor will now alert you when your version of Valet does not properly support the latest version of PHP. Currently this means you need at least Valet 2.16.2 installed.
  • Detect Valet sites. PHP Monitor now has the option to display all linked and parked domains in a convenient list. You can then perform common operations on these sites: open them in your browser, secure/unsecure, unlink, open in your favorite editor... all from a single right-click! (Linking via the GUI is currently not possible yet, that’s coming later.)
  • Tweaked indicator in menu bar. Instead of just showing the version number, there’s a little bit of text on the left that says "PHP", to make it clear that this is PHP Monitor in action. (This was done to use as little space as possible, and as such there is currently no preference to disable this. I might add one later.)

This release also includes further refinements and bug fixes.

phpmon - v4.1

Published by nicoverbruggen almost 3 years ago

PHP Monitor 4.1 now requires at least macOS 11 (Big Sur). If you're using an older version of macOS, please install v4.0.

The recommended way of upgrading is running brew upgrade phpmon after you've installed PHP Monitor using Homebrew. It is recommended to run composer global update && valet install after upgrading, as this updates both Valet and your other dependencies.

What’s New In v4.1

  • Valet version detection. PHP Monitor will now alert you when your version of Valet does not properly support the latest version of PHP. Currently this means you need at least Valet 2.16.2 installed.
  • Detect Valet sites. PHP Monitor now has the option to display all linked and parked domains in a convenient list. You can then perform common operations on these sites: open them in your browser, secure/unsecure, unlink, open in your favorite editor... all from a single right-click! (Linking via the GUI is currently not possible yet, that’s coming later.)
  • Tweaked indicator in menu bar. Instead of just showing the version number, there’s a little bit of text on the left that says "PHP", to make it clear that this is PHP Monitor in action. (This was done to use as little space as possible, and as such there is currently no preference to disable this. I might add one later.)

This release also includes further refinements and bug fixes.

phpmon - v4.0

Published by nicoverbruggen almost 3 years ago

Upgrade Instructions

The recommended way of upgrading is running brew upgrade phpmon after you've installed PHP Monitor using Homebrew.
Because a new version of PHP has dropped, however, it is recommended that you run the following:

brew update
brew upgrade phpmon
brew upgrade php
brew install [email protected]
valet install

This will upgrade your PHP installation to 8.1, and install 8.0 (which was previously the latest, stable release).
If you are having issues with conflicts or incorrect linking, please see #54.

What’s New In v4.0

  • Added an option to view the full PHP version number in the menu bar and switcher (#53)
  • Added an option to automatically restart PHP-FPM when an extension is toggled (#32)
  • Added support for symlinked .ini files in the .conf.d directory (requires gsed, which is installed as a dependency if you install or upgrade via Homebrew; users who download the app will need to run brew install gnu-sed to support this functionality) (#47)
  • Added php alias conflict detection, which is hopefully not needed once you've run brew update (#56).
phpmon - v3.5

Published by nicoverbruggen about 3 years ago

The recommended way of upgrading is running brew upgrade phpmon after you've installed PHP Monitor using Homebrew. If you haven't, you can download the .zip below. It is recommended to run valet install after upgrading.

Here's what's changed:

  • Added support for macOS Monterey
  • Added support for PHP 8.1 and 8.2 (currently pre-release versions, installable via here)

These minor changes were also made:

  • Improved detection of extensions (#45)
  • Adjusted notification body to fit in a single line on macOS Monterey (now that the icon is larger)
  • Code style fixes & minor performance improvements

Download available below or via Homebrew. SHA256: dd709325d41d842aeb773162431f946eb9493d285d994936804c1af45e4c7038

phpmon - v3.4

Published by nicoverbruggen over 3 years ago

The recommended way of upgrading is running brew upgrade phpmon after you've installed PHP Monitor using Homebrew. If you haven't, you can download the .zip below. It is recommended to run valet install after upgrading.

New in this release:

  • Global hotkey added: You can now go to Preferences and set up a global hotkey to trigger PHP Monitor.
  • More hotkeys: Each item that triggers an action should now have a shortcut; extensions are limited to the first nine (extensions 10 and onwards don't have a shortcut).
  • Scan all .ini files: Often requested, and finally here. All your .ini files are now scanned for extensions.
  • Speed boost for PHP version switch: The brew commands that PHP Monitor runs in the background are now parallelized (where possible) so you should see a speed boost of a few seconds if you have multiple PHP versions installed.
  • Detect broken PHP-FPM configuration: Valet actually modifies your PHP-FPM configuration. If you install a new version of PHP and Valet hasn't configured that PHP-FPM instance yet, you'll get 502 Bad Gateway errors until you run valet install again. Now PHP Monitor will let you know what's going on when that happens.
  • Locate your global composer.json file. Instantly opens Finder and highlights your global composer file.
  • Stop all services has been added, and will let you know via a notification when it is done.
  • Restart all services will also let you know when the services are done restarting via an additional notification.

As usual, if you encounter any issues with this new release, please let me know by creating an issue.

phpmon - v3.3

Published by nicoverbruggen over 3 years ago

  • PHP Monitor now lets you refresh the information that it displays on command, instead of just having to wait for the information to update. Just press Command-R to refresh the menu, just like you would in a browser. (Alternatively, you can press the menu item, too.) PHP Monitor's menu opens again automatically to display the updated information. (#24)

  • Not a fan of the PHP version number in your menu bar? I get it! You can now go to Preferences in the menu and deselect "Show a dynamic icon in the menu bar" to get a simple truck icon instead. Enjoy. (#25)

  • If you've got Valet installed in ~/.composer/vendor/bin/valet but not symlinked, PHP Monitor will now work correctly. (#27)

  • In rare scenarios, duplicate menu items of "Switch to PHP X" would appear. This should now no longer happen. (#30)

  • The "About PHP Monitor" option now also shows useful links to this repository and directly links to the FAQ & Troubleshooting section.

phpmon - v3.2

Published by nicoverbruggen over 3 years ago

Important: It is a good idea to run valet install after upgrading to a new version of PHP Monitor. If you are encountering issues, please check out the Quick Troubleshooting section in the README.

  • PHP Monitor now respects valet installed in either /usr/local/bin/valet or /opt/homebrew/bin/valet. This was causing issues for new Valet installations.

  • The method that is used to determine the presence of Valet has changed; which valet isn't used, only the existence of a binary is checked. If the file exists (in either /usr/local/bin or /opt/homebrew/bin) then PHP Monitor will start up. (This should fix issues with new installations on brand new Apple Silicon systems.)

phpmon - v3.1

Published by nicoverbruggen over 3 years ago

Important: It is a good idea to run valet install after upgrading to a new version of PHP Monitor. If you are encountering issues, please check out the Quick Troubleshooting section in the README.

  • PHP Monitor now respects valet installed in either /usr/local/bin/valet or /opt/homebrew/bin/valet. This was causing issues for new Valet installations.
  • PHP Monitor now runs on macOS Mojave, but you should probably upgrade to Big Sur if you can.
phpmon - v3.0

Published by nicoverbruggen over 3 years ago

Important: It is a good idea to run valet install after upgrading to a new version of PHP Monitor. If you are encountering issues, please check out the Quick Troubleshooting section in the README.

  • PHP Monitor now shows you various limits (max POST size, max upload size, memory limit) for the currently active PHP installation. This information is refreshed every minute.
  • You can now see all user-installed extensions that have been enabled for each individual PHP installation. The extensions shown apply to the currently active installation. You can toggle them off individually. (Previously, there was a hard-coded check for Xdebug.)
phpmon - v2.6

Published by nicoverbruggen almost 4 years ago

Important: It is a good idea to run valet install after upgrading to a new version of PHP Monitor. If you are encountering issues, please check out the Troubleshooting section in the README.

  • PHP Monitor 2.6 now supports Homebrew installations in /opt/homebrew (/opt/homebrew takes precedence)
  • Adds support for restarting dnsmasq
  • Adds support for restarting all services at once
phpmon - v2.5

Published by nicoverbruggen almost 4 years ago

Important: If you have upgraded to PHP 8.0, please run brew install [email protected], composer global update and valet install to upgrade the dependencies. This should get Valet into a workable state at which point you can make good use of PHP Monitor.

  • Initial compatibility with PHP 8.0.0 via Homebrew
  • PHP Monitor now no longer requires you have the latest version of PHP installed: it will determine via brew info php --json what version of PHP you have installed
  • If you only have php installed and you don't have [email protected] or [email protected] installed, that version now appears in the switcher
  • A new feature has been added that allows you to quickly check the phpinfo() of your current PHP setup
phpmon - v2.4

Published by nicoverbruggen almost 4 years ago

  • Added preliminary support for PHP 8.0
  • Made a universal build for both Intel and Apple Silicon-based Macs
  • Tried and tested on macOS Big Sur

You will need to upgrade to v2.5 in order to use PHP 8.0!

phpmon - v2.3

Published by nicoverbruggen about 4 years ago

  • PHP Monitor now notifies you via a convenient notification that the version switch has been completed*
  • Use localized strings (makes support for other languages possible)
  • Tweaked some text throughout the app

(*) You can always disable notifications via System Preferences > Notifications or deny permission when PHP Monitor first tries to send you a notification if you do not like this.

phpmon - v2.2

Published by nicoverbruggen over 4 years ago

  • Improved launch experience that notifies you more clearly about what is wrong with your environment if PHP Monitor cannot start
  • The app should now no longer crash if your environment is not configured correctly
phpmon - v2.1

Published by nicoverbruggen over 4 years ago

This version only supports Valet 2.8 and PHP 7.4. You need those two installed at the very least.

  • New icon for macOS Big Sur, checked compatibility with latest macOS beta
  • Builds are now notarized and can be installed via Homebrew
  • Builds now make use of the hardened runtime
  • Fixed the text of an error that incorrectly told you to install Valet via Homebrew
phpmon - v2.0

Published by nicoverbruggen over 4 years ago

This version only supports Valet 2.8 and PHP 7.4. You need those two installed at the very least.

New in this version:

  • The app now reports if your PHP installation is broken or has issues
  • The app now reports if multiple PHP services are running via Homebrew
  • The app won't crash if your PHP installation is broken or errors appear when you run php -v
  • An option has been added to force load the latest PHP version (7.4) — perfect if you're stuck or the websites nginx is serving don't match your PHP version number
  • The app now uses /bin/sh instead of /bin/bash, which on some machines will be much faster

Note: The binary below is not signed or notarized. On macOS Catalina, you need to right-click while holding ⌥ (option) and select Open. After this, macOS will ask you if you're sure you want to run the app. (Otherwise macOS will tell you that the app needs to be updated.) Future releases will be signed and notarized.

phpmon -

Published by nicoverbruggen over 4 years ago

This version only supports Valet 2.8 and PHP 7.4. You need those two installed at the very least.

  • Restructured menu items (now with extra headers)
  • Adds an option to restart nginx
  • Adds an option to restart php-fpm
  • Adds an option to open the Valet configuration folder (.config/valet)