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.7k
scala-ojisan
tototoshi
0
130
Steps to master the Play source code
tototoshi
1
490
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
新メンバーも今日から大活躍!SREが支えるスケールし続ける組織のオンボーディング
honmarkhunt
5
9.2k
フロントエンドのパフォーマンスチューニング
koukimiura
6
2.2k
猫と暮らす Google Nest Cam生活🐈 / WebRTC with Google Nest Cam
yutailang0119
0
180
React は次の10年を生き残れるか:3つのトレンドから考える
oukayuka
39
14k
Streamlitで実現できるようになったこと、実現してくれたこと
ayumu_yamaguchi
2
200
SwiftでMCPサーバーを作ろう!
giginet
PRO
2
180
Model Pollution
hschwentner
1
160
構文解析器入門
ydah
7
1.8k
脱Riverpod?fqueryで考える、TanStack Queryライクなアーキテクチャの可能性
ostk0069
0
550
チームのテスト力を総合的に鍛えて品質、スピード、レジリエンスを共立させる/Testing approach that improves quality, speed, and resilience
goyoki
5
1.2k
状態遷移図を書こう / Sequence Chart vs State Diagram
orgachem
PRO
2
240
A full stack side project webapp all in Kotlin (KotlinConf 2025)
dankim
0
150
Featured
See All Featured
Embracing the Ebb and Flow
colly
86
4.8k
Testing 201, or: Great Expectations
jmmastey
43
7.6k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
35
2.5k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
161
15k
KATA
mclloyd
30
14k
Producing Creativity
orderedlist
PRO
346
40k
How to Ace a Technical Interview
jacobian
278
23k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
21
1.3k
Build The Right Thing And Hit Your Dates
maggiecrowley
37
2.8k
How to train your dragon (web standard)
notwaldorf
96
6.1k
What's in a price? How to price your products and services
michaelherold
246
12k
Automating Front-end Workflow
addyosmani
1370
200k
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