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
350
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
5年ぶりにPHPを書いた話
サボっていたStaticMockのメンテナンスを再開しました。
Toshiyuki Takahashi
March 24, 2021
More Decks by Toshiyuki Takahashi
See All by Toshiyuki Takahashi
Purely Functional Programming with Cats Effect 3 and Scala 3 [ScalaMatsuri2022]
tototoshi
0
7.5k
scala-ojisan
tototoshi
0
160
Steps to master the Play source code
tototoshi
1
540
flyway-play
tototoshi
2
2.2k
Template Engines in Scala
tototoshi
1
4k
Play と Scala のこれまでとこれから
tototoshi
1
2.1k
Other Decks in Programming
See All in Programming
壊れたパーサから始める関数型設計と構成的なパーサ #fp_matsuri
raiga0310
2
250
【SRE NEXT 2026 Lunch Session】一人目専任SREの立ち上げを加速する ― AIと進めたオンボーディングで2分を0.04秒にした話
pkshadeck
PRO
0
2.7k
共通化で考えるべきは、実装より公開する型だった
codeegg
0
250
SREは、MCPとSRE Agentをこう使え!
kazumax55
0
150
AIキャラアプリkaiwaの低遅延音声通話基盤をどう作ったか - AWS Gravitonで支える低遅延・低コストAI Agent基盤
mogamit
0
170
分散システム、なんですぐ死んでしまうん?耐障害性を高めたいあなたのためのレジリエンスパターン入門
mshibuya
7
6.3k
Laravelで学ぶ Webアプリケーションチューニング入門/web_application_tuning_101
hanhan1978
4
770
どこまでゆるくて許されるのか
tk3fftk
0
500
えっ!!コードを読まずに開発を!?
hananouchi
0
220
Apache Hive: そしてCloud Native Lakehouseへ
okumin
1
140
使用 Meilisearch 建立新聞搜尋工具
johnroyer
0
150
Foundation Models frameworkで画像分析
ryodeveloper
1
120
Featured
See All Featured
Building a Scalable Design System with Sketch
lauravandoore
463
34k
Between Models and Reality
mayunak
4
370
Game over? The fight for quality and originality in the time of robots
wayneb77
1
220
Stop Working from a Prison Cell
hatefulcrawdad
274
21k
The AI Search Optimization Roadmap by Aleyda Solis
aleyda
1
6k
Winning Ecommerce Organic Search in an AI Era - #searchnstuff2025
aleyda
1
2.1k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
49
10k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
55k
Avoiding the “Bad Training, Faster” Trap in the Age of AI
tmiket
0
190
<Decoding/> the Language of Devs - We Love SEO 2024
nikkihalliwell
1
280
SEO in 2025: How to Prepare for the Future of Search
ipullrank
3
3.6k
Bridging the Design Gap: How Collaborative Modelling removes blockers to flow between stakeholders and teams @FastFlow conf
baasie
0
610
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