レガシーコードに最低限の秩序をもたせる
by
juve534
Link
Embed
Share
Beginning
This slide
Copy link URL
Copy link URL
Copy iframe embed code
Copy iframe embed code
Copy javascript embed code
Copy javascript embed code
Share
Tweet
Share
Tweet
Slide 1
Slide 1 text
ϨΨγʔίʔυʹ ࠷ݶͷடংΛͨͤΔ 2019/03/31 PHPerKaigi2019 @juve534
Slide 2
Slide 2 text
ࣗݾհ • Twitter / GitHub • juve534 • ࣄ • ࠷ۙ·ͰϨΨγʔγεςϜͷอक։ൃ • ݱࡏPHP7 + Laravelͷ৽ن։ൃ • ͖ͳαοΧʔνʔϜ • Ϣϕϯτε(Juventus)
Slide 3
Slide 3 text
ϨΨγʔίʔυʹ ࠷ݶͷடংΛͨͤΔ
Slide 4
Slide 4 text
͖͔͚ͬ • ༷ॻͳ͠ͷΦϨΦϨFWͰɺӡ༻͞Ε͍ͯͨγε ςϜͷ։ൃ͍ͯͨ͠ • ৽͘͠ೖͬͨਓɺӨڹൣғ͕Θ͔Βͳ͍ • ςετॴΛؒҧ͑ɺ୯७ͳϛεͰোʹͳͬ ͯ͠·ͬͨ →͜ΕΛվળ͍ͨ͠…
Slide 5
Slide 5 text
ର • 10Ҏ্લ͔Β͋ΔαʔϏεͷAPI • ෳϞδϡʔϧͱີ݁߹͍ͯ͠Δ • ฏۉ݄ͯ͠1ͷසͰϦϦʔε͞Ε͍ͯΔ
Slide 6
Slide 6 text
ڥ • PHP5.xܥ • ༷ॻͳ͠Ͱςετൣғ͕͔ΓͮΒ͍ • όʔδϣϯཧCVS →͜ΕΒͷڥΛͰ͖Δ͚ͩվળ͢Δ
Slide 7
Slide 7 text
վળҊ • PHP5.xܥ • ෳϞδϡʔϧͱີ݁߹Ͱݫ͍͠ • ༷ॻͳ͠Ͱςετൣғ͕͔ΓͮΒ͍ • CIπʔϧ(CircleCI)Ͱ࠷ݶͷடংΛͨΒ͢ • όʔδϣϯཧCVS • GitHubʹҠߦ
Slide 8
Slide 8 text
࠷ݶͷடংΛߟ͑Δ • ୯ମςετ • ෳϞδϡʔϧͱີ݁߹Ͱςετ͕ॻ͚ΔΑ͏ʹͳ͍ͬͯͳ͍ • ܰྔͰ࢝ΊΒΕͳ͍ • API༷ॻ • 1͔Βચ͍ग़͢Ϩϕϧͷ࡞ۀ͕ඞཁ • ͜ΕܰྔͰ࢝ΊΒΕͳ͍
Slide 9
Slide 9 text
php -l
Slide 10
Slide 10 text
࠷ݶͷடংΛߟ͑Δ • PHPඪ४ίϚϯυ • γϯλοΫεΤϥʔΛݕ͢Δ • ϨΨγʔίʔυͰ͑Δ • ܰྔͰ࢝ΊΒΕΔ →࠷ݶͷடংʹ;͞Θ͍͠ͱߟ͑ͨ
Slide 11
Slide 11 text
ٕज़ݕূ͍ͯ͘͠
Slide 12
Slide 12 text
վળҊ
Slide 13
Slide 13 text
վળҊ
Slide 14
Slide 14 text
վળҊ ϓϧϦΫݕͯ͠ɺCircleCI͕ಈ͍ͯ͘ΕΔ
Slide 15
Slide 15 text
վળҊ
Slide 16
Slide 16 text
վળҊ CircleCIͷΠϝʔδઃఆͰAmazon ECRΛࢦఆ https://circleci.com/docs/2.0/private-images/
Slide 17
Slide 17 text
վળҊ
Slide 18
Slide 18 text
վળҊ γϯλοΫενΣοΫγΣϧΛ࣮ߦ͠·͢ http://48n.jp/blog/2016/08/08/php-lint- with-ci/
Slide 19
Slide 19 text
վળҊ γϯλοΫεΤϥʔ͕͋ͬͨΒݕ
Slide 20
Slide 20 text
վળҊͷϙΠϯτ • ΠϝʔδͷཧʹAmazon ECRΛ͏ • Docker Hubʹ͕͍͍ࣗͨόʔδϣϯͷΠϝʔ δ͕ݟ͔ͭΒͳ͔ͬͨ • ࣗͰ༻ҙ͢Δඞཁ͕͋Δ • CircleCIͷެࣜʹ࿈ܞํ๏͕ॻ͍ͯ͋ͬͨ https://circleci.com/docs/2.0/private-images/
Slide 21
Slide 21 text
νʔϜʹܭըΛఏҊ
Slide 22
Slide 22 text
Ͳ͏ͳ͔ͬͨ • ܭըʹࢍಉͯ͠Β͑ͨ • ࠓճͷରҎ֎ʹಋೖ͠Α͏ͱ͍͏ʹͳͬͨ • CIπʔϧΛͬͨ࣍ͷվળҊ͕ग़͖ͯͨ
Slide 23
Slide 23 text
·ͱΊ • ϨΨγʔίʔυͩͬͯվળͷݟࠐΈ͋ͬͨ • php -l ͳΒܰྔͰ࢝ΊΒΕΔ͜ͱ͕Θ͔ͬͨ • ϨΨγʔίʔυͰͰ͖ΔൣғͰߟ͍͑ͯ͘͜ ͱ͕େͩͱࢥͬͨ
Slide 24
Slide 24 text
͝ਗ਼ௌ͋Γ͕ͱ͏͍͟͝·ͨ͠ Twitter/GitHub juve534