I am working on a legacy app and it's running on PHP 7.4. I was able to isolate the app to run php 7.4 but I get an error saying Install or enable PHP's imap extension I installed it and it should be enabled but it's not working. Any idea on why? When I run: valet php -m | grep imap it returns empty but when I run it without valet, I can see it's running. I am thinking that it's installed on the main version of php which is 8.1
I also tried unlinking 8.1 and linking 7.4 and then running the brew install but it doesn't change eanything.
Thanks,
Valet will install php from https://github.com/shivammathur/homebrew-php so to add an extension you can use https://github.com/shivammathur/homebrew-extensions
So in your example, run:
brew install shivammathur/extensions/[email protected]
You can check this worked:
valet php -i | grep imap