godbout / alfred-time

Start and stop tracking time with Toggl, Harvest, Everhour or Clockify through Alfred 4. ⏰️
MIT License
110 stars 8 forks source link

Wrong PHP version #39

Open dorneanu opened 3 years ago

dorneanu commented 3 years ago

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.

nathansnelgrove commented 2 years ago

in your case you needed /opt/homebrew/opt/php@8.0/bin/. honestly i'm not 100% sure why. i haven't had a M1 yet. i guess it's because it's a versioned formula, and i guess you haven't linked it? i think homebrew installs versioned formulae but doesn't link them by default. but at the same time the which php works. don't know man. just pretending here.

I thought of this and I did link it as well on Friday evening, so you can rule that out. Whenever you get an Apple Silicon computer (or if you do), then I'd be curious what you find here.

godbout commented 2 years ago

I mean, this product is basically a free gift to anybody who shares your needs and taste, so you could start dropping f-bombs right in the UI and I'd be good with it.

yeah that's what i think too. probably i should just stop in the paid apps.

I definitely added the extra /php at the end there.

yes, so, cannot. it has to be the path that leads to the executables. not the executables themselves.

But FWIW, I also tried your second suggestion, and it didn't work. I got the same error where it couldn't find PHP. It was one of my many troubleshooting attempts on Friday night. ¯_(ツ)_/¯

huh. that is even stranger. but ok if it works now, better not touch it 😂

godbout commented 2 years ago

in your case you needed /opt/homebrew/opt/php@8.0/bin/. honestly i'm not 100% sure why. i haven't had a M1 yet. i guess it's because it's a versioned formula, and i guess you haven't linked it? i think homebrew installs versioned formulae but doesn't link them by default. but at the same time the which php works. don't know man. just pretending here.

I thought of this and I did link it as well on Friday evening, so you can rule that out. Whenever you get an Apple Silicon computer (or if you do), then I'd be curious what you find here.

will definitely do. have and let you know. just waiting for a Mac Mini update. i like portable stuff.