Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Speaker Deck
PRO
Sign in
Sign up for free
5年ぶりにPHPを書いた話
Toshiyuki Takahashi
March 24, 2021
Programming
0
150
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
1.5k
scala-ojisan
tototoshi
0
110
Steps to master the Play source code
tototoshi
1
280
flyway-play
tototoshi
2
1.8k
Template Engines in Scala
tototoshi
1
3.7k
Play と Scala のこれまでとこれから
tototoshi
1
2k
Other Decks in Programming
See All in Programming
LetsTry
maimux2x
0
100
Amazon Lookout for Visionで 筆跡鑑定してみた
cmnakamurashogo
0
180
モデルの定義に基づくバリデーションを実現するためのpydantic入門
daikikatsuragawa
0
120
2022 - COSCUP - 打造高速 Ruby 專案開發流程
elct9620
0
100
Edge Side Frontend という新領域
mizchi
24
10k
AWS Config Custom Rule、ノーコードでできるかな?
watany
0
250
Enzyme から React Native Testing Library に移行した経緯 / 2022-07-20
tamago3keran
1
160
10歳の minne から、これから長く続くプロダクトを作るすべての人へ
tsumichan
9
3.7k
話題の AlloyDB は本当に凄いデータベースなのでプレビューを使い倒した #devio2022
maroon1st
0
13k
Pluggable Storage in PostgreSQL
sira
1
200
ESM移行は無理だけどおれもSindreのライブラリが使いたい!
sosukesuzuki
2
560
SGGとは
inoue2002
0
440
Featured
See All Featured
Robots, Beer and Maslow
schacon
152
7.2k
Designing the Hi-DPI Web
ddemaree
272
32k
What's new in Ruby 2.0
geeforr
335
30k
Debugging Ruby Performance
tmm1
65
10k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
223
49k
Adopting Sorbet at Scale
ufuk
63
7.6k
WebSockets: Embracing the real-time Web
robhawkes
57
5.6k
Web development in the modern age
philhawksworth
197
9.4k
ParisWeb 2013: Learning to Love: Crash Course in Emotional UX Design
dotmariusz
100
6k
No one is an island. Learnings from fostering a developers community.
thoeni
9
1.4k
Large-scale JavaScript Application Architecture
addyosmani
499
110k
A better future with KSS
kneath
226
16k
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