alfred-time: Wrong PHP version

Hi,

I’ve been trying to add this workflow to Alfred, however, I had the wrong PHP version installed:

[11:57:57.223] Logging Stopped.
[11:57:58.749] Logging Started...
[11:58:03.071] Time[Script Filter] Queuing argument ''
[11:58:03.232] Time[Script Filter] Script with argv '' finished
[11:58:03.234] ERROR: Time[Script Filter] Code 104: Composer detected issues in your platform:

Your Composer dependencies require a PHP version ">= 7.3.0". You are running 7.1.33.
[11:58:03.235] ERROR: Time[Script Filter] JSON error: JSON text did not start with array or object and option to allow fragments not set. in JSON:
Composer detected issues in your platform:

Your Composer dependencies require a PHP version ">= 7.3.0". You are running 7.1.33.

I’ve installed PHP 7.3 using brew:

$ brew install php@7.3

But that is afterwards located at /usr/local/opt/php@7.3/bin/php. How should I change/tell the script to use that binary?

Thanks in advance.

About this issue

  • Original URL
  • State: open
  • Created 4 years ago
  • Comments: 53 (34 by maintainers)

Most upvoted comments

it’s a PHP version issue. PHP8.1 is sending warnings, which pollutes the JSON. you have to use PHP8. see link i sent above.

anyways. have fun 🚀

for the first script, paste this:

export PATH="/opt/homebrew/opt/php@8.0/bin:${PATH}"

php src/app.php "$1"

for the second script, paste this (not the same):

export PATH="/opt/homebrew/opt/php@8.0/bin:${PATH}"

php src/app.php

if this still doesn’t work i think you’ll have to wait for me to get the Mac Mini M2 because i’m like you, i don’t get it. except if Tim Cook decided to block my software because i’m so much of a djeenius.

(I’m also not sure how returning the laptop would help; if it’s a software bug — even if it’s a macOS software bug — a new machine won’t do much.)

NATHAN WHERE IS YOUR SENSE OF HUMOR!!!

should precise this in the README. will add. thanks.