[Laravel5.6]CHANGELOGを斜め読み

32110e49878cbda9c310dcc5c53e750c?s=47 k-kurikuri
January 23, 2018

 [Laravel5.6]CHANGELOGを斜め読み

2018/01/23 開催Laravel/Vue.js勉強会#3

32110e49878cbda9c310dcc5c53e750c?s=128

k-kurikuri

January 23, 2018
Tweet

Transcript

  1. [Laravel5.6] CHANGELOGΛࣼΊಡΈ @Laravel/Vue.jsษڧձ#3

  2. ࿩͢͜ͱ • 2018/02ϦϦʔε༧ఆͷLaravel5.6 • ඞཁͳPHPͷversion͸? • CHANGELOG.md͔Βมߋ఺Λ͍͔ͭ͘ൈਮ • ॴײ

  3. Who are you? • twitter @ k-kurikuri • ιʔγϟϧήʔϜΤϯδχΞ •

    Node.js, TypeScript, C#, Laravel…
  4. Laravel5.6Ͱ ඞཁͳPHP -version͸?

  5. composer.jsonΛݟͯΈΔ

  6. "require": { "php": “^7.1.3", "…" } PHP 7.1.3Ҏ্͕ඞਢ

  7. None
  8. General • ApplicationΫϥεʹrunningUnitTestsϝιο υ͕௥Ճ • UnitTest࣮ߦத͔Ͳ͏͔Λ൑ఆ͢Δ • env(‘APP_ENV’) === ‘testing’ͷϥούʔ

  9. Arrays • Illuminate\Support\Arr::wrap(null)͕ۭ഑ྻΛ ฦ͢Α͏ʹͳͬͨ • 5.5ver·Ͱ͸[null]͕ฦΔ͕ɺ5.6ver͸[]

  10. Artisan Console • optimizeίϚϯυͷ࡟আ • 5.5verͰ͸deprecated͔ۭ࣮ͭ૷ͩͬͨ • Taylor͞Μᐌ͘ɺOpcacheͷ࠷దԽʹΑͬͯ optimizeίϚϯυʹΑΔύϑΥʔϚϯε޲্ ͕ෆཁʹͳͬͨͨΊ࡟আ

  11. Artisan Console • migrate:statusͷग़ྗ݁ՌʹΧϥϜ͕௥Ճ • migrationͷ࣮ߦॱΛ؅ཧ͢ΔbatchΧϥϜͷ number͕֬ೝͰ͖ΔΑ͏ʹͳͬͨ

  12. 5.5ver

  13. 5.6ver

  14. Database • Illuminate/Database/Schema/Blueprint:: morphsʹΑΔෳ߹indexఆٛॱ͕มߋ • [_id, _type]ͷෳ߹index͔Βɺ[_type, _id]ʹ • morphsϝιουΛ࢖༻͍ͯͨ͠ํ͸͝஫ҙ

  15. Queues • Illuminate/Contracts/Queue/JobͷIFʹ getJobId(), payload()͕௥Ճ • IFΛ࣮૷ͨ͠JobυϥΠόʔ͸࣮૷ඞਢʹ

  16. Responses • Controller͔ΒModel::create()ͷ݁ՌΛϨεϙ ϯε͢Δͱ… • HTTP 201 Created success͕ฦΔ

  17. class UserController extends Controller { public function store(UserStoreRequest $request) {

    return User::create( $request->only(['email', ‘password’]) ); } // … }
  18. Blade • csrf, methodσΟϨΫςΟϒ͕௥Ճ • @csrf, @method(‘PUT’)ͳͲͱهड़Մೳʹͳͬ ͨ

  19. <form> {{ csrf_field() }} {{ method_field('PUT') }} <!-- ... -->

    </form> <form> @csrf @method('put') <!-- ... --> </form>
  20. ॴײ • ࠓͷॴɺେ͖ͳมߋ͸ͳͦ͞͏ • frameworkҎ֎Ͱ΋มߋ఺͸͋ΔͱࢥΘΕ • 5.6branchʹPR͕͋Γɺ·ͩ·ͩߋ৽͋Γͦ ͏ • ϦϦʔε·Ͱ΋͏গ͠଴ͪ·͢