Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
phpenvやめました🤦♂️
Search
Takashi Kanemoto
July 28, 2021
Programming
0
1.2k
phpenvやめました🤦♂️
「PHPerの今とその先を語り合うフォーラム2021」PHP TechCafeのLT資料です。
https://rakus.connpass.com/event/217189/
Takashi Kanemoto
July 28, 2021
Tweet
Share
More Decks by Takashi Kanemoto
See All by Takashi Kanemoto
FigmaとPHPで作る1ミリたりとも表示崩れしない最強の帳票印刷ソリューション
ttskch
47
29k
データベース/SQL超入門!完全初心者向けに世界一分かりやすく解説します
ttskch
1
4.4k
Symfony UX Autocompleteとかいう 顧客が本当に必要だったもの
ttskch
0
1.7k
就活生あるいは新人エンジニアさんへのお節介なアドバイス
ttskch
0
1.5k
symfony/pantherでWordleを解いてみた
ttskch
0
260
ついに、Webアプリでの帳票印刷のベストプラクティスを編み出しました💡
ttskch
16
19k
PHPでCSVのインポート/エクスポートに立ち向かう
ttskch
1
2.2k
phpenv on Mac 難しすぎワロタ
ttskch
0
550
1.5流エンジニアの生存戦略
ttskch
12
10k
Other Decks in Programming
See All in Programming
Streams APIとTCPフロー制御 / Web Streams API and TCP flow control
tasshi
1
290
qmuntal/stateless のススメ
sgash708
0
120
CSC305 Lecture 13
javiergs
PRO
0
130
弊社の「意識チョット低いアーキテクチャ」10選
texmeijin
5
23k
RailsのPull requestsのレビューの時に私が考えていること
yahonda
5
1.7k
プロジェクト新規参入者のリードタイム短縮の観点から見る、品質の高いコードとアーキテクチャを保つメリット
d_endo
1
1k
Macとオーディオ再生 2024/11/02
yusukeito
0
150
Vaporモードを大規模サービスに最速導入して学びを共有する
kazukishimamoto
4
4.3k
What’s New in Compose Multiplatform - A Live Tour (droidcon London 2024)
zsmb
1
330
CSC509 Lecture 08
javiergs
PRO
0
100
とにかくAWS GameDay!AWSは世界の共通言語! / Anyway, AWS GameDay! AWS is the world's lingua franca!
seike460
PRO
1
530
組織に自動テストを書く文化を根付かせる戦略(2024秋版) / Building Automated Test Culture 2024 Autumn Edition
twada
PRO
10
4.5k
Featured
See All Featured
Java REST API Framework Comparison - PWX 2021
mraible
PRO
28
7.9k
What's in a price? How to price your products and services
michaelherold
243
12k
Learning to Love Humans: Emotional Interface Design
aarron
272
40k
It's Worth the Effort
3n
183
27k
Happy Clients
brianwarren
97
6.7k
Rails Girls Zürich Keynote
gr2m
93
13k
jQuery: Nuts, Bolts and Bling
dougneiner
61
7.5k
Fantastic passwords and where to find them - at NoRuKo
philnash
50
2.8k
A Philosophy of Restraint
colly
203
16k
Building a Scalable Design System with Sketch
lauravandoore
459
33k
For a Future-Friendly Web
brad_frost
175
9.4k
Why You Should Never Use an ORM
jnunemaker
PRO
53
9k
Transcript
/16 2021/07/28 #PHPTechCafe @ttskch 1 phpenvΊ·ͨ͠🤦
/16 • ϦεςΟϯάࠂͷձࣾͰWebαʔϏεΛ࡞ͬͯ·ͨ͠ • CTOͱͯ͠ࡏ੶ͨ͠8ؒͰɺࣾһ2໊ˠ60໊ɺ ച্ن5000ສԁˠ27ԯԁʹ·Ͱ 💪 💪 💪
• ຊΛॻ͍ͨΓSchooͰߨٛͨ͠Γͱ͍ͬͨ׆ಈ 2 ͖ͨͭͪ ʙ2020/03 (ג)ΧϧςοτίϛϡχέʔγϣϯζCTO 📝 blog.ttskch.com/thank-you-quartet-communications @ttskch
/16 • डୗ։ൃͱࣾ֎CTO/ٕज़ސۀத৺Ͱ׆ಈͯ͠·͢ • Symfony͕େ͖Ͱ͢ ✨ • ڈΞυϕϯτΧϨϯμʔΛ1ਓͰ15ॻ͍ͨΓ 10ສจࣈͷిࢠॻ੶Λແྉެ։ͨ͠Γ͠·ͨ͠💪💪💪
3 ͖ͨͭͪ 2020/04ʙ ϑϦʔϥϯεWebΤϯδχΞ 👨💻 kannade.jp @ttskch
/16 2021/07/28 #PHPTechCafe @ttskch 4 phpenvΊ·ͨ͠🤦
/28 $ phpenv install 8.0.0 [Success]: Built 8.0.0 successfully. 5
phpenvͱ
/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/
/16 7 ৄͪ͘͜͠Β https://speakerdeck.com/ttskch/phpenv-on-mac-nan-sisugiwarota
/xxx 8 ͰɺͳΜ͔Μ͋ͬͯ
/16 9 ݁ہphpenvΊ·ͨ͠ https://twitter.com/ttskch/status/1406141047063801856
/16 • PHPͷϏϧυ৭ΜͳϛυϧΣΞʹґଘ͍ͯͯ͠ɺԿͯ͠ͳ͍ͷʹյΕΔ ͜ͱ͕Α͋͘Δ্ʹτϥϒϧγϡʔτ͕େม͗͢Δ • ϏϧυΤϥʔΛղফ͠Α͏ͱඞਢͰάάͬͯͨΒ࠷ऴతʹ Homebrew/homebrew-coreͷIssueͰ͢ͰʹٞࡁΈͩͬͨͷΛݟ͚ͭͯɺ ࣗҰମԿΛ࠶ൃ໌͍ͯ͠ΔΜͩΖ͏͔ͱ͍͏ؾ࣋ͪʹͳΔ
• Homebrewʹର͢ΔԼهͷΞυόϯςʔδଞͷखஈͰेସͰ͖Δʢޙड़ʣ 1. ύονόʔδϣϯ୯ҐͰόʔδϣϯࢦఆͰ͖Δ 2. .php-version ͰσΟϨΫτϦ͝ͱʹPHPͷόʔδϣϯΛࢦఆͰ͖Δ 10 Ίͨཧ༝
/16 • ࣮ࡍͷͱ͜Ζɺύονόʔδϣϯ·Ͱࢦఆ͍ͨ͠έʔεͳΜͯ΄΅ͳ͍🤦 • ͋ͬͨ͠Βͦͷ͚࣌ͩDocker͍͍͔͑ͳ 11 1. ύονόʔδϣϯ୯ҐͰόʔδϣϯࢦఆͰ͖Δʁ
/16 12 2. σΟϨΫτϦ͝ͱʹPHPͷόʔδϣϯΛࢦఆͰ͖Δʁ • direnvͱ͍͏πʔϧͰ΄΅ಉ͜͡ͱͰ͖Δ👌 • .envrc ͱ͍͏ϑΝΠϧʹڥมΛఆ͓ٛͯ͘͠ͱɺͦͷσΟϨΫτϦʹ Ҡಈͨ͠ͱ͖ʹࣗಈͰڥมΛಡΈࠐΜͰ͘ΕΔπʔϧ
• https://github.com/direnv/direnv
/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
/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/
/16 • phpenv on Mac͗͢͠Δ • Homebrewʹର͢ΔΞυόϯςʔδผͷπʔϧͳͲͰସՄೳ • ͜Ε͔ΒϏϧυͷͭΒΈΛΘΓʹͬͯ͘Ε͍ͯΔ͜ͱʹײँͭͭ͠ HomebrewͷPHPΛ͍͖ͬͯ·͢😇
15 ·ͱΊ
/16 16 @ttskch ʘThanks!ʗ