svandragt / cuttlefish

Hackable web framework (wip)
https://vandragt.com/tag/cuttlefish
MIT License
8 stars 2 forks source link

replace direnv with psh #123

Closed svandragt closed 3 years ago

svandragt commented 3 years ago

setup

brew install direnv

~/.direnvrc:

# Usage: use php <version>
#
# Loads the specified php version into the environent
#
use_php() {
  brew link php@$1 --force
}

# Usage: use composer <version>
#
# Loads the specified composer version into the environent
#
use_composer() {
  composer --version | grep -q "version $1" || composer self-update --$1
}

usage

after allowing through direnv allow the project will switch to the correctly installed php 7.4 / composer version 2, if installed.

svandragt commented 3 years ago

Don't forget the docs

svandragt commented 3 years ago

Closed with a3cbed80e3523a025b3bde5aff5cc64084a98f97