Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
TechBowlのPRレビューで指摘されたこと
Search
shy
December 04, 2024
250
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
TechBowlのPRレビューで指摘されたこと
https://techtrain.connpass.com/event/330882/
shy
December 04, 2024
Featured
See All Featured
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.8k
KATA
mclloyd
PRO
35
15k
Music & Morning Musume
bryan
47
7.4k
The innovator’s Mindset - Leading Through an Era of Exponential Change - McGill University 2025
jdejongh
PRO
1
330
Joys of Absence: A Defence of Solitary Play
codingconduct
1
510
Jess Joyce - The Pitfalls of Following Frameworks
techseoconnect
PRO
1
410
Digital Ethics as a Driver of Design Innovation
axbom
PRO
1
420
What the history of the web can teach us about the future of AI
inesmontani
PRO
1
690
Principles of Awesome APIs and How to Build Them.
keavy
128
18k
Abbi's Birthday
coloredviolet
3
9.9k
Amusing Abliteration
ianozsvald
1
300
Paper Plane (Part 1)
katiecoart
PRO
1
11k
Transcript
TechBowlのPRレビューで 指摘されたこと
橋本 創平 / そうちゃん / shy 23年卒の新卒2年目。TechBowlには 2021年よりエンジニアインターンとして join。 2023年3月に就職のため退職、同年8
月より副業として再join。 現在、本業では認証認可基盤周辺 サービスの設計・開発に従事。 素人PHPer。
色々な実装をしたけど、、 この時はなんとなく理解で進め ていましたが、 振り返る目的も持ちつつ、深 掘ってみる (最近MBTIがENFP→ENTPにな りました) 私が 対応したPR
自分が対応した PR を振り返ってみた
date()ではなく、 Carbonを使いたみ PHPの組み込み関数 date() で はなく、 Laravelで広く使われている Carbon ライブラリを使用して欲 しいというレビュー
(現在TechBowlバックエンドチームでは CarbonImmutableを使用)
そもそもCarbonってなんで作られたの CarbonはPHPの標準的な日付 ・時刻操作をより直感的かつ 強力に行うために開発された ライブラリ 昔のPHPは日付や時刻操作が 色々と大変だったらしい https://carbon.nesbot.com/
そもそもCarbonってなんで作られたの CarbonはPHPの標準的な日付 ・時刻操作をより直感的かつ 強力に行うために開発された ライブラリ 昔のPHPは日付や時刻操作が 色々と大変だったらしい https://carbon.nesbot.com/ もうちょっと深掘ってみる
Carbonの実装を見てみる https://github.com/briannesbitt/Carbon 多言語対応 に近い実装
Carbonのマクロ機能を見てみる https://github.com/briannesbitt/Carbon ①macroとして内部で保持される ②macroの登録有無で処理の出しわけ
マクロ機能ってよくあるやつ? https://laravel.com/api/master/Illuminate/Support/Traits/Macroable.html Laravelにも Illuminate\Support\Traits\Macroable というものがあった 柔軟性、拡張性が上がるものの自由 すぎてプロジェクトで採用したら困り そう OSS開発の時には視野に入れると良 さそう
他のレビューも見てみる
declare(strict_mode=1); を入れる PHP7で導入された記述で、 今まで関数やメソッドの引数および 戻り値の型に対して暗黙的に型変 換が行われていたものを strict_mode=1で指定すると厳密に チェックするようになるもの
どこで厳密にチェックされているんだろ? PHPのソースコードを読んでみる! ・・・が、PHPはC言語で実装されてい るためなんとなくで、、 php-srcを読んでみよう
どこで厳密にチェックされているんだろ? 型チェック 引数や型の 情報を保持 暗黙的な 型変換 https://github.com/php/php-src
https://github.com/php/php-src 型変換の流れも考えてみる 配列のkeyで指定された1が ”1”に変換される
事業の状況などを見つつ深ぼるのも必要そう!