Upgrade to Pro — share decks privately, control downloads, hide ads and more …

phpenvやめました🤦‍♂️

 phpenvやめました🤦‍♂️

「PHPerの今とその先を語り合うフォーラム2021」PHP TechCafeのLT資料です。
https://rakus.connpass.com/event/217189/

Takashi Kanemoto

July 28, 2021
Tweet

More Decks by Takashi Kanemoto

Other Decks in Programming

Transcript

  1. /16 • ϦεςΟϯά޿ࠂͷձࣾͰWebαʔϏεΛ࡞ͬͯ·ͨ͠ • CTOͱͯ͠ࡏ੶ͨ͠8೥ؒͰɺࣾһ਺2໊ˠ60໊ɺ 
 ച্ن໛5000ສԁˠ27ԯԁʹ·Ͱ੒௕ 💪 💪 💪

    • ຊΛॻ͍ͨΓSchooͰߨٛͨ͠Γͱ͍ͬͨ׆ಈ΋ 2 ͖ͨͭͪ ʙ2020/03 (ג)ΧϧςοτίϛϡχέʔγϣϯζCTO 📝 blog.ttskch.com/thank-you-quartet-communications @ttskch
  2. /28 $ PKG_CONFIG_PATH="/usr/local/opt/krb5/lib/pkgconfig:/usr/local/ opt/openssl/lib/pkgconfig:/usr/local/opt/icu4c/lib/pkgconfig:/usr/ local/opt/libedit/lib/pkgconfig:/usr/local/opt/libxml2/lib/ pkgconfig" \ PHP_BUILD_CONFIGURE_OPTS="--with-zlib-dir=/usr/local/opt/zlib -- with-bz2=/usr/local/opt/bzip2

    --with-iconv=/usr/local/opt/libiconv --with-curl=/usr/local/opt/curl --with-libedit=/usr/local/opt/ libedit --with-jpeg-dir=/usr/local/opt/libjpeg —with-png-dir=/usr/ local/opt/libpng --with-external-gd=/usr/local/opt/gd" \ phpenv install 8.0.0 [Success]: Built 8.0.0 successfully. 6 ࠷ۙͷMacʹ͓͚Δݱ࣮ ࢀߟɿhttps://blog.ttskch.com/mac-phpenv-php-build/
  3. /28 # Πϯετʔϧ $ brew install direnvʊ $ echo 'eval

    "$(direnv hook zsh)"' >> ~/.zshrcʊ # σΟϨΫτϦ͝ͱʹPHPͷύεΛࢦఆ $ cd /path/to/projectʊ $ echo 'export PATH="/usr/local/opt/[email protected]/bin:$PATH"' > .envrcʊ $ direnv allow . 13 direnv
  4. /16 14 ͪͳΈʹextension͸ • PECLͰΠϯετʔϧͯ͠ php.ini ʹ௥هɺͰ؆୯ʹ௥ՃͰ͖Δ # PECLͷ࣮ߦʹඞཁͳϛυϧ΢ΣΞΛΠϯετʔϧ $

    brew install pkg-config zlibʊ # Πϯετʔϧͯ͠php.iniʹ௥ه $ pecl install apcuʊ $ echo 'extension=apcu.so' >> /usr/local/etc/php/7.4/php.ini ࢀߟɿhttps://grrr.tech/posts/installing-homebrew-php-extensions-with-pecl/