The offending error.

Update, 22 Sep 2021: The beta referred to in the post is now released as PopClip 2021.9.

Those of you testing the betas of macOS Monterey may have discovered some PopClip extensions missing, and the message Cannot Install Extension […] No such executable file: /usr/bin/php when trying to install them.

To get the missing extensions back:

  1. Install the PopClip beta latest version of PopClip (2021.9).

  2. Install the updated extensions:

This list isn’t finished yet - there are more to come.1

More info, for the curious

This happens because macOS Monterey does not ship with the PHP scripting language runtime, which some extensions need.

I could have ported these extensions to a different scripting language, but none is guaranteed not to be removed from macOS in future.2 Instead, I am preparing an update to PopClip which will support a new kind of extension, written in JavaScript. PopClip will run the JavaScript code directly3, instead of calling out to an external executable. This means that the new extensions will not be affected if any more scripting languages are removed from the OS.

This PopClip update is now available to download as a beta here as version 2021.9 . Once you are running the beta, you can install the new extensions listed at the top of this post.

It’s going to take me some time to port all the remaining PHP extensions to JavaScript. I will keep this post updated as I go.

I will also put out documentation for creating your own JavaScript extensions in due course.

  1. My to-do list of PHP extensions that need porting to JS includes Append, Base64Encode, Bitly, Brackets, Calculate, Convert, Droplr, HTMLEncode, Hyphenate, LinkedIn, OneNote, OnlineDictionary, Pinboard, Quiver, Quotes, Readwise, Reverse, ShortenLink, Shuffle, Slack, Sort, TaskPaper, TimeStamp, Todoist, Underscore, UnixTime, URLEncode

  2. The macOS 10.15 release notes state: “Scripting language runtimes such as Python, Ruby, and Perl are included in macOS for compatibility with legacy software. Future versions of macOS won’t include scripting language runtimes by default, and might require you to install additional packages.” 

  3. Internally, PopClip uses the JavaScriptCore framework provided by macOS, which is the same JavaScript engine that Safari uses, and the new JavaScript extensions run faster than the old shell script based ones.