Jonathan Bossenger
Let’s Code
Learn.WordPress.org
Testing plugins for PHP 8
2
👋🏽
Welcome!
As you join, please make sure you have your local
development environment ready:
• A local WordPress installation
• A code editor like VSCode or Sublime
• https://github.com/jonathanbossenger/wp-
learn-php8/releases/download/1.0.0/wp-learn-
php8.1.0.0.zip
Then, let everyone know in the chat where you’re
joining us from…
Hello!
○ My name is Jonathan Bossenger
○ From Cape Town, South Africa
○ Developer educator at Automattic
○ Sponsored to work with the Training Team
○ jonathanbossenger.com
Learn.WordPress.org
Testing plugins for
PHP 8 Compatibility
Jonathan Bossenger
Announcements
○ Welcome.
○ Please let me know if you can’t see this slide!
○ We are presenting in focus mode, but please feel free to enable your video.
○ You are welcome to ask questions.
○ You are welcome to post questions in the chat, or unmute to ask questions.
Announcements
○ Make sure your local install is ready
○ https://github.com/jonathanbossenger/wp-learn-php8/releases/download/1.0.0/wp-
learn-php8.1.0.0.zip
○ If I am going too fast, please let me know!
○ We will be posting this session to https://wordpress.tv/ afterwards
○ For more WordPress focused content please visit https://learn.wordpress.org/
Learning Outcomes
1. WordPress and PHP 8
2. Where to find information on PHP version changes
3. Two ways to test your plugins for PHP compatibility
• Manual testing process
• Automated testing
WordPress and PHP 8
○ https://make.wordpress.org/core/2020/11/23/wordpress-and-php-8-0/
○ https://wptavern.com/getting-your-wordpress-plugins-and-themes-ready-for-php-8
○ https://en.wikipedia.org/wiki/PHP#Release_history
○ https://www.php.net/manual/en/appendices.php
Manually testing
○ https://localwp.com/help-docs/advanced/local-and-php-8/
○ WordPress Playground Extension for VS code (beta)
○ https://wordpress.org/documentation/article/debugging-in-wordpress/
Automated testing
○ PHPCompatibility
• https://github.com/PHPCompatibility/PHPCompatibility
⁃ https://getcomposer.org/
⁃ https://github.com/squizlabs/PHP_CodeSniffer
⁃ https://github.com/WordPress/WordPress-Coding-Standards
Resources
○ https://make.wordpress.org/core/2020/11/23/wordpress-and-php-8-0/
○ https://wptavern.com/getting-your-wordpress-plugins-and-themes-ready-for-php-8
○ https://www.php.net/manual/en/appendices.php
○ https://localwp.com/help-docs/advanced/local-and-php-8/
○ https://marketplace.visualstudio.com/items?itemName=WordPressPlayground.wordpress-playground
○ https://wordpress.org/documentation/article/debugging-in-wordpress/
○ https://github.com/PHPCompatibility/PHPCompatibility
○ https://getcomposer.org/
○ https://github.com/squizlabs/PHP_CodeSniffer
○ https://github.com/WordPress/WordPress-Coding-Standards
○ https://github.com/PHPCompatibility/PHPCompatibility/issues/808

Testing plugins for PHP 8

  • 1.
  • 2.
    2 👋🏽 Welcome! As you join,please make sure you have your local development environment ready: • A local WordPress installation • A code editor like VSCode or Sublime • https://github.com/jonathanbossenger/wp- learn-php8/releases/download/1.0.0/wp-learn- php8.1.0.0.zip Then, let everyone know in the chat where you’re joining us from… Hello! ○ My name is Jonathan Bossenger ○ From Cape Town, South Africa ○ Developer educator at Automattic ○ Sponsored to work with the Training Team ○ jonathanbossenger.com
  • 3.
    Learn.WordPress.org Testing plugins for PHP8 Compatibility Jonathan Bossenger
  • 4.
    Announcements ○ Welcome. ○ Pleaselet me know if you can’t see this slide! ○ We are presenting in focus mode, but please feel free to enable your video. ○ You are welcome to ask questions. ○ You are welcome to post questions in the chat, or unmute to ask questions.
  • 5.
    Announcements ○ Make sureyour local install is ready ○ https://github.com/jonathanbossenger/wp-learn-php8/releases/download/1.0.0/wp- learn-php8.1.0.0.zip ○ If I am going too fast, please let me know! ○ We will be posting this session to https://wordpress.tv/ afterwards ○ For more WordPress focused content please visit https://learn.wordpress.org/
  • 6.
    Learning Outcomes 1. WordPressand PHP 8 2. Where to find information on PHP version changes 3. Two ways to test your plugins for PHP compatibility • Manual testing process • Automated testing
  • 7.
    WordPress and PHP8 ○ https://make.wordpress.org/core/2020/11/23/wordpress-and-php-8-0/ ○ https://wptavern.com/getting-your-wordpress-plugins-and-themes-ready-for-php-8 ○ https://en.wikipedia.org/wiki/PHP#Release_history ○ https://www.php.net/manual/en/appendices.php
  • 8.
    Manually testing ○ https://localwp.com/help-docs/advanced/local-and-php-8/ ○WordPress Playground Extension for VS code (beta) ○ https://wordpress.org/documentation/article/debugging-in-wordpress/
  • 9.
    Automated testing ○ PHPCompatibility •https://github.com/PHPCompatibility/PHPCompatibility ⁃ https://getcomposer.org/ ⁃ https://github.com/squizlabs/PHP_CodeSniffer ⁃ https://github.com/WordPress/WordPress-Coding-Standards
  • 10.
    Resources ○ https://make.wordpress.org/core/2020/11/23/wordpress-and-php-8-0/ ○ https://wptavern.com/getting-your-wordpress-plugins-and-themes-ready-for-php-8 ○https://www.php.net/manual/en/appendices.php ○ https://localwp.com/help-docs/advanced/local-and-php-8/ ○ https://marketplace.visualstudio.com/items?itemName=WordPressPlayground.wordpress-playground ○ https://wordpress.org/documentation/article/debugging-in-wordpress/ ○ https://github.com/PHPCompatibility/PHPCompatibility ○ https://getcomposer.org/ ○ https://github.com/squizlabs/PHP_CodeSniffer ○ https://github.com/WordPress/WordPress-Coding-Standards ○ https://github.com/PHPCompatibility/PHPCompatibility/issues/808

Editor's Notes

  • #2 TITLE SLIDE: Make a copy of this presentation to your Google Drive, and edit to replace with your details.