Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
5年ぶりにPHPを書いた話
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Toshiyuki Takahashi
March 24, 2021
Programming
360
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
5年ぶりにPHPを書いた話
サボっていたStaticMockのメンテナンスを再開しました。
Toshiyuki Takahashi
March 24, 2021
Transcript
18 slides
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
More Decks by Toshiyuki Takahashi
See All by Toshiyuki Takahashi
Purely Functional Programming with Cats Effect 3 and Scala 3 [ScalaMatsuri2022]
tototoshi
0
7.9k
scala-ojisan
tototoshi
0
170
Steps to master the Play source code
tototoshi
1
570
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
ローカルLLMの基本と近況 2611 / Local LLM basics and recent situation 2611
kishida
3
680
Jujutsu で毎日のバージョン管理に「安心」と「直感性」を
oukayuka
0
130
SODA - FACT BOOK(EN)
sodainc
1
310
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
470
読みやすい!と評判(?)の発表の準備にかける私のこだわり
shoheimitani
0
170
Canvas 2D Context Next
petamoriken
0
930
Kiro Crewによる開発体験ーKiro CrewでStrands Decider 2B に関する技術検証をやってみた
satoshi256kbyte
1
240
Compiling Your Language to WasmGC & Friends
tanishiking
0
960
[DroidKnights 2026] Workflow AX 적용기 — 자동 정책 정리부터 E2E까지
dayeon
0
130
[Kotlin Fest 2026] eBPF Tracing for Kotlin
takehaya
1
410
Getting Started with Vibe Coding
miccheng
0
260
手の動かし方がわからなかった私が個人開発者になるまで
usagi0920_pochi
0
360
Featured
See All Featured
Rails Girls Zürich Keynote
gr2m
96
14k
Introduction to Domain-Driven Design and Collaborative software design
baasie
1
1.1k
Docker and Python
trallard
47
4.3k
Discover your Explorer Soul
emna__ayadi
2
1.4k
What’s in a name? Adding method to the madness
productmarketing
PRO
24
4.3k
What the history of the web can teach us about the future of AI
inesmontani
PRO
3
840
The Straight Up "How To Draw Better" Workshop
denniskardys
239
140k
Data-driven link building: lessons from a $708K investment (BrightonSEO talk)
szymonslowik
1
1.5k
30 Presentation Tips
portentint
PRO
1
480
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
56
3.5k
GraphQLとの向き合い方2022年版
quramy
50
15k
A Guide to Academic Writing Using Generative AI - A Workshop
ks91
PRO
1
580