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
230
未経験で入った新卒が、CakePHP にPR出してMerge された話
gorogoroyasu
February 27, 2017
Tweet
Share
More Decks by gorogoroyasu
See All by gorogoroyasu
phpconf_fukuoka_sponsor_session.pdf
gorogoroyasu
1
4k
ガラケーの世界
gorogoroyasu
1
1.7k
Other Decks in Programming
See All in Programming
Azure AI Foundryのご紹介
qt_luigi
1
200
サーバーゆる勉強会 DBMS の仕組み編
kj455
1
300
QA環境で誰でも自由自在に現在時刻を操って検証できるようにした話
kalibora
1
140
ゼロからの、レトロゲームエンジンの作り方
tokujiros
3
1k
Simple組み合わせ村から大都会Railsにやってきた俺は / Coming to Rails from the Simple
moznion
3
2.1k
為你自己學 Python
eddie
0
520
.NETでOBS Studio操作してみたけど…… / Operating OBS Studio by .NET
skasweb
0
120
テストコードのガイドライン 〜作成から運用まで〜
riku929hr
7
1.4k
Stackless и stackful? Корутины и асинхронность в Go
lamodatech
0
1.3k
PHPで作るWebSocketサーバー ~リアクティブなアプリケーションを知るために~ / WebSocket Server in PHP - To know reactive applications
seike460
PRO
2
770
asdf-ecspresso作って 友達が増えた話 / Fujiwara Tech Conference 2025
koluku
0
1.4k
見えないメモリを観測する: PHP 8.4 `pg_result_memory_size()` とSQL結果のメモリ管理
kentaroutakeda
0
930
Featured
See All Featured
For a Future-Friendly Web
brad_frost
176
9.5k
Building a Scalable Design System with Sketch
lauravandoore
460
33k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.4k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
226
22k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
3
360
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
3
180
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
120k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
132
33k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
28
2.2k
Thoughts on Productivity
jonyablonski
68
4.4k
Designing for humans not robots
tammielis
250
25k
4 Signs Your Business is Dying
shpigford
182
22k
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 ϫϯΧϧϏதऱళͰ͢ɻ ͲͪΒ͓͢͢ΊͷমͰ͢ʂ