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
レガシーからモダンへ? PHP5.6からの脱却
Search
Keisuke Yamauchi
December 21, 2023
Programming
410
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
レガシーからモダンへ? PHP5.6からの脱却
Cake.jpで行った、PHPアップデートについてのLTを行いましたので、その際のスライドです
Keisuke Yamauchi
December 21, 2023
More Decks by Keisuke Yamauchi
See All by Keisuke Yamauchi
Gopherになって気づくPHPの良さ
kechiiin
0
210
動的型付け言語に抗うPHPStanという戦士
kechiiin
0
34
Cake.jpのCRM 今と未来
kechiiin
0
71
半年かけてPHP5.6からPHP7.4までバージョンアップした苦労と工夫 PHPカンファレンス福岡2024
kechiiin
1
900
(弊社の)OpenSearchに潜んでいた罠
kechiiin
0
160
before/afterで見る Cake.jpのアジャイル開発
kechiiin
0
39
ランダム処理を修正し、DBの負荷を下げた話
kechiiin
0
53
Other Decks in Programming
See All in Programming
設計次第でAIコードの読む量は減らせる / designing-for-code-reading
minodriven
35
16k
プロダクトコードからライブラリの境界を見つける
elmetal
PRO
0
110
Findy - エンジニア向け会社紹介/Findy Company Deck
findyinc
6
400k
すこし踏み込む CancellationToken
htkym
2
1.7k
コードレビューのボトルネックを"する側"と"される側"の両面から解消する
yub0n
2
1.6k
なぜCTOを降りてFDEを選んだのか?〜なぜプロダクト企業がFDEで顧客の現場に踏み込むのか〜
gonta
1
200
Unity6 URPによる海底をテーマにしたVJシステムの解説 | Unity Shader 完全に理解した 勉強会
gam0022
0
360
見えないものを探る要求要件定義に必要な基本的思考 / invisible-requirement-thinking
minodriven
15
8.3k
AWS CDKのカスタムリソースでContinuum(旧Security Agent)を実装した話 | Implementing Continuum (formerly Security Agent) via AWS CDK Custom Resource
akihisaikeda
2
150
Herb in Rails 8.2: Your ERB views, now HTML-aware @ Rails World 2026, Austin, Texas
marcoroth
0
210
【加筆修正版】Laravel のアプリケーションをどこにデプロイするか #phpcon_ehime
akase244
0
150
APNsからLive Activityを開始する話
yumnumm
0
170
Featured
See All Featured
Bootstrapping a Software Product
garrettdimon
PRO
306
120k
The SEO identity crisis: Don't let AI make you average
varn
0
590
HU Berlin: Industrial-Strength Natural Language Processing with spaCy and Prodigy
inesmontani
PRO
0
750
Color Theory Basics | Prateek | Gurzu
gurzu
1
490
Large-scale JavaScript Application Architecture
addyosmani
516
110k
HDC tutorial
michielstock
2
960
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
254
22k
Taking LLMs out of the black box: A practical guide to human-in-the-loop distillation
inesmontani
PRO
3
2.4k
What Being in a Rock Band Can Teach Us About Real World SEO
427marketing
0
1.1k
Fireside Chat
paigeccino
43
4.1k
Breaking role norms: Why Content Design is so much more than writing copy - Taylor Woolridge
uxyall
1
450
30 Presentation Tips
portentint
PRO
1
430
Transcript
© Cake.jp Co.Ltd. All Right Reserved.|Confidential 2023/12/13 レガシーからモダンへ? PHP5.6からの脱却
山内 啓輔
2 © Cake.jp Co.Ltd. All Right Reserved.|Confidential 自己紹介 山内 啓輔
やまうち けいすけ 担当業務 カテゴリーページ、検索機能など 🍰おすすめスイーツ 元祖かぼちゃプリン 約1.2kg かぼちゃ感が強く、甘さが控えめで美味し い! 付属のカラメルをかけることで甘さもアップ カテゴリページ 検索機能
3 © Cake.jp Co.Ltd. All Right Reserved.|Confidential 今日話す内容 1. PHPバージョンアップの歴史
2. どんなことをしているか 3. 大変なこと 4. 工夫ポイント 5. チームワークって大事 6. まとめ
4 © Cake.jp Co.Ltd. All Right Reserved.|Confidential バージョンアップの歴史 前提 弊社にはECサイトと管理画面の2つの環境がある
事前準備 テスト環境のDocker化(2023/07〜2023/08) 単一のサーバーで二つの環境を動かしているので、 PHPのバージョン違いが許されない バージョンアップ ・PHP7.0(2023/09) ・PHP7.1(2023/11) ・PHP7.2(2023/12) 参考:PHP 5.6.x から PHP 7.0.x への移行 ECサイト 管理画面(店舗用)
5 © Cake.jp Co.Ltd. All Right Reserved.|Confidential どんなことをしているか ・Dockerfileの書き換え 主にPHPバージョンの変更
・CI(Github Actions)の書き換え 次のバージョン用のファイルを作成 ・各種ライブラリのバージョン上げ composer.jsonを書き換える ・既存コードの書き換え 公式の情報を元に、使用できなくなる関数などを修正 ・動作確認
6 © Cake.jp Co.Ltd. All Right Reserved.|Confidential 大変なこと ・コードの修正量が多い 対応しないとFatal
Errorになるケースは多くないが、 Warningなどもなるべく対応している ・過去のコードはテストコードが少ない 結構多いこともあるので、「ああー、、、」と思うこともしばしば 自動テストではない別の手段で、動作確認が必要
7 © Cake.jp Co.Ltd. All Right Reserved.|Confidential 引用:PHP 7.0.x から
PHP 7.1.x への移行 大変なこと
8 © Cake.jp Co.Ltd. All Right Reserved.|Confidential 工夫ポイント ・バージョンアップ前後のdiffチェック バージョンアップ前後の
HTMLを比較し、差分がないか確認する シェルスクリプトで動作確認しよう ・バッチの一括実行 バッチを実際に動かし、エラーが出ないことを確認する
9 © Cake.jp Co.Ltd. All Right Reserved.|Confidential チームワークって大事 ・それぞれの環境を並行して進めている お互いが遭遇したエラーを共有することで、倍速で進める
・並行して進めることで作業速度がアップ 環境を一つずつ進めると過去に作業した内容を思い出す必要があるが、 並行して行うことで、「なんだっけ?」が発生しない
10 © Cake.jp Co.Ltd. All Right Reserved.|Confidential まとめ その1 ・シェルスクリプトを用いて、動作確認工数の削減
・チームで並行して行うことで、工数の削減 得られた知見
11 © Cake.jp Co.Ltd. All Right Reserved.|Confidential まとめ その2 バージョンアップのメリット
・null合体演算子が使えるようになった! ・stringなどの型指定ができるようになった! ・CPU使用率が下がった!
12 © Cake.jp Co.Ltd. All Right Reserved.|Confidential 終わり レガシーからモダンへ?PHP5.6からの脱却