PHPの作曲家composer

 PHPの作曲家composer

「かごもく #32 パッケージマネージャーとかビルドツールとかもろもろ... (オンライン)」で発表した内容です。
https://kagoben.connpass.com/event/176282/

B14ef08f92c7f31e679d991dafd7d77f?s=128

Task Nagashige

May 23, 2020
Tweet

Transcript

  1. PHPͷ࡞ۂՈcomposer ͔͝΋͘ #32 2020-05-23 ͨ͘͢Μ

  2. Agenda 1. ࣗݾ঺հ 2. composerͷ঺հ 3. composerͷ࣮ྫ

  3. ࣗݾ঺հ ◆໊લɿͨ͘͢Μ ◆ࣗݾ঺հ ੜਮͷࣛࣇౡਓ(େ۱دΓ) ϑϦʔϥϯεΤϯδχΞ (ελʔτΞοϓͷWeb, εϚϗΞϓϦ։ൃࢧԉ) ઐ໳ֶߍͰͷඇৗۈߨࢣ(PHP) YouTuber, ࣛࣇౡ.mk,

    ώϥϚαͳͲͷίϛϡχςΟ׆ಈ @qst_exe ͨ͘͢Μ
  4. PHPͷύοέʔδ؅ཧͱݴ͑͹…

  5. None
  6. composerͷ֓ཁ Composer is a tool for dependency management in PHP.

    It allows you to declare the libraries your project depends on and it will manage (install/update) them for you. ެࣜυΩϡϝϯτΑΓ(https://getcomposer.org/doc/00-intro.md) PHPͷύοέʔδΛ؅ཧ͢ΔͨΊͷπʔϧɻNode.jsͷnpm΍Rubyͷ gem, bundlerʹڧ͘ӨڹΛड͚͍ͯΔɻ
  7. composerͰͰ͖Δ͜ͱ • PHPϥΠϒϥϦ(ґଘύοέʔδ)ͷ؅ཧ • composer.json΍.lockͰ؅ཧ • ϓϩδΣΫτͷґଘؔ܎Λఆٛ͢Δ • ΫϥεͷΦʔτϩʔυػೳ(PHPಛ༗ʁ) npm΍gemͱҰॹͰ͸ʁ

  8. composerʹΑΔΦʔτϩʔυ

  9. composerͰPHPϑϨʔϜϫʔΫಋೖ • Laravel • CakePHP • Symfony • FuelPHP •

    CodeIgniter
  10. ࣮ࡍʹ࢖ͬͯΈͨ

  11. ϓϩδΣΫτ࡞੒(composer init)

  12. Laravelͷ৔߹(composer create-project laravel/laravel sample)

  13. ύοέʔδͷಋೖ(composer require)

  14. ύοέʔδͷ׆༻

  15. ࢖ͬͯͨϥΠϒϥϦ • TwitterOAuth, Socialite • TwitterͷAPI΍ϩάΠϯػೳΛ࢖͏ͱ͖ʹ࢖༻ • twig • ςϯϓϨʔτΤϯδϯɻࠓ͸blade͕ڧ͍͚Ͳ

    • CodeSniffer • ίʔυن໿ͷνΣοΫͱࣗಈमਖ਼Λߦ͏ϥΠϒϥϦ • phpdotenv • ؀ڥม਺؅ཧͷͨΊͷϥΠϒϥϦ • simple-router • ϧʔςΟϯά༻ʹ࢖༻ Ϗϧυπʔϧ͸࢖ͬͨ͜ͱ͕ͳ͍ͷͰ͍͍΋ͷ͕͋ͬͨΒڭ͑ͯԼ͍͞
  16. ·ͱΊ • PHPΛ࢖͏ͳΒcomposerΛಋೖ͠Α͏ • Φʔτϩʔυػೳͱͯ΋ศར

  17. એ఻

  18. Thank You!!