-
-
Notifications
You must be signed in to change notification settings - Fork 8
Wrong PHP version #39
Comments
kinda surprised that composer is checking something actually, as the vendor packages should come preinstalled. can you try |
oh and btw you might want to install [email protected] instead. [email protected] is entering security only so i'm gonna drop it soon :D |
I've added that PATH to
That works fine when using php in the terminal. But |
ok this is more a Homebrew issue, but basically you shouldn't have a need to update your PATH. by default on macs the only thing i would have thought from your first message is that might need to link your [email protected] like this: try this. worse case you could disable the platform check from the |
I've logged out and retried again. Same error :( I even change the script to:
But the workflow still seems to use the same php binary (the 7.1.3 one) |
Changing the script in "time / Script filter" to :
did the trick. but i think this is not a general solution :) |
but you shouldn't have to change anything in the Workflow itself. the issue is that it seems (for whatever reason) that Alfred is calling PHP 7.1. by default Alfred is set to use |
also, i've installed 7.1 and tried running Alfred Time. it runs without any issues. as said, composer shouldn't check anything as all the packages provided with the Workflow. are you trying to run a |
and do you have composer installed globally? |
I had to disable the composer check:
|
well here is what's happening: you have packages installed globally that require PHP 7.3 minimum. probably you're using composer 2 which now tests requirements before dumping autoload and stuff. it seems you're using some commands (other cli tools?) that's doing something and composer is squeaking. one way to solve your issue might be to remove all your global packages, install PHP 7.3/7.4, add back your packages, do a i highly doubt that this is related to Alfred Time. again, if it was the case, you'd get a PHP parsing issue, not a composer one. the issue you're having is with your current system (still don't get why you use /opt. your available PHP version is in /usr/local/bin). |
I've re-installed everything. Nothing worked. Whatever I do the new php binary is installed at Since Alfred seems to ignore This way I don't interact with your code/script. |
hmm... I think I've found the next issue:
I'm using Clockify. And this happens whenever I try to continue on some existing task. After pressing COMMAND I don't see any list of tasks I can chose from. Should I create a new issue for this one? :D EDITED: This happens when there are no flags set for the specific tasks. |
well, this is still weird. there's binaries in if you're fine your current solution then yes please close this one and open another issue. thanks. hope your setup is not gonna bite you back later then. |
yep, saw the debug info. can't reproduce here though. with project, no tag. no project no tag. project and tag. |
did you start the tasks in Alfred? not that it should change anything, but it works here and there's automated tests. i'm afraid your weird set up is what brings more issues. |
how did you install the Workflow? packal? release from GitHub? did you run any composer install/update thing? (still that composer platform requirement thing is not normal) |
I've installed php 8.1.1 via brew.
i've downloaded the workflow form github. how should I start the workflow? what is the first command to trigger? |
sorry, Alfred Time doesn't support PHP8.1 yet. couple of packages i need haven't updated. you need to use PHP8. you can keep your PHP8.1 global and point the Workflow to use another install. link coming. |
see #46 (comment) |
should precise this in the README. will add. thanks. |
The error is not that PHP is not found is differnet.
what version of PHP should I use? |
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. |
I'm going to hop in here and say I'm actually having the same issue again on a new laptop. I've installed Brew, installed PHP 8.0 PHP is installed on the machine (verified with php -v). I tried the same export PATH trick as I did last time, which I verified worked before, and I got nothing. I ran which php and copied the file path to use that as the new export PATH, and I still have nothing. What's weird is when I type "Tim" in Alfred I see "Time Keep Tying..." as one of my options. If I select that option, Alfred gives me the UI to quickly google "Time ", rather than continue on with the workflow. I'm a little mystified. This is the first Apple Silicon machine I've tried to set up the workflow with, though. |
can you paste the debug from Alfred? hard to know without any info. seems the workflow is crashing but that's it. |
So I grabbed that, and it looks like it's having trouble finding my version of PHP. I've tried everything I can think of, but no matter where I set the path to, I get this:
I'm starting this computer from a clean install, so no cruft is carried over. Homebrew is the first thing I installed outside of the App Store (excluding 1Password), so to my knowledge, nothing is getting in its way. I only installed PHP 8.0, and none of the other versions. If I write Totally stumped. I'm sure I'm missing something obvious, but I have no clue what it is. |
screenshot incoming especially for you. |
That's how I have it set now, actually. I'm still getting the same error. |
shit that's the same thing from your other issue 🤔 |
ok stupid question but you did it for both scripts right? |
Not a stupid question at all. I didn't realize there were two scripts. I do have the second script set this way too, because it's the default. Maybe I should try the path I get from |
can you paste here the result of |
|
I will add that changing both paths results in the script with that path still results in the same error, where PHP can't be found. (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.) |
Should the language be set to bin/zsh to match macOS defaults? |
well ok my recent learning is that your macOS bash/zsh environment and the one from Alfred are different. so you have to tell explicitly Alfred where to get the PHP. i only realized this after Monterey removed PHP. |
nope. wait coming with more. |
NATHAN WHERE IS YOUR SENSE OF HUMOR!!! |
I'm only one cup of coffee in; it must be in the second cup... |
for the first script, paste this:
for the second script, paste this (not the same):
|
can you imagine all the people who commented on this thread before and are receiving our bullshit now? |
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. |
Those people would love it. I'd think it's hilarious. Also, that worked! Pure wizardry. I remain indebted to you. Can you explain why it works now for me? I'm specifically curious what |
you have no idea the amount of complaints i have about my products being "unprofessional". (but they work perfectly and are very useful but i don't use uppercases at the beginning of sentences and also i fucking swear a lot.)
is this possible that you pasted also, you could actually in your case use directly |
yes, that line adds the edit: no need to apologize. except for the beers we didn't have together in Toronto. i'm still waiting for the plane ticket. |
ok so this is the default in Alfred 4.3.0:
in your case you needed |
anyways. have fun 🚀 |
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. I definitely added the extra /php at the end there. 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. ¯\(ツ)/¯ |
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. |
yeah that's what i think too. probably i should just stop in the paid apps.
yes, so, cannot. it has to be the path that leads to the executables. not the executables themselves.
huh. that is even stranger. but ok if it works now, better not touch it 😂 |
will definitely do. have and let you know. just waiting for a Mac Mini update. i like portable stuff. |
Hi,
I've been trying to add this workflow to Alfred, however, I had the wrong PHP version installed:
I've installed PHP 7.3 using brew:
But that is afterwards located at
/usr/local/opt/[email protected]/bin/php
. How should I change/tell the script to use that binary?Thanks in advance.
The text was updated successfully, but these errors were encountered: