はじめてのモダンPHP

80b7d87c10fcdb6a0cba4f8b69e933bc?s=47 polidog
September 14, 2019

 はじめてのモダンPHP

80b7d87c10fcdb6a0cba4f8b69e933bc?s=128

polidog

September 14, 2019
Tweet

Transcript

  1. ͸͡ΊͯͷϞμϯPHP Shizuoka.php #1 2019/09/14 @polidog

  2. ࣗݾ঺հ • @polidog • ౦ژࡏॅɺग़਎͸ਗ਼ਫ۠ • ύʔςΟʔϋʔυגࣜձࣾ औక໾ɾϓϩάϥϚ • ޷͖ͳϑϨʔϜϫʔΫ͸Symfony

    • ࠷ۙ࢖͍͍ͨϑϨʔϜϫʔΫ͸BEAR Sunday • Vue΋ͪΐ͍ͪΐ͍ॻ͍ͯ·͢
  3. ϞμϯPHP?

  4. None
  5. http:// ja.phptherightway.com/

  6. PHP The Right Way • ؾܰʹಡΊΔ(?)ΫΠοΫϦϑΝϨϯε • ϕετϓϥΫςΟε • ֤ݴޠʹ຋༁͞Ε͍ͯΔ(΋ͪΖΜ೔ຊޠ΋͋

    Δ) • ϞμϯͷجૅͱͳΔ͜ͱ͕ࡌ͍ͬͯΔ
  7. 18ݸͷϓϥΫςΟε • ͸͡Ίʹ • ίʔσΟϯάελΠϧ • ݴޠ࢓༷ͷϙΠϯτ • ґଘؔ܎ͷ؅ཧ •

    ίʔσΟϯάʹؔ͢Δश׳ • ґଘੑ஫ೖ • σʔλϕʔε • ςϯϓϨʔτ • Τϥʔͱྫ֎ॲཧ • ηΩϡϦςΟ • ςετ • ֤छαʔό΁ͷσϓϩΠ • Ծ૝Խ • Ωϟογϡ • Documenting your CodeʢPHPDocʣ • ৘ใݯ • ίϛϡχςΟ
  8. ίʔσΟϯάελΠϧ

  9. PSR1,2,4 • PSR1͸جຊίʔσΟϯάن໿ • PSR2͸ίʔσΟϯάελΠϧΨΠυ • PSR4͸ΦʔτϩʔσΟϯάελϯμʔυ • ৄ͍͜͠ͱ͸͜ͷهࣄΛࢀর
 https://qiita.com/tadsan/items/

    942a381e952e12a8fa5a
  10. phpcs(PHP CodeSniffer) • ίʔυ͕४ڌ͍ͯ͠Δ͔νΣοΫͰ͖Δ • PHPStorm΍vscodeͱ࿈ܞͰ͖Δ
 https://qiita.com/suin/items/ 8f00ccd58f0464fb9791 • phpcbfΛ࢖ͬͯίʔυΛमਖ਼

  11. php-cs-fixer • PSR1,2, SymfonyίʔσΟϯάن໿ʹԊͬͨܗʹ मਖ਼ͯ͘͠ΕΔ • @PSR1,@PSR2,@SymfonyͳͲͷϧʔϧηοτ
 https://github.com/FriendsOfPHP/PHP-CS- Fixer/blob/ 681806863baec9d874dae95dd0f9eb3db44e

    9b90/src/RuleSet.php
  12. ґଘؔ܎ͷ؅ཧ

  13. Comopser • npm΍bundlerΈ͍ͨͳ΋ͷ • composer.jsonʹґଘؔ܎Λهड़͢Δ • PEAR͸๻͸΋͏5೥Ҏ্࢖͍ͬͯͳ͍ • ೔ຊ͔Βͩͱ஗͍
 https://qiita.com/keitakn/items/

    37f0fac49442b72c403e
  14. None
  15. Packagist • https://packagist.org/ • PHPͷύοέʔδΛ୳͢ҝͷαΠτ

  16. None
  17. ύοέʔδͷߋ৽ʹ͍ͭͯ • libraries.ioΛ࢖͏
 https://libraries.io/ • ηΩϡϦςΟνΣοΫ͸Security Advisories CheckerΛ࢖͏
 https://security.symfony.com/


  18. ґଘੑ஫ೖ

  19. ґଘੑ஫ೖ • ӳޠͩͱDIͱ͔Dependency Injectionͱ͔ݴΘΕΔ΍ͭ • ࠷ۙͷϑϨʔϜϫʔΫʹ͸DI͕͍͍ͩͨ༻ҙ͞Ε͍ͯΔ • ೉͍͠ͷͰଞͷDIͷઆ໌ΛಡΉ΂͖
 https://polidog.jp/2019/06/08/di/
 


    https://qiita.com/ritukiii/items/ de30b2d944109521298fɹ
  20. ςετ

  21. PHPUnitͰϢχοτςετΛॻ͘ • Ϣχοτςετ͸Ϋϥε΍ϝιου͕ظ଴௨Γʹಈ͍͍ͯ Δ͔Λ։ൃதʹ͔֬ΊΔɻ • ςετํ๏͸ೋ௨Γ • ೖग़ྗͷظ଴஋Λςετ͢Δ • ৼΔ෣͍Λ͔֬ΊΔͨΊͷςετ

    • ςετͷจԽ͕ͳ͍ͷͳΒ͹ϢχοτςετΛ·ͣ͸ॻ͍ ͍ͯ͘ࣄ͕ॏཁ
  22. Prophecy • ϞοΫΦϒδΣΫτϑϨʔϜϫʔΫ • εύΠํࣜͰςετͰ͖Δ • ࢀߟ
 https://qiita.com/Hiraku/items/ 326b58c586a134d2ea74

  23. None
  24. None
  25. σϓϩΠ

  26. DeployerΛ࢖͏ • PHP੡ͷσϓϩΠπʔϧ • σϓϩΠ༻ͷλεΫΛఆٛ͢Δ • ίϚϯυΛ࣮ߦ͢Δ͚ͩͰσϓϩΠͰ͖Δ • ֤छϑϨʔϜϫʔΫ༻ͷϨγϐ͕༻ҙ͞Ε͍ͯΔ •

    جຊతͳ࢖͍ํ
 https://www.tam-tam.co.jp/tipsnote/tool/post17066.html
  27. CIΛ࢖ͬͨσϓϩΠ • CIΛ࢖ͬͯdeployerΛಈ͔͢ • ྫ͑͹CircleCIΛ࢖͏৔߹
 https://tech.quartetcom.co.jp/2017/01/04/ deployer-on-circleci/

  28. ฐࣾͷσϓϩΠϑϩʔ PRͷ࡞੒ ϚʔδϘλϯԡ͢ deployer slackʹ௨஌

  29. None
  30. ࠷ޙʹ

  31. ϞμϯPHPͰ։ൃ͢Δҙຯ

  32. ࿑ಇ࣌ؒΛݮΒͨ͢Ί

  33. ɹ?>