Top Banner
The Road Ahead 3.4 and the path to 4.0
64

CakePHP - The Road Ahead

Jan 23, 2018

Download

Software

markstory
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: CakePHP - The Road Ahead

The Road Ahead3.4 and the path to 4.0

Page 2: CakePHP - The Road Ahead

Present FuturePast

Page 3: CakePHP - The Road Ahead

Past

Page 4: CakePHP - The Road Ahead

Past 2.x - 3.0.0

Page 5: CakePHP - The Road Ahead

Past Upgrading was hard

Page 6: CakePHP - The Road Ahead

Past Upgrading was brutal

Page 7: CakePHP - The Road Ahead

Past 2.x is still active

Page 8: CakePHP - The Road Ahead

Past What did we learn?

Page 9: CakePHP - The Road Ahead

Past Difficult upgrades

Fragment the community

Page 10: CakePHP - The Road Ahead

Past Stagnation

Big releases take time

Page 11: CakePHP - The Road Ahead

Past

Page 12: CakePHP - The Road Ahead

PresentPast

Page 13: CakePHP - The Road Ahead

Present 3.2.x - 3.4.x

Page 14: CakePHP - The Road Ahead

Present Working towards stronger typing

Splitting up modal methods

Page 15: CakePHP - The Road Ahead

$email = new Email(); $email->to(‘[email protected]') ->from(‘[email protected]') ->template($template) ->helpers([‘Html’, ‘Emoji’]) ->send();

Combined Methods

Page 16: CakePHP - The Road Ahead

$email = new Email(); $email->to(‘[email protected]') ->setFrom(‘[email protected]') ->setTemplate($template) ->setHelpers([‘Html’, ‘Emoji’]) ->send();

Combined Methods

Page 17: CakePHP - The Road Ahead

Present PSR7

Adopting community standards

Page 18: CakePHP - The Road Ahead

Present Immutability

Request & Response

Page 19: CakePHP - The Road Ahead

// $response is unchanged here. $response->withHeader(‘X-yes’, ‘yes’);

// We need to overwrite $response $response = $response->withHeader(‘X-yes’, ‘yes’);

Immutability

Page 20: CakePHP - The Road Ahead

Present Middleware

Your application as an onion

Page 21: CakePHP - The Road Ahead

Present Layers of behavior

Small, focused, and composable

Page 22: CakePHP - The Road Ahead

App

Page 23: CakePHP - The Road Ahead

Routes

App

Page 24: CakePHP - The Road Ahead

Assets

Routes

App

Page 25: CakePHP - The Road Ahead

Exceptions

Assets

Routes

App

Page 26: CakePHP - The Road Ahead

CORS

Exceptions

Assets

Routes

App

Page 27: CakePHP - The Road Ahead

CORS

Exceptions

Assets

Routes

App

Page 28: CakePHP - The Road Ahead

CORS

Exceptions

Assets

Routes

App

Request

Page 29: CakePHP - The Road Ahead

CORS

Exceptions

Assets

Routes

App

Request

Page 30: CakePHP - The Road Ahead

CORS

Exceptions

Assets

Routes

App

Request

Response

Page 31: CakePHP - The Road Ahead

CORS

Exceptions

Assets

Routes

App

Page 32: CakePHP - The Road Ahead

CORS

Exceptions

Assets

Routes

AppRequest

Page 33: CakePHP - The Road Ahead

CORS

Exceptions

Assets

Routes

AppRequest

Page 34: CakePHP - The Road Ahead

CORS

Exceptions

Assets

Routes

AppRequest

Response

Page 35: CakePHP - The Road Ahead

PresentPast

Page 36: CakePHP - The Road Ahead

Present FuturePast

Page 37: CakePHP - The Road Ahead

Future 3.5

Page 38: CakePHP - The Road Ahead

Future New Middleware

CSRF, Cookies, Authentication

Page 39: CakePHP - The Road Ahead

use Cake\Http\Middleware\EncryptedCookiesMiddleware;

$middleware->add(new EncryptedCookiesMiddleware([ [‘remember_me’, ‘secrets’], Configure::read(‘Cookie.aesKey’) ]));

Cookies

Page 40: CakePHP - The Road Ahead

use Cake\Http\Middleware\CsrfProtectionMiddleware;

$middleware->add(new CsrfProtectionMiddleware([ ‘expiry’ => 600, ‘httpOnly’ => true ]));

CSRF

Page 41: CakePHP - The Road Ahead

Future Routable Middleware

Page 42: CakePHP - The Road Ahead

// 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 43: CakePHP - The Road Ahead

Future 3.6 & 4.0

Page 44: CakePHP - The Road Ahead

Future 3.6

Backwards compatible

Page 45: CakePHP - The Road Ahead

Future Deprecation warnings

Runtime errors for deprecations

Page 46: CakePHP - The Road Ahead

Future 4.0.0

Svelte CakePHP 3.x

Page 47: CakePHP - The Road Ahead

Future PHP 7.1

No PHP5 support

Page 48: CakePHP - The Road Ahead

Future Stricter Typing

Page 49: CakePHP - The Road Ahead

Future Interface Updates

Page 50: CakePHP - The Road Ahead

Future Deprecation Cleanup

All currently deprecated methods will be removed.

Page 51: CakePHP - The Road Ahead

Future Developer Happiness

Better and earlier errors

Page 52: CakePHP - The Road Ahead
Page 53: CakePHP - The Road Ahead

Late 2017 | Early 2018

Page 54: CakePHP - The Road Ahead

Future Long Term Support

Page 55: CakePHP - The Road Ahead

Future 2.10

Long Term Support

Page 56: CakePHP - The Road Ahead

Future 2.x bugfixes

1 year after 4.0.0

Page 57: CakePHP - The Road Ahead

Future 2.x Security fixes

18 months after 4.0.0

Page 58: CakePHP - The Road Ahead

Future 3.6

Long Term Support

Page 59: CakePHP - The Road Ahead

Future 3.6 bugfixes

18 months after 4.0.0

Page 60: CakePHP - The Road Ahead

Future 3.6 Security fixes

3 years after 4.0.0

Page 61: CakePHP - The Road Ahead

Past

Page 62: CakePHP - The Road Ahead

PresentPast

Page 63: CakePHP - The Road Ahead

Present FuturePast

Page 64: CakePHP - The Road Ahead

Thank YouGithub - markstory

Twitter - mark_story https://joind.in/talk/b71f6