Upgrade to Pro — share decks privately, control downloads, hide ads and more …

WordPressに活かす最近のPHPエンジニアトレンド2016 画面つき

WordPressに活かす最近のPHPエンジニアトレンド2016 画面つき

WordCamp関西2016の発表スライド + デモのスクリーンショット

8c1ecc738eee0254a41c2d4b33cda7b6?s=128

Hisateru Tanaka

July 10, 2016
Tweet

Transcript

  1. 8PSE1SFTTʹ׆͔͢࠷ۙͷ 1)1ΤϯδχΞτϨϯυ

  2. ͨͳ͔ͻͯ͞Δ @tanakahisateru Pinoco developer PHPTAL contributor Firebug translation contributor Yii

    framework user PhpStorm user ॴ௕ ؔ੢1)1Ϣʔβʔζάϧʔϓ
  3. ೥݄೔ 2Կͷ೔෇Ͱ͠ΐ͏͔

  4. 1)1

  5. 1)1 w ໿೥ͿΓͷϝδϟʔόʔδϣϯΞοϓ w ͪͳΈʹશ1)1ͷྺ࢙͸໿೥ w 1)1ͷϝδϟʔόʔδϣϯίΞͷݴޠΤϯδϯ ˠࠓճจ๏࢓༷ͷ֦ு͸গͳ͍

  6. 1)1ϦϦʔε௚લ w 1)1ΧϯϑΝϨϯεؔ੢Ͱ΋1)1Λѻͬͨ ͚Ͳʜ w 1)1ΧϯϑΝϨϯε౦ژʹɺͳΜͱ1)1ͷ࡞ ऀɺϥεϚεࢯ͕ొஃ w ৽͍͠จ๏ཁૉɺ1)1Y΍))7.ͱͷൺֱ

  7. ϥεϚεࢯʮΈͳ͞ΜͷΑ͏ͳΤϯδχ Ξʹͱͬͯ͸গʑΫϨΠδʔͳ͜ͱʹฉ ͑͜Δ͔΋͠Ε·ͤΜ͕ɺ1)1ݴޠ͸ɺ 8PSE1SFTTΛඇৗʹॏཁࢹ͍ͯ͠·͢ʯ

  8. IUUQUBMLTQIQOFUUPLZPXQCFODI

  9. 1)1࢖༻ײ w 1)1֦ுͱͷؔ܎΍ϩʔϨϕϧͳςΫχοΫ·Θ Γʹͨ·ʹ͕ࠩग़Δ w ΞϓϦέʔγϣϯ࣮૷తͳ૚Ͱ͸ɺ΄ͱΜͲจ๏ͷ มߋӨڹ͕ͳ͔ͬͨ w ϕϯμʔͷରԠΛ֬ೝ͑͢͠͞Ε͹Ҡߦ೉౓͸௿͍ w

    ΄ͱΜͲͷπʔϧ͕ܧଓͯ͠ར༻Ͱ͖Δ
  10. 1IQ4UPSN

  11. 1)1FS͕*%&Λ޷Μͩ w 7JN&NBDTΛ࢖͖ͬͯͨΤϯδχΞ͕*%&Λ޷Μ Ͱ࢖͍࢝Ί͍ͯΔ w 1)1ʹΦϒδΣΫτࢦ޲͕ࠜ෇͍ͨ݁Ռˠ*%&ͱ ͷ૬ੑ͕޲্ͨ͠ ʜͷ͔ͳ

  12. 1IQ4UPSNͷػೳ w 1)1ίʔυղੳ w %#ΫϥΠΞϯτ w 3&45ΫϥΠΞϯτ w (JU w

    7BHSBOU w 4BTT-&444UZMVT w $P⒎FF4DSJQU5ZQF4DSJQU w (SVOU(VMQ w 8PSE1SFTTϓϥάΠϯ w '514'51
  13. 8PSE1SFTT ϓϥάΠϯʲެࣜʳ

  14. ʜ͸ɺ΋͕࣌ؒ͋͠Ε͹ʹͯ͠

  15. '51

  16. 1IQ4UPSN%FQMPZσϞ

  17. w ͍·Ͳ͖ͷ8FC։ൃͰ͸ɺݹ͍ϓϩάϥϜΛ͢΂ͯফ͠ ͯ৽͍͠ϓϩάϥϜΛσϓϩΠ w ͚Ͳ8PSE1SFTT͸XQDPOUFOUͷத͕ॻ͖׵ΘΔ w ΋͠αʔό͕ࣗಈతʹ͍Ζ͍Ζߋ৽͍ͯͨ͠Β w ΋͠ςʔϚ$44͕؅ཧը໘͔Βฤू͞Ε͍ͯͨΒ w

    ΞοϓϩʔυϑΝΠϧ໊͕ڝ߹ͨ͠Β w खݩͰม͑ͨ಺༰ͱαʔόͰมΘͬͨ಺༰ΛͭͶʹ໨ࢹͰ ֬ೝ͠ͳ͕Βಉظ͕ݱ࣮త
  18. ͓ͬͱɺ%PDLFSͷ͜ͱ͸࣍ͷ࿮Ͱ

  19. *%&·ͱΊ ͳͥड͚ೖΕΒΕ͔ͨ w ͔ͭͯɺϑϨʔϜϫʔΫ΍$.4͝ͱʹશ͘ҧ͏1)1 ͷ࢖͍ํΛ͍ͯͨ͠ w ݱࡏʮ1)1Ͱ͋Δʯͱ͍͏࣌఺Ͱ͋Δఔ౓ͷҰ؏ ੑ͕Ͱ͖ͨˠػցతͳิॿΛ͠΍͘͢ͳͬͨ w ͳͷͰɺ*%&͕ྲྀߦͬͨͷ͸୭ͷ͓͔͔͛ͱ͍͏

    ͱʜ
  20. None
  21. Ͱ͸ͳͯ͘

  22. ΦϒδΣΫτࢦ޲ 1)1ίϛϡχςΟඪ४

  23. 1)1'*( ͝ଘ஌Ͱ͔͢

  24. 143 ͋ΒͨΊͯʜ͝ଘ஌Ͱ͔͢

  25. w 143໊લۭؒͱϑΥϧμ෼͚ͷن໿
 ഇࢭ143ʹ࡮৽  w 143ίʔσΟϯάελΠϧن໿ w ͜ΕҎલ͸ϑϨʔϜϫʔΫ͝ͱʹશ෦όϥόϥͷϥ ΠϒϥϦͩͬͨ

  26. 1)1'*( w '*('SBNFXPSL*OUFSPQ(SPVQ w Φʔϓϯιʔεͷ1)1ϥΠϒϥϦ͕ޓ͍ʹ஥ྑ͘͠ ͨΒศརͩΑͶ w 143 1)14UBOEBSE3FDPNNFOEBUJPO Λࡦఆ

  27. 1)1'*(ࢀՃϝϯόʔ "TTFUJDBOE#V[[ ,SJT8BMMTNJUI !LSJTXBMMTNJUI  "VSB1SPKFDUBOE4PMBS'SBNFXPSL 1BVM.+POFT !QNKPOFT  $BLF1)1

    -BSSZ.BTUFST !1IQ/VU  $PNQPTFS +PSEJ#PHHJBOP !TFMEBFL  DPODSFUF ,PSWJO4[BOUP !LPSWJOT[BOUP  $POUBP0QFO4PVSDF$.4 -FP'FZFS !MFPGFZFS  %SVQBM -BSSZ(BSpFME !$SFMM  F;1VCMJTI "OESF3PNDLF !BOESFSPN  )PSEF +BO4DIOFJEFS !ZVOPTI  *#.J5P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ࡏ IUUQXXXQIQpHPSHNFNCFST
  28. 8PSE1SFTT ೖͬͯͳ͍  +PPNMB %SVQBM DPODMFUF QIQ## .FEJB8JLJ 4VHBS$3. ͋Ε

    ֤8FCϑϨʔϜϫʔΫ
  29. 8PSE1SFTTͱ'*(ͷؔ܎ w 1)1'*(ͷՃೖͱΠέͯΔ͔Ͳ͏͔͸ແؔ܎ w 143ͷ໨తόϥόϥͷ044͸ΠϯλʔϑΣʔε Λڞ༗ͯ͠શମͰίϛϡχςΟΛܗ੒͠Α͏ w 8PSE1SFTT͸΋ͱ΋ͱେ͖ͳίϛϡχςΟΛ࣋ͭ w ϓϥάΠϯςʔϚͷ৹ࠪϫʔΫϑϩʔ

    w ίʔσΟϯά஌ࣝͷڞ༗ίϛϡχςΟ
  30. None
  31. ࣄ݅ w %PDUSJOF཭୤ w (V[[MF཭୤ w 1SPQFM཭୤ w -BSBWFM཭୤ ଞ࢒ཹ

  32. ཭୤㱠൓ର ͜ΕҎ্ͷඪ४ࡦఆʹ͸ՃΘΒͳ͍͕༗༻ͳ143ʹ͸৐Δ

  33. ূڌʮ143ʹ৐ͬͯͳ͍ͳ Μͯ͋Γ͑ͳ͍ɻͳͥͬͯʜʯ

  34. $PNQPTFS

  35. $PNQPTFS w 1)1ύοέʔδ؅ཧπʔϧ w 143ʹ४ڌ͢Ε͹SFRVJSF@PODFෆཁ w ͍ͭʹϦϦʔε w ӬԕͷΞϧϑΝ൛ͱݴΘΕͳ͕Β΋େଟ਺ͷϑϨʔϜϫʔ ΫϥΠϒϥϦ͕࠾༻

    w 1)1ΧϯϑΝϨϯεؔ੢ʹɺ೔ຊͰ΋ͬͱ΋ॏཁ ͳίϯτϦϏϡʔλʔ͕
  36. QBDLBHJTUPSH

  37. ʮͰ΋ͦΕ143ͬͯ͜ͱ͸ɺ 8PSE1SFTTͷϓϥάΠϯʹ ͸࢖͑ͳ͍Μ͡Όʜʯ

  38. XQBDLBHJTUPSH ͑ ࢖͑ΔΑ

  39. ࢖͍ํ \ SFQPTJUPSJFT< \ UZQFDPNQPTFS  VSMIUUQTXQBDLBHJTUPSH ^ > 

    SFRVJSF\
 DPNQPTFSJOTUBMMFSTd 
 XQBDLBHJTUQMVHJODPOUBDUGPSN?
 ^ 
 FYUSB\
 JOTUBMMFSQBUIT\
 EPDSPPUXQDPOUFOUQMVHJOT\OBNF^<UZQFXPSEQSFTTQMVHJO> 
 EPDSPPUXQDPOUFOUUIFNFT\OBNF^<UZQFXPSEQSFTTUIFNF>
 ^
 ^ ^ DPNQPTFSKTPO σϑΥϧτͷQBDLBHJTUҎ֎ʹ ͔͜͜Β΋औಘͯ͠ ಛघͳύεʹΠϯετʔϧͰ ͖ΔΑ͏ʹͪΐͬͱ ͜ΕೖΕͯ
  40. σϞͷ(JU $ tree . ├── LICENSE ├── README.md ├── Vagrantfile

    ├── codeception.yml ├── composer.json ├── composer.lock ├── docroot │ └── wp-content │ ├── plugins │ │ └── site │ └── themes │ └── site │ ├── functions.php │ └── style.css ├── init.sh ├── provisioning │ ├── playbook.yml │ ├── scripts │ │ ├── install-wp-cli.sh │ │ └── setup-wordpress.sh │ └── templates │ └── httpd.conf ├── salts.txt └── tests ├── … ུ └── unit.suite.yml ͖Ε͍ͳϑΥϧμͯ͠ΔͩΖɻ ΢ιΈ͍ͨͩΖɻ XQDPOUFOUͳΜͩͥɻ XQDPSFEPXOMPBE   DPNQPTFSJOTUBMMͰ
  41. None
  42. $PNQPTFSར༻ͷϝϦοτ w μ΢ϯϩʔυͨ͠ϥΠϒϥϦͷίϐʔΛόʔδϣϯ ؅ཧʹؚΊͳ͍͍ͯ͘ w XQDMJΑΓႈ౳ੑ͕ߴ͍ طʹ͋ͬͨΒೖΕͳ͍ɺ ཁΒͳ͍΋ͷΛ࢒͞ͳ͍ɺෳ਺؀ڥʹಉ͡όʔδϣ ϯߏ੒͕࠶ݱͰ͖Δ 

    w XQDMJͱDPNQPTFSͷซ༻͕Φεεϝ
  43.  1)1ͷόʔδϣϯͰ͸͋Γ·ͤΜɻͯ͞ԿͰ͠ΐ͏ ΋͏ͻͱͭ஫໨ͷ

  44. 143 3&45GVM

  45. 3&45 w 3FQSFTFOUBUJPOBM4UBUF5SBOTGFSͷུ w ଏʹ͍͏ 8FCαʔϏεͷ "1* w γϯάϧϖʔδΞϓϦέʔγϣϯ 41"

     w αΠτઃܭͷϚΠΫϩαʔϏεԽ
  46. ఻౷తͳ8FCΞϓϦέʔγϣϯ αʔϏε ϒϥ΢β )5.- (&5 1045

  47. ۙࠒͷΞʔΩςΫνϟ αʔϏε 3&45 ଞͷ8FCΞϓ Ϧέʔγϣϯ ϒϥ΢β +4 ϞόΠϧ ΞϓϦ "1*

    "1* (&51045 165%&-&5&1"5$)
  48. +BWB4DSJQU΁ͷ஫໨ͷߴ·Γ w 1)1ΧϯϑΝϨϯεͰ"OHVMBS+4౳ɺ+BWB4DSJQU ؔ࿈ͷηογϣϯ͕ਓؾΛूΊ͍ͯΔ w 1)1ΧϯϑΝϨϯεؔ੢Ͱ͸8FC $PNQPOFOUʹؔ͢Δηογϣϯ͕ͭ w 1)1ͷϓϩάϥϜͱϢʔβʔΠϯλʔϑΣʔεΛ෼ ཭͍ͨ͠ͱ͍͏ؾ࣋ͪ

  49. ϚΠΫϩαʔϏε143 w ϚΠΫϩαʔϏεαʔόʔؒΛ)551Ͱͭͳ͝͏ w 143)551NFTTBHFJOUFSGBDFT w 1)1͔Β)551ϦΫΤετ͢Δͱ͖ͷ͓໿ଋ w 1)1͕)551ϦΫΤετΛड͚ͨͱ͖ͷ͓໿ଋ w

    ૣ͘΋"844%,͕Ұ෦143ʹ४ڌ
  50. ͜ͷ΁Μ8PSE1SFTT ͰΘ͔Γ΍͍͘͢͏ͱ

  51. 813&45"1*

  52. w 8PSE1SFTTΛૢ࡞͢ΔϞόΠϧΞϓϦ͕࡞ΕΔ w 8PSE1SFTTΛར༻ͨ͠ผͷ8FCαʔϏεΛ࡞ΕΔ w ͬͯͱ͖ʹ w 1)1Ͱ஥ྑ͘αʔόؒ௨৴͢ΔͳΒͳΔ΂͘143 ҙࣝͯ͠Ͷ

  53. ৄࡉ͸͋ͱͷϋϯζΦϯʹ

  54. ࣄྫ"84&MBTUJDTFBSDI 4FSWJDFೝূ w "84ͷ&MBTUJDTFBSDI4FSWJDFʹ͸ϕϯμʔඪ४ ͷύεϫʔυೝূ͕ͳ͍ w *".ϩʔϧೝূ w "844%,͕ɺ143ϦΫΤετΛड͚ͯ*".ϩʔ ϧೝূ৘ใ෇͖ϦΫΤετΛग़ྗ͢ΔΑ͏ʹͳͬͨ

  55. ϦΫΤετ "844%, ೝূࡁΈϦΫΤετ LFZ TFDSFU SFHJPO "84Ͱ࢖͑Δ "84Ͱ࢖͑ͳ͍ 143 143

    "84 )551
  56. w &MBTUJDTFBSDI)551ͰΞΫηε͢ΔݕࡧಛԽ/P42- w .Z42-͸શจݕࡧ͕ۤखɺ&MBTUJDTFBSDI͸શจݕࡧΠ ϯσοΫεͷઃఆ͕༏ल w 8PSE1SFTTͷશจݕࡧʹ౷߹ˠϓϥάΠϯXQ FMBTUJDTFBSDI XPSEQSFTTGBOUBTUJDFMBTUJDTFBSDI w

    ΋ͱ΋ͱ"84ͱ͸ແؔ܎͕ͩͬͨɺ"84͕ &MBTUJDTFBSDIͷϗεςΟϯάαʔϏε΋։࢝ w ެࣜͷΫϥ΢υϗεςΟϯά΋͔ͳΓ༏लˠIUUQ UBOBLBIJTBUFSVIBUFOBCMPHKQFOUSZ  &MBTUJDTFBSDIΛ஌Βͳ͔ͬͨਓ͸ಡΜͰ͓͍͍ͯͩ͘͞
  57. ͪΐͬͱ͚ͩ࣋࿦ w ·͋ɺΫϥΠΞϯτ·ͰΦʔϧ3&45Ͱ׬݁Ͱ͖Δ ઃܭͳΜͯͷ͸جຊɺάάΒΕͳ͍΋ͷ΍γΣΞ ͞Εͳ͍΋ͷΛ࡞Δ࿩Ͱ͢ΑͶ w ΞϓϦέʔγϣϯ͕ൃୡ͢Ε͹ͦ͜ɺ༏ΕͨςΩε τ8FCίϯςϯπͱͯ͠ɺ)5.-υΩϡϝϯτ͸ ͜Ε͔Β΋·͢·͢ॏཁͩͱࢥ͍·͢ w

    Ͱ΋ɺ͓ͨ͘ͷ8FCϖʔδյΕ͍ͯ·ͤΜ͔
  58. ࣗಈςετ w ϓϩάϥϜΛςετ͢ΔϓϩάϥϜ ྫ1)16OJU  w ࠷ۙͷ1)1ΧϯϑΝϨϯεͰ͸ɺ+BWB4DSJQUΛؚ Ήςετ΋࿩୊ʹ w ·ͨɺ௚ۙ೥ͰৼΔ෣͍ςετʹؔ͢Δηογϣ

    ϯ͕૿͑ͨ
  59. $PEFDFQUJPO

  60. $PEFDFQUJPO w ࣗಈςετϑϨʔϜϫʔΫ w ड͚ೖΕςετɺػೳςετɺ୯ମςετ w 81͸୯ମςετ͕೉͍͠ w $PEFDFQUJPO͸ड͚ೖΕػೳςετ͕ಛ௃ w

    ʮ8FCϖʔδΛ։͍ͨʯͰ࢝·ΓɺʮϦϯΫΛΫ ϦοΫʯʮจݴ͕ग़͍ͯΔ͔ʯΛ֬ೝ
  61. ͜Μͳ;͏ʹॻ͖·͢ <?php $I = new AcceptanceTester($scenario); $I->am('user'); $I->wantTo('login to website');

    $I->lookForwardTo('access all website features'); $I->amOnPage('/login'); $I->fillField('Username','davert'); $I->fillField('Password','qwerty'); $I->click('Login'); $I->see('Hello, davert');
  62. w ೉͍͠จ๏͕Θ͔Βͳͯ͘΋ɺεΫϦϓτͱͯ͠ॻ ͚Δ ಡΊΔˠςετͨ͠ࣄฑΛڞ༗͠΍͍͢ w ϩʔΧϧͷ։ൃ؀ڥ͚ͩͰͳ͘ɺεςʔδϯά؀ڥ ΍ຊ൪؀ڥʹରͯ͠΋ɺࣗಈςετΛ࣮ߦͰ͖Δ w 8FCαΠτߋ৽ͨ͠Βɺ೦ͷͨΊಈ࡞νΣοΫ͠ ·͢ΑͶɻϧʔνϯϫʔΫͰ͢ΑͶ

  63. IUUQDPEFDFQUJPODPNGPSXPSEQSFTT ެࣜ

  64. ʜʹ͕ͨͬͯ͠ ड͚ೖΕςετ΍ͬͯΈͨσϞ

  65. ड͚ೖΕςετͷίπ w هड़͕؆୯ͳ൓໘ɺ෼ذ͕͋ͬͨΓͯ͠Օ৚ॻ͖Ͱ ॻ͚ͳ͍΄Ͳෳࡶͳදݱʹ͸޲͔ͳ͍ w ΋ͬͱ΋ॏཁͳਖ਼ৗܥͷૢ࡞γφϦΦΛɺ͍͞͞ͳ Τϯόά͔ΒकΔ͜ͱɺ͚ͦͩ͜ʹয఺Λ w ਫ਼ີʹςετ͗͢͠ˠ஗͍ςετΛಈ͔͢ಡ Ή΄͏͕೉͘͠ͳΔˠຊ຤స౗

  66. σϞͰ࢖ͬͨίʔυ wIUUQTHJUIVCDPN
 UBOBLBIJTBUFSV
 XQEFNPXDL w ਌੾ͳਓ͕5XJUUFSͰγΣΞͯ͘͠ΕΔΜͰ͢ΑͶ͖ͬͱ

  67. ·ͱΊ 8PSE1SFTT͸1)1Ͱ͋Δ 1)1ͷ࠷৽ಈ޲ΛऔΓೖΕΑ͏ ͋ɺ΋͏औΓೖΕͯΔ ͳΒ࢖͓͏ͥ ஌Δνϟϯεʜ ͦ͏ͩ1)1ͷྲྀߦΓ͔Β ௥͔͚ͬΑ͏

  68. 1)1ΧϯϑΝϨϯεؔ੢ ֤஍ҬͰ೥ճશࠃͰ஍Ҭ

  69. ؔ੢1)1ษڧձ ؔ੢1)1Ϣʔβʔζάϧʔϓ Ͱ͖Δ͔͗Γ݄ʹճ