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
310
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.5k
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
The Evolution of Enterprise Java with Jakarta EE 11 and Beyond
ivargrimstad
0
110
推論された型の移植性エラーTS2742に挑む
teamlab
PRO
0
150
FastMCPでMCPサーバー/クライアントを構築してみる
ttnyt8701
2
100
List Unfolding - 'unfold' as the Computational Dual of 'fold', and how 'unfold' relates to 'iterate'"
philipschwarz
PRO
0
140
CQRS/ESのクラスとシステムフロー ~ RailsでフルスクラッチでCQRSESを組んで みたことから得た学び~
suzukimar
0
200
Passkeys for Java Developers
ynojima
1
330
インターフェース設計のコツとツボ
togishima
2
490
Agent Rules as Domain Parser
yodakeisuke
1
350
『Python → TypeScript』オンボーディング奮闘記
takumi_tatsuno
1
140
Use Perl as Better Shell Script
karupanerura
0
660
Blueskyのプラグインを作ってみた
hakkadaikon
1
290
What Spring Developers Should Know About Jakarta EE
ivargrimstad
1
630
Featured
See All Featured
Automating Front-end Workflow
addyosmani
1370
200k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
30
2.4k
Stop Working from a Prison Cell
hatefulcrawdad
269
20k
Build The Right Thing And Hit Your Dates
maggiecrowley
35
2.7k
Become a Pro
speakerdeck
PRO
28
5.4k
Gamification - CAS2011
davidbonilla
81
5.3k
Principles of Awesome APIs and How to Build Them.
keavy
126
17k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
357
30k
Building a Scalable Design System with Sketch
lauravandoore
462
33k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
19
1.3k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
252
21k
Art, The Web, and Tiny UX
lynnandtonic
298
21k
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