Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
未経験で入った新卒が、CakePHP にPR出してMerge された話
Search
gorogoroyasu
February 27, 2017
Programming
1
220
未経験で入った新卒が、CakePHP にPR出してMerge された話
gorogoroyasu
February 27, 2017
Tweet
Share
More Decks by gorogoroyasu
See All by gorogoroyasu
phpconf_fukuoka_sponsor_session.pdf
gorogoroyasu
1
3.9k
ガラケーの世界
gorogoroyasu
1
1.7k
Other Decks in Programming
See All in Programming
【Kaigi on Rails 2024】YOUTRUST スポンサーLT
krpk1900
1
330
よくできたテンプレート言語として TypeScript + JSX を利用する試み / Using TypeScript + JSX outside of Web Frontend #TSKaigiKansai
izumin5210
6
1.7k
Hotwire or React? ~アフタートーク・本編に含めなかった話~ / Hotwire or React? after talk
harunatsujita
1
120
Tauriでネイティブアプリを作りたい
tsucchinoko
0
370
現場で役立つモデリング 超入門
masuda220
PRO
15
3.2k
Snowflake x dbtで作るセキュアでアジャイルなデータ基盤
tsoshiro
2
520
ピラミッド、アイスクリームコーン、SMURF: 自動テストの最適バランスを求めて / Pyramid Ice-Cream-Cone and SMURF
twada
PRO
10
1.3k
CSC509 Lecture 11
javiergs
PRO
0
180
アジャイルを支えるテストアーキテクチャ設計/Test Architecting for Agile
goyoki
9
3.3k
Kaigi on Rails 2024 〜運営の裏側〜
krpk1900
1
190
PHP でアセンブリ言語のように書く技術
memory1994
PRO
1
170
as(型アサーション)を書く前にできること
marokanatani
9
2.6k
Featured
See All Featured
Optimizing for Happiness
mojombo
376
70k
5 minutes of I Can Smell Your CMS
philhawksworth
202
19k
Bootstrapping a Software Product
garrettdimon
PRO
305
110k
Large-scale JavaScript Application Architecture
addyosmani
510
110k
Agile that works and the tools we love
rasmusluckow
327
21k
Typedesign – Prime Four
hannesfritz
40
2.4k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
665
120k
Learning to Love Humans: Emotional Interface Design
aarron
273
40k
Become a Pro
speakerdeck
PRO
25
5k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
10
720
What’s in a name? Adding method to the madness
productmarketing
PRO
22
3.1k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
27
4.3k
Transcript
ະܦݧͰೖͬͨ৽ଔ͕ɺ CakePHP ʹPR ग़ͯ͠ Merge ͞Εͨ 2017/02/27 Fukuoka.php vol.21
ࣗݾհ ໊લ : ᖛ ହ໌ ɹɹ : @gorogoroyasu ɹɹ :
gorogoroyasu ɹɹ : ᖛ ହ໌ גࣜձࣾ Fusic ٕज़։ൃ෦ ج൫Ϣχοτ 2016 ৽ଔ
ࣗݾհ 2016 ৽ଔ ࣮ɺ3݄ೖࣾͳͷͰɺ ໌ޙ͔Β2Ͱ͢ɻ มͰ͢Ͷɻ
ൃද͢Δ͜ͱʹͳͬͨܦҢ
ॳΊͯͷൃද ҙ PHP ʹ͍ͭͯ͢ͷॳΊͯͰ͢ɻ ؒҧͬͨ͜ͱΛݴ͏͔͠Ε·ͤΜɻ ؒҧͬͯͨΒɺͦͷͰࢦఠ͍ͯͩ͘͠͞ɻ
http://fusic-kiban.hatenablog.com/ ΑΓ “cakephp/cakephp ʹPR ग़ͯ͠merge ͞Εͨ” (CakePHP3 AdventCalendar 24)
https://github.com/cakephp/cakephp/pull/9849
ͱ͍͏͜ͱͰɺ 1. ԿΛͨ͠ͷ͔ʁ 2. Ͳ͏ͨ͠ͷ͔ʁ 3. ͳͥى͍ͬͯͨ͜ͷ͔ʁ 4. ϨϏϡϫʔͱͷΓͱΓʁ ͱ͍ͬͨΛ͠Α͏ͱࢥ͍·͢ɻ
1. ԿΛͨ͠ͷ͔ʁ ԿΛͨ͠ͷ͔ʹ͍ͭͯɺ issue ͷλΠτϧʹॻ͍ͯ͋Γ·͢ɻ https://github.com/cakephp/cakephp/issues/9848 maxLimit is ignored in
PaginatorComponent.php
maxLimit is ignored in PaginatorComponent.php maxLimit͕ޮ͍ͯͳ͍Αʂʂʂ
maxLimit is ignored in PaginatorComponent.php maxLimit͕ޮ͍ͯͳ͍Αʂʂʂ maxLimit ബҗо হʂʂʂ
maxLimit is ignored in PaginatorComponent.php maxLimit͕ޮ͍ͯͳ͍Αʂʂʂ maxLimit ബҗо হʂʂʂ maxLimit
belum bekerja !!
maxLimit͕ޮ͍ͯͳ͍Αʂʂʂ ͋Δϖʔδ ࣍ 1ݸ 2ݸ 3ݸ 4ݸ 5ݸ 6ݸ 7ݸ
8ݸ 9ݸ 10ݸ 11ݸ 12ݸ 13ݸ 14ݸ 15ݸ 16ݸ 17ݸ 18ݸ 19ݸ 20ݸ લ limit => ͦͷϖʔδʹදࣔ͢Δ݅ maxLimit => ͦͷϖʔδʹදࣔͰ͖Δ ࠷େͷ݅
[ “limit” => 25, “maxLimit” => 20, ] ϖʔδωʔτͷ “limit“
͕25ʹͳΔ maxLimit͕ޮ͍ͯͳ͍Αʂʂʂ
2. Ͳ͏ͨ͠ͷ͔ʁ Ͳ͏ͨ͠ͷ͔ɺdiff ʹॻ͍ͯ͋Γ·͢ɻ ͜͜Ͱɺ؆୯ʹઆ໌͢ΔͨΊɺৄࡉল͖·͢ɻ ݩͷίʔυ public function getDefaults($alias, $defaults)
{ if (݅) { $defaults[‘maxLimit’] = $defaults[‘limit’]; } }
$defaults[‘maxLimit’] = $defaults[‘limit’]; $defaults[‘limit’] = $defaults[‘maxLimit’]; ͍͔ͭ͘ͷ݅ॻ͖·͕ͨ͠ɺ ͬ͘͟Γ͍͏ͱɺ ͜Μͳײ͡Ͱ͠·ͨ͠ɻ 2.
Ͳ͏ͨ͠ͷ͔ʁ(ଓ)
CakePHP2 ͷࠒʹόάͬͯͯɺ CakePHP3 Ҡߦ࣌ʹComponent ͕ͦͬ͘ΓҠ২͞Εͨɻ ͷͰͳ͍͔ͱࢥͬͯΔɻ (Blame ͨ͠Βɺߋ৽͕2લ͔ͩͬͨΒɻ) ͷͰɺൺֱతϨΞͳόάʹͨͬͨͷͩͱࢥ͏ɻ 3.
ͳͥىͬͨ͜ͷ͔ʁ
4. ϨϏϡϫʔͱͷΓͱΓʁ શ෦ӳޠͰͨ͠ɻ ͦͯ͠ɺΊͬͪΌGoogle ༁ʹ͓ੈʹͳΓ·ͨ͠ɻ
ϨϏϡϫʔͱͷΓͱΓʁ ͪͳΈʹɺϨϏϡϫʔͱͷΓऔΓͰɺ Ұ൪ා͔ͬͨͷ͕͜ΕͰ͢ɻ
ϨϏϡϫʔͱͷΓͱΓʁ Կ͕ා͔͔ͬͨͱ͍͏ͱɺ ίʔυܾͯ͠$ defaults + $ configͷΑ͏ͳͷΛ͖࣋ͭͰ͋Γ·ͤΜɻ ఆٛʹΑΔ$ configɺϚʔδ༏ઌͷ$ defaultΑΓߴ͍ඞཁ͕͋Γ·͢ɻ
ͦͯ͠ɺਖ਼ରͰ͢ɻ ࢲͦΕ͕͜͜ͰͦΕΛԋ͢Δ͔͠Εͳ͍ͱࢥ͏ɻ ͍ͣΕʹͯ͠ɺ͜͜ͰมΛमਖ਼͢Δඞཁ͕͋Γ·͢ ʢ໊લΛࢦఆ͢Δ͚ͩͰɺ$ defaultʹ͋Δͷ$ configΑΓߴ͍ʣͷͰɺ কདྷͷࠞཚΛආ͚Δ͜ͱ͕Ͱ͖·͢ɻ 1. ౖΒΕͯΔͬΆ͍͜ͱ 2. Google ઌੜ͕ࣄΛ์غͨ͜͠ͱɻ
ϨϏϡϫʔͱͷΓͱΓʁ ͜Μͳ࣌ॿ͚ͯ͘Εͨͷ͕ɺ ຊਓͷCakePHP3 ίϛολͷํͰͨ͠ɻ ਂ1࣌͝Ζ·Ͱ͖߹ͬͯ͘Εͯɺ ແࣄϚʔδ͞Ε·ͨ͠ɻ ݁ہͳΜͰౖΒΕ͍͔ͯͨͱ͍͏ͱɺɺɺ ม໊͕ѱ͍ɻ ͱ͍͏͜ͱͰͨ͠ɻɻɻ
ϨϏϡϫʔͱͷΓͱΓʁ ݁ہͳΜͰౖΒΕ͍͔ͯͨͱ͍͏ͱɺɺɺ ม໊͕ѱ͍ɻ ͱ͍͏͜ͱͰͨ͠ɻɻɻ Զɺม໊ม͑ͯͳ͍Μ͚ͩͲɻɻɻɻɻɻɻ ͨͩɺ͜ͷݫ͕͠͞ϓϩμΫτΛ ”վળ”͍ͯ͘͠ͱ͍͏͜ͱͳͷͩͱࢥ͍·͢ɻ
ֶΜͩ͜ͱ ͱ͍͏͜ͱͰɺز͔ͭͷ͜ͱΛֶͼ·ͨ͠ɻ 1. େ͖ͳϓϩδΣΫτʹόά͋Δɻ 2. όάΛमਖ਼͢Δͷɺ؆୯ͳ͜ͱ͕͋Δɻ 3. ະܦݧɾ৽ଔͰPR Λग़ͤΔʂʂʂ 4.
CakePHP3 ͷຊίϛϡχςΟͷ͋Γ͕ͨ͞ɻ
CakePHP3 ͷSlack νϟϯωϧ ͙͙ͬͯΈ͍ͯͩ͘͞ʂ
͝੩ௌ͋Γ͕ͱ͏͍͟͝·ͨ͠ɻ
࠷ޙʹએ Fusic ͰɺΤϯδχΞΛืू͍ͯ͠·͢ɻ
࠷ޙʹએ Fusic Ͱɺম͕͖ͳΤϯδχΞΛืू͍ͯ͠·͢ɻ
ম෦ 3/24 ɺম෦3݄ͷ׆ಈͰ͢ɻ ࢀՃΛ͝رͷํɺ @gorogoroyasu ·Ͱ͝Ұใ͍ͩ͘͞ɻ ॴɺψϧϘϯେ໊ళ or ϫϯΧϧϏதऱళͰ͢ɻ ͲͪΒ͓͢͢ΊͷমͰ͢ʂ