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
Laravel_向けの_Package_の作り方.pdf
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
jhonyspicy
November 12, 2019
Programming
170
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Laravel_向けの_Package_の作り方.pdf
jhonyspicy
November 12, 2019
Other Decks in Programming
See All in Programming
仕様駆動開発へのトライを機に チームに適合する手法を模索し続けている話
freee
PRO
0
580
Building a Meta Ray-Ban display app
akkeylab
0
170
実装をデザインガイドラインに追従させるための取り組み / 260731-dip-mosh-design-system
dachi023
0
5.7k
Built Our Own Background Agent at LayerX
layerx
PRO
10
5.8k
Detecting Compromised CI with eBPF and Cilium Tetragon
lizrice
0
210
変わらないものが、変わるものを決める — 意図駆動開発 × イベントソーシング × イミュータブル | What Doesn't Change Decides What Can — IDD × Event Sourcing × Immutability
tomohisa
0
1.8k
生成AIで帳票OCRが「簡単に」作れる時代になった?
kon_shou
0
1.1k
php-fpmのプロセスが枯渇した日-調査・対処・そして本当にやるべきだったこと-
shibuchaaaan
0
320
Android CLI
fornewid
0
230
進化を続けるGo toolsの現在地 / The Current State of Ever-Evolving Go Tools
hond0413
0
240
Claude Code全社展開のためにやったことn選~プラグイン302個・コミッター271人を支えるために~
kenchan
5
1.6k
jsmini JavaScript Engine を作ってみた話
yosuke_furukawa
PRO
0
330
Featured
See All Featured
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.6k
Reality Check: Gamification 10 Years Later
codingconduct
0
2.3k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
35
2.5k
The Spectacular Lies of Maps
axbom
PRO
1
930
The Illustrated Children's Guide to Kubernetes
chrisshort
51
53k
Digital Projects Gone Horribly Wrong (And the UX Pros Who Still Save the Day) - Dean Schuster
uxyall
1
2.4k
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
11
990
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.8k
WENDY [Excerpt]
tessaabrams
11
39k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
659
62k
The untapped power of vector embeddings
frankvandijk
2
1.8k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
28
3.6k
Transcript
Laravel 向けの Packageの作り方 初LTです((((;゚Д゚))))ガクガクブルブル
自己紹介 • 高良 和真 • 琉球インタラクティブ株式会社 • Laravel + Lighthouse(GraphQL)
• @jhonyspicy • ビリヤード・DIY・ステンレス削り
今回のサンプルはこちら https://github.com/jhonyspicy/laravel-example-package
1. GitHubにリポジトリを追加 2. orchestral/testbench パッケージを追加 3. テストを書きつつ開発 4. Packagistで公開 大まかな流れ
1. git clone 2. composer init 3. composer require --dev
orchestra/testbench 4. 下記を作成 • /src • /tests/Feature • /tests/Unit • /phpunit.xml
composer.json に autoload の設定を追記 "autoload": { "psr-4": { "jhonyspicy\\LaravelExamplePackage\\": "src/"
} }, "autoload-dev": { "psr-4": { "jhonyspicy\\LaravelExamplePackage\\Tests\\": "tests" } }
この時点で簡単なテストが動きます。 class ExampleTest extends TestCase { /** * A basic
test example. * * @return void */ public function testBasicTest() { $this->assertTrue(true); } }
DBを使いたい時 • SQLiteのインメモリDBが使えます。 • migrationを使えます。 • factoryも使えます。
None
Versionの上げ方 Tagをつけてプッシュ 例 • 1.0.0 • v1.0.0 • 1.10.5-RC1 •
v4.4.4beta2 • v2.0.0-alpha • v2.0.4-p1
Providerを自動で読み込む composer.jsonに追記 "extra": { "laravel": { "providers": [ "jhonyspicy\\LaravelExamplePackage\\Provider" ]
} }
不要なファイル除外する .gitattributes 追加 /tests export-ignore .gitattributes export-ignore .gitignore export-ignore phpunit.xml
export-ignore
ご静聴ありがとうございました。