powershell composer ^ vs ~
I don't know where to land this officially. This is a way to use the ^ within powershell (not my credits though)
Is that something we want to improve in the documentation?
run below command: (put single quotes around the double quotes)
10 Replies
We tried them all. There is no way that works properly in all Windows shells.
https://filamentphp.com/docs/4.x/introduction/installation refers to use the ~ only for windows in combination with powershell. In the command prompt under windows I can use the normal notation. Are there also powershell shells on windows that does not "consume" the caret?
Yes, the standard CMD shell
GitHub
Docs: v4 Installation on Windows by pxlrbt · Pull Request #16462 ...
The caret ^ is used as an escape character in Powershell. No quoting helps. The tilde works though and is almost similar in semantics. ~4.0 will allow updated until 5.0.
the PR refers to the update script that cannot detect correctly the shell (if I am reading this correct). I was talking about improvement of the documentation on the site. where you we can also mention that if you run the command with composer will complain (or not)
Solution
It also affected the upgrade script, but the PR itself was for the docs.
the required action will be wrong in the script output. only the site can be "fixed" or we can put there a sidenote for this double quote solution
only the site can be "fixed" or we can put there a sidenote for this double quote solutionNot sure what you mean? You want to add another note? I guess that will get a bit confusing.
There are maybe more dependency's and complications than I can probably oversee as beginner. I tried the workaround with the double quotation and it works for me in powershell and I was wondering (with proposing a solution ) why this was not on the site. Just keep it as a ~ and you can change the composer.json manually to ^ is also valid way to workaround
You can use that way. It's just too complicated to explain all the options for different shells 😅