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
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Toshiyuki Takahashi
March 24, 2021
Programming
340
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
150
Steps to master the Play source code
tototoshi
1
540
flyway-play
tototoshi
2
2.2k
Template Engines in Scala
tototoshi
1
3.9k
Play と Scala のこれまでとこれから
tototoshi
1
2.1k
Other Decks in Programming
See All in Programming
PHPで使える日時の表現と、その知り方 #frontend_phpcon_do
o0h
PRO
0
260
The ROI of Quarkus for Spring Boot Applications
hollycummins
0
120
正しくソフトウェアを作る、前提を疑うための認知の視点 / doubt-premise
minodriven
21
6.7k
エンジニアと一緒にテストコードの設計と実装を改善した話
mototakatsu
0
210
AIだと陥りがちなJakarta EE最新技術への移行時の落とし穴と解決策
tnagao7
0
110
メソッドのジェネリクスでGoの夢は広がるか? / Kyoto.go #65
utgwkk
3
840
AIで効率化できた業務・日常
ochtum
0
140
技術記事、 専門家としてのプログラマ、 言語化
mizchi
13
6.2k
net-httpのHTTP/2対応について
naruse
0
500
Semantic Version 単位で戦略を柔軟に変えて、パッケージアップデートを自動化する
daitasu
1
260
Contextとはなにか
chiroruxx
1
330
ふつうのFeature Flag実践入門
irof
8
4.1k
Featured
See All Featured
How to Think Like a Performance Engineer
csswizardry
28
2.7k
Ruling the World: When Life Gets Gamed
codingconduct
0
260
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
360
30k
How To Speak Unicorn (iThemes Webinar)
marktimemedia
1
490
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
11
950
Documentation Writing (for coders)
carmenintech
77
5.4k
Leo the Paperboy
mayatellez
7
1.8k
Exploring the relationship between traditional SERPs and Gen AI search
raygrieselhuber
PRO
2
4k
Pawsitive SEO: Lessons from My Dog (and Many Mistakes) on Thriving as a Consultant in the Age of AI
davidcarrasco
0
160
SEO for Brand Visibility & Recognition
aleyda
0
4.6k
Building the Perfect Custom Keyboard
takai
2
800
Scaling GitHub
holman
464
140k
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