@hgsgtk Kazuki Higashiguchi job is … Software Engineer lang is ... PHP, Go ...etc belongs to ... BASE BANK株式会社 (BASE株式会社の100%子会社) at #phpstudy talked about … terraform / ECS / Unit Testing 4
Relation between $me and CakePHP ● work with CakePHP2.x ○ 2014 CakePHP 2.3 ○ 2017~ CakePHP 2.3~2.10 @BASE ● private with CakePHP3.x ○ php sample code at talks ● a contributor to CakePHP ○ cakephp/cakephp 2.x ○ cakephp/docs 3.x ○ not a member 5
= Outline CakePHP next major version 4.0 Roadmap (https://github.com/cakephp/cakephp/wiki/4.0-Roadmap) Timeline 2017/6/11 “3.4 and path to 4.0” talked by Mark Story https://www.slideshare.net/markstory/cakephp-the-road-ahead 2017/6/23 Announcing CakePHP 4 Strawberry https://bakery.cakephp.org/2017/06/23/upcoming-cakephp-roadmap.htm l 2018/6/4 Work on CakePHP 4 started 13 CakePHP 4
= ● primarily be a clean-up release ● focus on removing all the deprecated features ● not add significant new features ● “CakePHP 3.6 を使用していれば簡単に移行できるようにする方針” 17 Easy upgrade
= use scalar type hints, strict typing as much as possible The addition of type hints should not be added if they will cause significant backwards compatibility breaks. 24 Stricter Typing https://github.com/cakephp/cakephp/wiki/4.0-Roadmap
= 25 scalar type hinting and strict typing declare(strict_types=1); namespace Cake\ORM\Association; class HasMany extends Association { public function isOwningSide(Table $side): bool { return $side === $this->getSource(); } https://github.com/cakephp/cakephp/blob/c2995a9ffc5c7dd06f67b56153db7a6cd665c17e/src/ORM/ Association/HasMany.php#L98
API Improvement Features Use null instead of false for `nullable` return Support for PSR 15 middleware Implement PSR 16 ...etc 27 https://github.com/cakephp/cakephp/wiki/4.0- Roadmap
API Improvement Features Use null instead of false for `nullable` return Support for PSR 15 middleware Implement PSR 16 ...etc 28 https://github.com/cakephp/cakephp/wiki/4.0- Roadmap
API Improvement Features Use null instead of false for `nullable` return Support for PSR 15 middleware Implement PSR 16 ...etc 30 https://github.com/cakephp/cakephp/wiki/4.0- Roadmap
RequestHandlerInterface 38 namespace Psr\Http\Server; use Psr\Http\Message\ResponseInterface; use Psr\Http\Message\ServerRequestInterface; interface RequestHandlerInterface { public function handle(ServerRequestInterface $request): ResponseInterface; } https://github.com/php-fig/http-server-handler/blob/a557d72810470f7cf1bf5aa83523097c5c566e02/sr c/RequestHandlerInterface.php#L3
= 44 Middleware before CakePHP4.x namespace App\Middleware; use Cake\I18n\Time; use Psr\Http\Message\ResponseInterface; use Psr\Http\Message\ServerRequestInterface; final class TrackingCookieMiddleware { public function __invoke( ServerRequestInterface $request, ResponseInterface $response, $next): ResponseInterface { // pass the control to next middleware $response = $next($request, $response); if (!$request->getCookie('landing_page')) { $expiry = new Time('+ 1 year'); $response = $response->withCookie('landing_page', [ 'value' => $request->here(), 'expire' => $expiry->format('U'), ]); } return $response; } }
API Improvement Features Use null instead of false for `nullable` return Support for PSR 15 middleware Implement PSR 16 ...etc 46 https://github.com/cakephp/cakephp/wiki/4.0- Roadmap
= RFC - Implement PSR16 support in Cache https://github.com/cakephp/cakephp/issues/12483 “The PSR16 interfaces define a simpler Cache interface that would allow CakePHP to leverage solutions from outside of CakePHP in the longer term if we adopt the interfaces.” 47 Implement PSR-16
Long term support for 3.x & 2.x CakePHP 3.x ● Bug fixes for 18 months after 4.0.0. ● Security fixes for 36 months after 4.0.0 is released. CakePHP 2.x ● Bug fixes for 12 months after the release of 4.0.0. ● Security fixes for 18 months after the release of 4.0.0. 55 https://bakery.cakephp.org/2017/06/23/upcoming -cakephp-roadmap.html
= ● 2008 Orlando, FL, USA ● 2008 Buenos Aires, Argentina ● 2009 Berlin, Germany ● 2010 Chicago, IL, USA ● 2011 Manchester, UK ● 2012 Manchester, UK ● 2013 San Francisco, CA, USA ● 2014 Madrid, Spain ● 2015 New York, NY, USA ● 2016 Amsterdam, Netherlands ● 2017 New York, NY, USA ● 2019 Tokyo, Japan 57 CakeFest’s venue