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
5年ぶりにPHPを書いた話
Search
Toshiyuki Takahashi
March 24, 2021
Programming
0
320
5年ぶりにPHPを書いた話
サボっていたStaticMockのメンテナンスを再開しました。
Toshiyuki Takahashi
March 24, 2021
Tweet
Share
More Decks by Toshiyuki Takahashi
See All by Toshiyuki Takahashi
Purely Functional Programming with Cats Effect 3 and Scala 3 [ScalaMatsuri2022]
tototoshi
0
6.8k
scala-ojisan
tototoshi
0
130
Steps to master the Play source code
tototoshi
1
500
flyway-play
tototoshi
2
2.1k
Template Engines in Scala
tototoshi
1
3.9k
Play と Scala のこれまでとこれから
tototoshi
1
2.1k
Other Decks in Programming
See All in Programming
Pull-Requestの内容を1クリックで動作確認可能にするワークフロー
natmark
2
450
Back to the Future: Let me tell you about the ACP protocol
terhechte
0
130
Let's Write a Train Tracking Algorithm
twocentstudios
0
220
プログラマのための作曲入門
cheebow
0
530
AIエージェント時代における TypeScriptスキーマ駆動開発の新たな役割
bicstone
4
1.5k
そのpreloadは必要?見過ごされたpreloadが技術的負債として爆発した日
mugitti9
2
2.9k
GitHub Actions × AWS OIDC連携の仕組みと経緯を理解する
ota1022
0
240
開発生産性を上げるための生成AI活用術
starfish719
1
150
『毎日の移動』を支えるGoバックエンド内製開発
yutautsugi
2
170
iOSDC.pdf
chronos2500
2
660
私達はmodernize packageに夢を見るか feat. go/analysis, go/ast / Go Conference 2025
kaorumuta
2
480
タスクの特性や不確実性に応じた最適な作業スタイルの選択(ペアプロ・モブプロ・ソロプロ)と実践 / Optimal Work Style Selection: Pair, Mob, or Solo Programming.
honyanya
3
140
Featured
See All Featured
Testing 201, or: Great Expectations
jmmastey
45
7.7k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
27k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
132
19k
Docker and Python
trallard
46
3.6k
Optimizing for Happiness
mojombo
379
70k
Building Better People: How to give real-time feedback that sticks.
wjessup
368
20k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
45
2.5k
Site-Speed That Sticks
csswizardry
11
880
The Cult of Friendly URLs
andyhume
79
6.6k
Art, The Web, and Tiny UX
lynnandtonic
303
21k
jQuery: Nuts, Bolts and Bling
dougneiner
64
7.9k
Six Lessons from altMBA
skipperchong
28
4k
Transcript
5年ぶりにPHPを書いた話 @tototoshi / はじめてのIT勉強会 in 仙台 #10
⾃⼰紹介 https://github.com/tototoshi https://twitter.com/tototoshi ⾼橋です ⽯巻出⾝ 2017年に東京から仙台に引っ越しました
私の仕事 Web中⼼のバックエンドエンジニア 今はほとんどScala フリーランス&リモートで6年⽬
OSS活動 tototoshi/scala-csv ⭐ 604 ScalaのCSVライブラリ flyway/flyway-play ⭐ 166 Flyway(Javaのデータベースマイグレーションツール)のPlay Frameworkプラグイン
tototoshi/slick-joda-mapper ⭐ 250 SlickというORMでjoda-time(Javaの⽇時ライブラリ)を使うためのライ ブラリ
今⽇の話 PHPの話 GitHub、OSS楽しいよという話
昔々... tototoshi/staticmock ⭐ 37 PHP のスタティックメソッドをモック化する - pixiv inside [archive]
単体テストのためにstaticメソッドの実装をすり替えたい 普通はできない できるようにした
つまりこういうやつを 接続 情報 取得
こんな感じにテスト
思ったより使われてそう 嬉しい https://packagist.org/packages/tototoshi/staticmock/stats
StaticMockの弱点 作者がメンテナンスを放置している 私です! PHPもう忘れた ( ᐛ ) runkitというPHP拡張に依存している https://github.com/zenovich/runkit PHP7をきっかけに2015年以降メンテナンスされていない
PHP7では別の⼈がforkしたバージョンが使えたのでそれを使っていた ⼤丈夫なのか?
朗報: ちゃんとメンテされてた https://github.com/runkit7/runkit7 runkit7という名前になって継続的にメンテされていた OSSっていいね
朗報: Pull Request StaticMockもrunkit7対応できた 👍
朗報: uopzっていうやつでも動くらしい エゴサしてたらforkした⼈がuopz対応させてるのを発⾒した
朗報: 詳しい解説付き https://qiita.com/kunit/items/43ca86a461d2e5e051cf
朗報: 取り込んだら普通に動いた https://github.com/tototoshi/staticmock/pull/24
結果 runkit7でもuopzでも動くようになった どちらかが開発⽌まったとしてもStaticMockを使い続けられる PHP8も⼤丈夫そう PHPの書き⽅を少し思い出した 👍 rtm-ctlz 👍 kunit
GitHub楽しい ⼀番好きなSNSです ⾃分の作ったものが使われるのは嬉しい 改造してもらえるのはもっと嬉しい みんなでわいわいしましょう
おわり これはおしり https://github.myshopify.com/collections/shirts/products/octocat- one-piece