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
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
jhonyspicy
November 12, 2019
Programming
0
160
Laravel_向けの_Package_の作り方.pdf
jhonyspicy
November 12, 2019
Tweet
Share
Other Decks in Programming
See All in Programming
社内規程RAGの精度を73.3% → 100%に改善した話
oharu121
13
8k
20260313 - Grafana & Friends Taipei #1 - Kubernetes v1.36 的開發雜記:那些困在 Alpha 加護病房太久的 Metrics
tico88612
0
180
The Ralph Wiggum Loop: First Principles of Autonomous Development
sembayui
0
3.7k
AIに任せる範囲を安全に広げるためにやっていること
fukucheee
0
130
AI時代でも変わらない技術コミュニティの力~10年続く“ゆるい”つながりが生み出す価値
n_takehata
2
730
New in Go 1.26 Implementing go fix in product development
sunecosuri
0
430
grapheme_strrev関数が採択されました(あと雑感)
youkidearitai
PRO
1
220
RAGでハマりがちな"Excelの罠"を、データの構造化で突破する
harumiweb
9
2.8k
new(1.26) ← これすき / kamakura.go #8
utgwkk
0
2.3k
ベクトル検索のフィルタを用いた機械学習モデルとの統合 / python-meetup-fukuoka-06-vector-attr
monochromegane
2
410
RubyとGoでゼロから作る証券システム: 高信頼性が求められるシステムのコードの外側にある設計と運用のリアル
free_world21
0
270
ふつうの Rubyist、ちいさなデバイス、大きな一年
bash0c7
0
920
Featured
See All Featured
Stop Working from a Prison Cell
hatefulcrawdad
274
21k
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
11
860
The Illustrated Children's Guide to Kubernetes
chrisshort
51
52k
How to Ace a Technical Interview
jacobian
281
24k
Fashionably flexible responsive web design (full day workshop)
malarkey
408
66k
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.6k
16th Malabo Montpellier Forum Presentation
akademiya2063
PRO
0
70
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
9
1.2k
Speed Design
sergeychernyshev
33
1.6k
The SEO identity crisis: Don't let AI make you average
varn
0
410
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.7k
Large-scale JavaScript Application Architecture
addyosmani
515
110k
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
ご静聴ありがとうございました。