PHP-CS-FixerとかAtomとか

B8668563cbe87543c303dbb818cf9f02?s=47 onigra
February 22, 2017

 PHP-CS-FixerとかAtomとか

PHPBLTT#6

B8668563cbe87543c303dbb818cf9f02?s=128

onigra

February 22, 2017
Tweet

Transcript

  1. PHP-CS-Fixerͱ͔Atomͱ͔ PHPBLT#6 2017-02-22 @onigra_

  2. onigra Yudai Suzuki / ླ໦༤େ onigra_

  3. Կ΍ͬͯΔਓ͔ؒʁ • Rubyist • DevOps • Vimmer • ଞͷϓϩδΣΫτͷαϙʔτͱ͔ •

    2ϲ݄͙Β͍લʹଞϓϩδΣΫτͷαϙʔτͰॳΊͯ PHPͷ؀ڥߏஙͨ͠
  4. ౰ॳɺPHPͷLinux؀ڥߏஙͷ ࿩Λ͠Α͏ͱࢥ͚ͬͯͨͲ

  5. php.iniͱ͔ωΨςΟϒͳ ࿩͕ଟ͘ͳΓͦ͏ͳͷͰ ΍Ί·ͨ͠

  6. ͋Δ೔ɺ αϙʔτͯ͠ΔϓϩδΣΫτ ʹͯ

  7. ίʔσΟϯάελΠϧͷ ࿩ʹͳͬͨ

  8. ᐌ͘ɺผͷϓϩδΣΫτͱ ن໿͕ҧͬͯࠞཚ͢Δ

  9. ϑΥʔϚολʔೖΕͯ ΤσΟλͷอଘ࣌ʹ ࣮ߦ͢Ε͹͍͍͡ΌΜ

  10. ୳ͨ͠Β PHP-CS-Fixerͬͯͷ͕͋Δ https://github.com/FriendsOfPHP/PHP-CS-Fixer

  11. Atom͔Β࢖͍͍ͨΒ͍͠

  12. ୳ͨ͠Β atom-beautifyͬͯͷ͔Β PHP-CS-Fixerݺ΂Δ https://atom.io/packages/atom-beautify

  13. ΍ͬͯΈΔ

  14. ಈ͔ͳ͍

  15. https://gist.github.com/Skysplit/26a2a0ed86922f11986dabd5ee7039b5

  16. https://gist.github.com/Skysplit/26a2a0ed86922f11986dabd5ee7039b5

  17. PHP-CS-Fixer͕ 2016-12-01ʹVersion2ʹͳͬͨ • --fixersΦϓγϣϯ͸--levelͱڞʹ--rulesʹ౷߹͞Εɺ࢖ ༻ෆՄʹͳͬͨ • https://github.com/FriendsOfPHP/PHP-CS-Fixer/blob/ master/UPGRADE.md • Issue͸͋Δ͕ɺPR͸ແ͍

    • https://github.com/Glavin001/atom-beautify/issues/ 1465
  18. ݴ͍ग़ͬ͠΃ͳͷͰ ύονૹΔ͔

  19. None
  20. ύονૹͬͨ https://github.com/Glavin001/atom-beautify/pull/1511

  21. ͍ͭͰʹɺWindowsҎ֎ͩͱ ΦϓγϣϯͰPHP-CS-Fixerͷ ύεࢦఆ͕ޮ͔ͳ͍ όά௚ͨ͠ https://github.com/Glavin001/atom-beautify/pull/1510

  22. ͍ͭͰʹɺWindows؀ڥͷ CI(AppVeyor)Ͱ ؀ڥߏஙʹࣦഊͯ͠ΔͷΛ ௚ͨ͠ https://github.com/Glavin001/atom-beautify/pull/1516

  23. None
  24. Α͔ͬͨͰ͢Ͷ

  25. None
  26. େมͦ͏ͳͷͰ ͕Μ͹ͬͯ΄͍͠

  27. ·ͱΊ

  28. VimPhpStorm࢖ͬͯ͘Ε པΉʂʂʂʂ

  29. PhpStorm • ͸͡Ί͔ΒίʔυϑΥʔϚολʔ͍ͭͯΔ͠ɺ ઃఆ߲໨΋ࡉ͔͍ • ΧελϚΠζ͢Ε͹PHP-CS-Fixer΋ݺ΂Δ • BladeςϯϓϨʔτʹ΋ରԠʢຊ౰͸͜Ε͕΄ ͔ͬͨ͠ʣ

  30. Ͳ͏ͯ͠΋AtomͰ PHPॻ͖͍ͨʁ

  31. php-cs-fixerͷํ࢖ͬͯ͘Ε པΉʂʂʂʂ

  32. php-cs-fixer (Atom Package) • https://atom.io/packages/php-cs-fixer • ͱͬ͘ʹV2ରԠͯ͠Δ • PHP-CS-FixerΛ࢖͏ͨΊ͚ͩͷϥΠϒϥϦͳ ͷͰɺ୯७ʹPHP-CS-FixerΛΤσΟλ͔Β࢖

    ͏͚ͩͩͬͨΒɺͬͪ͜ͷํ͕ྑ͍ͱࢥ͏
  33. ࠓ೔࿩͍ͨ͜͠ͱ • LaravelͷσϓϩΠ • Laravelͷ.envͷѻ͍ • PHPϓϩδΣΫτͰδϣϒΩϡʔԿ࢖ͬͯ·͢ ͔ʁ