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をPHP8で動かしてみた
Search
qst_exe
January 22, 2021
Programming
0
160
LaravelをPHP8で動かしてみた
「Webナイト宮崎 Vol.12 ~てげPHP学びたい~」でLTした内容です
https://tegehoge.connpass.com/event/199828/
qst_exe
January 22, 2021
Tweet
Share
More Decks by qst_exe
See All by qst_exe
Apple Vision Pro であそぼ in さくらじまハウス
qst_exe
0
18
Google I/O 2024 Firebase のアップデート内容
qst_exe
0
130
Babylon.js で始めるヘッドレス CMS/A headless CMS on Babylon.js
qst_exe
0
190
WebXR で Web をもっと楽しもう
qst_exe
0
230
今年のメタバースについての取り組みとこれから
qst_exe
0
220
今年のメタバースについての取り組みとこれから
qst_exe
0
56
visionOSアプリ開発について
qst_exe
0
130
visionOSアプリ開発のすゝめ
qst_exe
0
140
EDDのすゝめ 〜LT大会に参加しませんか?〜
qst_exe
0
49
Other Decks in Programming
See All in Programming
RubyLSPのマルチバイト文字対応
notfounds
0
110
Duckdb-Wasmでローカルダッシュボードを作ってみた
nkforwork
0
120
as(型アサーション)を書く前にできること
marokanatani
8
2.6k
Jakarta EE meets AI
ivargrimstad
0
510
Snowflake x dbtで作るセキュアでアジャイルなデータ基盤
tsoshiro
2
520
とにかくAWS GameDay!AWSは世界の共通言語! / Anyway, AWS GameDay! AWS is the world's lingua franca!
seike460
PRO
1
850
카카오페이는 어떻게 수천만 결제를 처리할까? 우아한 결제 분산락 노하우
kakao
PRO
0
110
Macとオーディオ再生 2024/11/02
yusukeito
0
370
Better Code Design in PHP
afilina
PRO
0
120
3 Effective Rules for Using Signals in Angular
manfredsteyer
PRO
0
110
ヤプリ新卒SREの オンボーディング
masaki12
0
130
Click-free releases & the making of a CLI app
oheyadam
2
110
Featured
See All Featured
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
47
2.1k
Documentation Writing (for coders)
carmenintech
65
4.4k
Bash Introduction
62gerente
608
210k
Designing Experiences People Love
moore
138
23k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
16
2.1k
Embracing the Ebb and Flow
colly
84
4.5k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
44
6.8k
Rails Girls Zürich Keynote
gr2m
94
13k
How to Ace a Technical Interview
jacobian
276
23k
Principles of Awesome APIs and How to Build Them.
keavy
126
17k
Visualization
eitanlees
145
15k
5 minutes of I Can Smell Your CMS
philhawksworth
202
19k
Transcript
LaravelΛPHP8Ͱಈ͔ͯ͠Έͨ WebφΠτٶ࡚ Vol. 12 2021-01-22 ͨ͘͢Μ
Agenda 1. ࣗݾհ 2. PHP8ͷ֓ཁհ 3. Laravelͷಋೖ
ࣗݾհ ◆໊લɿͨ͘͢Μ ◆ग़ɿࣛࣇౡݝͷେ۱ (ٶ࡚دΓͷχϯήϯͰ͢ʂ) ◆ࣗݾհ ιϑτΣΞΤϯδχΞ(εϚϗΞϓϦ։ൃ, WebγεςϜ։ൃ) ઐֶߍͷඇৗۈߨࢣ(PHPڭ͑ͯ·͢) ࣛࣇౡ.mk, ώϥϚαͳͲͷίϛϡχςΟ׆ಈ
SNSͬͯ·͢ʔ
ྗΛೖΕ͍ͯΔίϛϡχςΟ׆ಈ ࣛࣇౡ.mk ώϥϚα ॳݟͷਓͰؾܰʹࢀՃͰ͖ΔίϛϡχςΟ ڞಉ։ൃͱ͔৭ʑͬͯΔΤϯδχΞαʔΫϧ
PHP8ʹ͍ͭͯ
ओཁػೳ • JITͷಋೖ • Named Arguments • Attributes • Constructor
Property Promotion • Union Types • Match Expressions • Nullsafe Operator • ൺֱԋࢉࢠ(==)ͷڍಈݟ͠
PHP7͔ΒPHP8ͷॻ͖͑ • ൺֱԋࢉࢠ(==)Λ͍ͬͯͳ͚Εॻ͖͑ͦ͢͠͏ • PHP5͔ΒPHP7ͷॻ͖͑େมͩͬͨهԱ(ඇਪͳॻ͖ํ͕ଟ ͔͍͔ͬͨͤ) • Laravelͷ߹ɺ6~8ܥͷ߹ʹPHP8ʹରԠ͍ͯ͠Δͱͷ͜ͱ • https://blog.laravel.com/laravel-php-8-support
Laravelͷಋೖ
લఏ • ϩʔΧϧڥ(macOS)ͱQAڥ(Heroku)Ͱݕূ • όʔδϣϯཧʹphpbrewΛར༻ • ରͷΞϓϦतۀ༻ʹ࡞ͬͨ࠷ݶͷCRUDΞϓϦ • Laravelͷόʔδϣϯ7.xܥ •
ݫ֨ϞʔυͰܕݫີʹཧ
None
PHP8ͷΠϯετʔϧ&༗ޮԽ $ php -v PHP 7.3.11 (cli) (built: Jun 5
2020 23:50:40) ( NTS ) Copyright (c) 1997-2018 The PHP Group Zend Engine v3.3.11, Copyright (c) 1998-2018 Zend Technologies $ phpbrew self-update $ phpbrew known --update $ phpbrew install 8.0.1 +default +dbs +curl $ phpbrew use php-8.0.1 $ php -v PHP 8.0.1 (cli) (built: Jan 22 2021 01:59:33) ( NTS ) Copyright (c) The PHP Group Zend Engine v4.0.1, Copyright (c) Zend Technologies
ϩʔΧϧαʔόͷىಈ $ php artisan serve Laravel development server started: http://127.0.0.1:8000
PHP 8.0.1 Development Server (http://127.0.0.1:8000) started ىಈͨ͠ʂʂ
HerokuͷσϓϩΠ "php": "^8.0.0" "fakerphp/faker": "^1.9.1" "phpunit/phpunit": "^9.3" $ composer update
composer.jsonͷPHPόʔδϣϯΛߋ৽
HerokuͷσϓϩΠ -----> Building on the Heroku-20 stack -----> PHP app
detected -----> Bootstrapping... -----> Installing platform packages... - php (8.0.1) - ext-mbstring (bundled with php) - apache (2.4.46) - nginx (1.18.0) - composer (1.10.19) (தུ) -----> Launching... Released v19 https://laravel-todo-php8.herokuapp.com/ deployed to Heroku PHP8ͰͷHerokuͷσϓϩΠޭʂʂ
݁ LaravelΛPHP8Ͱಈ͔͢ͷಛʹͳ͠
ࠓޙͷ՝ • ։ൃɾQAڥͰ͔͠ར༻Ͱ͖͍ͯͳ͍ͷͰɺϓϩμΫγϣϯڥͰ ͑ΔΑ͏ʹݕূΛ͢Δ • PHP8ʹͳͬͯύϑΥʔϚϯε͕ͲΕ͘Β͍վળͨ͠ͷ͔ͷௐࠪ • Laravel 5.xܥͰPHP8Λ͑ΔΑ͏ʹ͢ΔͨΊͷௐࠪ
དྷिʹ͘͘ձɺདྷ݄ʹϋοΧιϯΓ·͢ ڵຯͷ͋Δํʮࣛࣇౡ.mkʯͰݕࡧΛʂ
Thank You!!