Skip to content

Valet doesn't work for previous php version after upgrading php. Failed to open stream: Operation not permitted #1363

Answered by drbyte
kennethjayden asked this question in Q&A
Discussion options

You must be logged in to vote

When switching PHP versions, particularly when downgrading, it is wise to rebuild the global composer vendor dependencies.

composer global update

Also useful whenever you want to switch your command-line version temporarily is to insert the specific PHP version at the beginning of your environment PATH, so that all php calls use that version, overriding whatever the main default is set to:

export PATH="$(brew --prefix [email protected])/bin:$PATH"

(replacing 8.2 with whatever your current terminal session needs, for whatever project you're working on)

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
2 replies
@drbyte
Comment options

@AsmitNepali
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by mattstauffer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants