Page 1
The Road Ahead3.4 and the path to 4.0
Page 2
Present FuturePast
Page 5
Past Upgrading was hard
Page 6
Past Upgrading was brutal
Page 7
Past 2.x is still active
Page 8
Past What did we learn?
Page 9
Past Difficult upgrades
Fragment the community
Page 10
Past Stagnation
Big releases take time
Page 13
Present 3.2.x - 3.4.x
Page 14
Present Working towards stronger typing
Splitting up modal methods
Page 15
$email = new Email(); $email->to(‘[email protected] ') ->from(‘[email protected] ') ->template($template) ->helpers([‘Html’, ‘Emoji’]) ->send();
Combined Methods
Page 16
$email = new Email(); $email->to(‘[email protected] ') ->setFrom(‘[email protected] ') ->setTemplate($template) ->setHelpers([‘Html’, ‘Emoji’]) ->send();
Combined Methods
Page 17
Present PSR7
Adopting community standards
Page 18
Present Immutability
Request & Response
Page 19
// $response is unchanged here. $response->withHeader(‘X-yes’, ‘yes’);
// We need to overwrite $response $response = $response->withHeader(‘X-yes’, ‘yes’);
Immutability
Page 20
Present Middleware
Your application as an onion
Page 21
Present Layers of behavior
Small, focused, and composable
Page 24
Assets
Routes
App
Page 25
Exceptions
Assets
Routes
App
Page 26
CORS
Exceptions
Assets
Routes
App
Page 27
CORS
Exceptions
Assets
Routes
App
Page 28
CORS
Exceptions
Assets
Routes
App
Request
Page 29
CORS
Exceptions
Assets
Routes
App
Request
Page 30
CORS
Exceptions
Assets
Routes
App
Request
Response
Page 31
CORS
Exceptions
Assets
Routes
App
Page 32
CORS
Exceptions
Assets
Routes
AppRequest
Page 33
CORS
Exceptions
Assets
Routes
AppRequest
Page 34
CORS
Exceptions
Assets
Routes
AppRequest
Response
Page 36
Present FuturePast
Page 38
Future New Middleware
CSRF, Cookies, Authentication
Page 39
use Cake\Http\Middleware\EncryptedCookiesMiddleware;
$middleware->add(new EncryptedCookiesMiddleware([ [‘remember_me’, ‘secrets’], Configure::read(‘Cookie.aesKey’) ]));
Cookies
Page 40
use Cake\Http\Middleware\CsrfProtectionMiddleware;
$middleware->add(new CsrfProtectionMiddleware([ ‘expiry’ => 600, ‘httpOnly’ => true ]));
CSRF
Page 41
Future Routable Middleware
Page 42
// Register middleware, for use in routing scopes$routes ->registerMiddleware(‘auth’, new AuthenticationMiddleware(..)) ->registerMiddleware(‘cookies’, new EncryptedCookieMiddleware(..));
// Create a routing scope (as you do today)$routes->scope('/api', function ($routes) { // Enable middleware $routes->middleware('csrf', 'cors', 'auth'); $routes->connect('/ping', [‘controller’ => ‘Pings’]);});
Routable Middleware
Page 44
Future 3.6
Backwards compatible
Page 45
Future Deprecation warnings
Runtime errors for deprecations
Page 46
Future 4.0.0
Svelte CakePHP 3.x
Page 47
Future PHP 7.1
No PHP5 support
Page 48
Future Stricter Typing
Page 49
Future Interface Updates
Page 50
Future Deprecation Cleanup
All currently deprecated methods will be removed.
Page 51
Future Developer Happiness
Better and earlier errors
Page 53
Late 2017 | Early 2018
Page 54
Future Long Term Support
Page 55
Future 2.10
Long Term Support
Page 56
Future 2.x bugfixes
1 year after 4.0.0
Page 57
Future 2.x Security fixes
18 months after 4.0.0
Page 58
Future 3.6
Long Term Support
Page 59
Future 3.6 bugfixes
18 months after 4.0.0
Page 60
Future 3.6 Security fixes
3 years after 4.0.0
Page 63
Present FuturePast
Page 64
Thank YouGithub - markstory
Twitter - mark_story https://joind.in/talk/b71f6