Slide 1

Slide 1 text

Getting Ready For PHP 7.2 Jenny Wong | @miss_jwo

Slide 2

Slide 2 text

Getting Ready For PHP 7.2 Jenny Wong | @miss_jwo

Slide 3

Slide 3 text

Getting Ready For PHP 7.3 Jenny Wong | @miss_jwo

Slide 4

Slide 4 text

PHP The primary programming language that WordPress is built on. @miss_jwo #WCNordic

Slide 5

Slide 5 text

Current supported versions of PHP are : 7.1, 7.2 & 7.3 @miss_jwo #WCNordic

Slide 6

Slide 6 text

Supported Versions http://php.net/supported-versions.php @miss_jwo #WCNordic

Slide 7

Slide 7 text

Supported Versions http://php.net/supported-versions.php @miss_jwo #WCNordic

Slide 8

Slide 8 text

Supported Versions http://php.net/supported-versions.php @miss_jwo #WCNordic

Slide 9

Slide 9 text

What PHP versions are people running WordPress on? @miss_jwo #WCNordic

Slide 10

Slide 10 text

What PHP versions are people running WordPress on? https://wordpress.org/about/stats/ PHP Version @miss_jwo #WCNordic

Slide 11

Slide 11 text

What PHP versions are people running WordPress on? https://wordpress.org/about/stats/ @miss_jwo #WCNordic

Slide 12

Slide 12 text

What PHP versions are people running WordPress on? https://wordpress.org/about/stats/ 5.2 5.6 7.0 5.5 5.4 5.3 @miss_jwo #WCNordic

Slide 13

Slide 13 text

Do you have a zombie PHP on your site? @miss_jwo #WCNordic

Slide 14

Slide 14 text

https://wordpress.org/plugins/health-check @miss_jwo #WCNordic

Slide 15

Slide 15 text

WordPress works on all the latest versions of PHP @miss_jwo #WCNordic

Slide 16

Slide 16 text

What about custom code? Plugins & Themes? & @miss_jwo #WCNordic

Slide 17

Slide 17 text

• Checks for spelling mistakes • Does not check that the sentences make sense Static Analysers @miss_jwo #WCNordic

Slide 18

Slide 18 text

Scenario #1 • I’m not a developer/ coder but I want to check
 • Is there going to be too much to do? @miss_jwo #WCNordic

Slide 19

Slide 19 text

Click & Check! @miss_jwo #WCNordic

Slide 20

Slide 20 text

WP Engine Wrapper Plugin https://wordpress.org/plugins/php-compatibility-checker @miss_jwo #WCNordic

Slide 21

Slide 21 text

WP Engine Wrapper Plugin @miss_jwo #WCNordic

Slide 22

Slide 22 text

WP Engine Wrapper Plugin

Slide 23

Slide 23 text

Working on a project and want to check as you work Scenario #2 @miss_jwo #WCNordic

Slide 24

Slide 24 text

Composer & PHP CompatibilityWP & WordPress Coding Standards Tools for your workflow: (Will also install PHP Coding Standards) @miss_jwo #WCNordic

Slide 25

Slide 25 text

Where in the workflow? • Locally • Before commits are accepted into a repo • Before code is push to production @miss_jwo #WCNordic

Slide 26

Slide 26 text

Composer & PHP Compatibility @miss_jwo #WCNordic

Slide 27

Slide 27 text

Composer & PHP Compatibility Number of files checked Warning found Skipped file Error found @miss_jwo #WCNordic

Slide 28

Slide 28 text

Composer & PHP Compatibility

Slide 29

Slide 29 text

Composer & PHP Compatibility

Slide 30

Slide 30 text

WordPress Coding Standards Will tell you about deprecated functions in WordPress @miss_jwo #WCNordic

Slide 31

Slide 31 text

Migration Time @miss_jwo #WCNordic

Slide 32

Slide 32 text

PHP.net manual @miss_jwo #WCNordic

Slide 33

Slide 33 text

Mirgate

Slide 34

Slide 34 text

• Start at your current PHP version • Use a static analyser • Check the migration guide for current PHP Version • Repeat till at desired PHP version. @miss_jwo #WCNordic

Slide 35

Slide 35 text

Mirgate

Slide 36

Slide 36 text

Caveats @miss_jwo #WCNordic

Slide 37

Slide 37 text

Some function outputs have changed @miss_jwo #WCNordic

Slide 38

Slide 38 text

Runtime errors will not be detected by a static analyser @miss_jwo #WCNordic

Slide 39

Slide 39 text

Upsides @miss_jwo #WCNordic

Slide 40

Slide 40 text

Better Performance @miss_jwo #WCNordic

Slide 41

Slide 41 text

Uses less computing resources @miss_jwo #WCNordic

Slide 42

Slide 42 text

Fixed PHP bugs @miss_jwo #WCNordic

Slide 43

Slide 43 text

PHP security support @miss_jwo #WCNordic

Slide 44

Slide 44 text

Lots of new functions and features for developers to use! @miss_jwo #WCNordic

Slide 45

Slide 45 text

If you care about keeping your WordPress up to date, you should care about keeping your stack up to date too. @miss_jwo #WCNordic

Slide 46

Slide 46 text

Developers & hosting companies are your friends @miss_jwo #WCNordic

Slide 47

Slide 47 text

Plugin Author? @miss_jwo #WCNordic

Slide 48

Slide 48 text

Set a minimum PHP version requirement in plugin readme file https://make.wordpress.org/plugins/2017/08/29/minimum-php-version-requirement/ @miss_jwo #WCNordic

Slide 49

Slide 49 text

← Minimum requirement Plugin readme.txt @miss_jwo #WCNordic

Slide 50

Slide 50 text

@miss_jwo #WCNordic

Slide 51

Slide 51 text

Resources @miss_jwo #WCNordic

Slide 52

Slide 52 text

• WordCamp London 2015: Lorna Jane Mitchell: Get Ready for PHP 5.4+ (video) • Lorna Jane Mitchell: Get Ready for PHP 5.4+ Slides • Your hosting providers documentation • php.net/manual • https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards/#how- to-use • Cloudways How to Upgrade From PHP 5.X to PHP 7 (Cheat Sheet) • Auth0: Migrating a PHP5 app to PHP7 by Prosper Otemuyiwa (PDF) • How to Set up Modern PHP Coding Standards for WordPress | Thorsten Frommen @miss_jwo #WCNordic

Slide 53

Slide 53 text

Suurkiitokset! [email protected] @miss_jwo