未経験で入った新卒が、CakePHP にPR出してMerge された話

857f8e3d6d66a64971337077059188a8?s=47 gorogoroyasu
February 27, 2017

未経験で入った新卒が、CakePHP にPR出してMerge された話

857f8e3d6d66a64971337077059188a8?s=128

gorogoroyasu

February 27, 2017
Tweet

Transcript

  1. ະܦݧͰೖͬͨ৽ଔ͕ɺ CakePHP ʹPR ग़ͯ͠ Merge ͞Εͨ࿩ 2017/02/27 Fukuoka.php vol.21

  2. ࣗݾ঺հ ໊લ : ᖛ໺ ହ໌ ɹɹ : @gorogoroyasu ɹɹ :

    gorogoroyasu ɹɹ : ᖛ໺ ହ໌ גࣜձࣾ Fusic ٕज़։ൃ෦໳ ج൫Ϣχοτ 2016೥౓ ৽ଔ
  3. ࣗݾ঺հ 2016೥౓ ৽ଔ ࣮͸ɺ3݄ೖࣾͳͷͰɺ ໌ޙ೔͔Β2೥໨Ͱ͢ɻ มͰ͢Ͷɻ

  4. ൃද͢Δ͜ͱʹͳͬͨܦҢ

  5. ॳΊͯͷൃද ஫ҙ PHP ʹ͍ͭͯ࿩͢ͷ͸ॳΊͯͰ͢ɻ ؒҧͬͨ͜ͱΛݴ͏͔΋͠Ε·ͤΜɻ ؒҧͬͯͨΒɺͦͷ৔Ͱࢦఠ͍ͯͩ͘͠͞ɻ

  6. http://fusic-kiban.hatenablog.com/ ΑΓ “cakephp/cakephp ʹPR ग़ͯ͠merge ͞Εͨ࿩” (CakePHP3 AdventCalendar 24೔໨)

  7. https://github.com/cakephp/cakephp/pull/9849

  8. ͱ͍͏͜ͱͰɺ 1. ԿΛ௚ͨ͠ͷ͔ʁ 2. Ͳ͏௚ͨ͠ͷ͔ʁ 3. ͳͥى͍ͬͯͨ͜ͷ͔ʁ 4. ϨϏϡϫʔͱͷ΍ΓͱΓ͸ʁ ͱ͍ͬͨ࿩Λ͠Α͏ͱࢥ͍·͢ɻ

  9. 1. ԿΛ௚ͨ͠ͷ͔ʁ ԿΛ௚ͨ͠ͷ͔ʹ͍ͭͯ͸ɺ issue ͷλΠτϧʹॻ͍ͯ͋Γ·͢ɻ https://github.com/cakephp/cakephp/issues/9848 maxLimit is ignored in

    PaginatorComponent.php
  10. maxLimit is ignored in PaginatorComponent.php maxLimit͕ޮ͍ͯͳ͍Αʂʂʂ

  11. maxLimit is ignored in PaginatorComponent.php maxLimit͕ޮ͍ͯͳ͍Αʂʂʂ maxLimit ബҗо হ׮ʂʂʂ

  12. maxLimit is ignored in PaginatorComponent.php maxLimit͕ޮ͍ͯͳ͍Αʂʂʂ maxLimit ബҗо হ׮ʂʂʂ maxLimit

    belum bekerja !!
  13. maxLimit͕ޮ͍ͯͳ͍Αʂʂʂ ͋Δϖʔδ ࣍΁ 1ݸ໨ 2ݸ໨ 3ݸ໨ 4ݸ໨ 5ݸ໨ 6ݸ໨ 7ݸ໨

    8ݸ໨ 9ݸ໨ 10ݸ໨ 11ݸ໨ 12ݸ໨ 13ݸ໨ 14ݸ໨ 15ݸ໨ 16ݸ໨ 17ݸ໨ 18ݸ໨ 19ݸ໨ 20ݸ໨ લ΁ limit => ͦͷϖʔδʹදࣔ͢Δ݅਺ maxLimit => ͦͷϖʔδʹදࣔͰ͖Δ ࠷େͷ݅਺
  14. [ “limit” => 25, “maxLimit” => 20, ] ϖʔδωʔτͷ “limit“

    ͕25ʹͳΔ maxLimit͕ޮ͍ͯͳ͍Αʂʂʂ
  15. 2. Ͳ͏௚ͨ͠ͷ͔ʁ Ͳ͏௚ͨ͠ͷ͔͸ɺdiff ʹॻ͍ͯ͋Γ·͢ɻ ͜͜Ͱ͸ɺ؆୯ʹઆ໌͢ΔͨΊɺৄࡉ͸ল͖·͢ɻ ݩͷίʔυ public function getDefaults($alias, $defaults)

    { if (৚݅) { $defaults[‘maxLimit’] = $defaults[‘limit’]; } }
  16. $defaults[‘maxLimit’] = $defaults[‘limit’]; $defaults[‘limit’] = $defaults[‘maxLimit’]; ͍͔ͭ͘ͷ৚݅͸ॻ͖·͕ͨ͠ɺ ͬ͘͟Γ͍͏ͱɺ ͜Μͳײ͡Ͱ௚͠·ͨ͠ɻ 2.

    Ͳ͏௚ͨ͠ͷ͔ʁ(ଓ)
  17. CakePHP2 ͷࠒʹόάͬͯͯɺ CakePHP3 Ҡߦ࣌ʹComponent ͕ͦͬ͘ΓҠ২͞Εͨɻ ͷͰ͸ͳ͍͔ͱࢥͬͯΔɻ (Blame ͨ͠Βɺߋ৽͕2೥લ͔ͩͬͨΒɻ) ͷͰɺൺֱతϨΞͳόάʹ౰ͨͬͨͷͩͱࢥ͏ɻ 3.

    ͳͥىͬͨ͜ͷ͔ʁ
  18. 4. ϨϏϡϫʔͱͷ΍ΓͱΓ͸ʁ શ෦ӳޠͰͨ͠ɻ ͦͯ͠ɺΊͬͪΌGoogle ຋༁ʹ͓ੈ࿩ʹͳΓ·ͨ͠ɻ

  19. ϨϏϡϫʔͱͷ΍ΓͱΓ͸ʁ ͪͳΈʹɺϨϏϡϫʔͱͷ΍ΓऔΓͰɺ Ұ൪ා͔ͬͨͷ͕͜ΕͰ͢ɻ

  20. ϨϏϡϫʔͱͷ΍ΓͱΓ͸ʁ Կ͕ා͔͔ͬͨͱ͍͏ͱɺ ίʔυ͸ܾͯ͠$ defaults + $ configͷΑ͏ͳ΋ͷΛ࣋ͭ΂͖Ͱ͸͋Γ·ͤΜɻ ఆٛʹΑΔ$ config͸ɺϚʔδ༏ઌ౓ͷ$ defaultΑΓ΋ߴ͍ඞཁ͕͋Γ·͢ɻ

    ͦͯ͠ɺਖ਼൓ରͰ͢ɻ ࢲ͸ͦΕ͕͜͜ͰͦΕΛԋ૗͢Δ͔΋͠Εͳ͍ͱࢥ͏ɻ ͍ͣΕʹͯ͠΋ɺ͜͜Ͱม਺Λमਖ਼͢Δඞཁ͕͋Γ·͢ ʢ໊લΛࢦఆ͢Δ͚ͩͰɺ$ defaultʹ͋Δ΋ͷ͸$ configΑΓ΋ߴ͍ʣͷͰɺ কདྷͷࠞཚ΍໰୊Λආ͚Δ͜ͱ͕Ͱ͖·͢ɻ 1. ౖΒΕͯΔͬΆ͍͜ͱ 2. Google ઌੜ͕࢓ࣄΛ์غͨ͜͠ͱɻ
  21. ϨϏϡϫʔͱͷ΍ΓͱΓ͸ʁ ͜Μͳ࣌ॿ͚ͯ͘Εͨͷ͕ɺ ೔ຊਓͷCakePHP3 ίϛολͷํͰͨ͠ɻ ਂ໷1࣌͝Ζ·Ͱ෇͖߹ͬͯ͘Εͯɺ ແࣄϚʔδ͞Ε·ͨ͠ɻ ݁ہͳΜͰౖΒΕ͍͔ͯͨͱ͍͏ͱɺɺɺ ม਺໊͕ѱ͍ɻ ͱ͍͏͜ͱͰͨ͠ɻɻɻ

  22. ϨϏϡϫʔͱͷ΍ΓͱΓ͸ʁ ݁ہͳΜͰౖΒΕ͍͔ͯͨͱ͍͏ͱɺɺɺ ม਺໊͕ѱ͍ɻ ͱ͍͏͜ͱͰͨ͠ɻɻɻ Զɺม਺໊ม͑ͯͳ͍Μ͚ͩͲɻɻɻɻɻɻɻ ͨͩɺ͜ͷݫ͕͠͞ϓϩμΫτΛ ”վળ”͍ͯ͘͠ͱ͍͏͜ͱͳͷͩͱࢥ͍·͢ɻ

  23. ֶΜͩ͜ͱ ͱ͍͏͜ͱͰɺز͔ͭͷ͜ͱΛֶͼ·ͨ͠ɻ 1. େ͖ͳϓϩδΣΫτʹ΋όά͸͋Δɻ 2. όάΛमਖ਼͢Δͷ͸ɺ؆୯ͳ͜ͱ͕͋Δɻ 3. ະܦݧɾ৽ଔͰ΋PR Λग़ͤΔʂʂʂ 4.

    CakePHP3 ͷ೔ຊίϛϡχςΟͷ͋Γ͕ͨ͞ɻ
  24. CakePHP3 ͷSlack νϟϯωϧ ͙͙ͬͯΈ͍ͯͩ͘͞ʂ

  25. ͝੩ௌ͋Γ͕ͱ͏͍͟͝·ͨ͠ɻ

  26. ࠷ޙʹએ఻ Fusic Ͱ͸ɺΤϯδχΞΛืू͍ͯ͠·͢ɻ

  27. ࠷ޙʹએ఻ Fusic Ͱ͸ɺম೑͕޷͖ͳΤϯδχΞΛืू͍ͯ͠·͢ɻ

  28. ম೑෦ 3/24 ͸ɺম೑෦3݄ͷ׆ಈ೔Ͱ͢ɻ ࢀՃΛ͝ر๬ͷํ͸ɺ @gorogoroyasu ·Ͱ͝Ұใ͍ͩ͘͞ɻ ৔ॴ͸ɺψϧϘϯେ໊ళ or ϫϯΧϧϏதऱళͰ͢ɻ ͲͪΒ΋͓͢͢Ίͷম೑԰Ͱ͢ʂ